Macros

#define _detail_ARMARX_IF_IN_PARENTHESIS_EXPAND(...)
 If the first parameter is in parenthesis, the second parameter is returned, otherwise the third is returned.
 
#define ARMARX_ANONYMOUS_VARIABLE   ARMARX_ANONYMOUS_VARIABLE_WITH_PREFIX(armarxAnonymousVariable)
 creates a identifier.
 
#define ARMARX_ANONYMOUS_VARIABLE_WITH_PREFIX(pre)
 creates a identifier with a given prefix.
 
#define ARMARX_CONCATENATE_5(s1, s2, s3, s4, s5)
 concatenates its 5 parameters to one token (macros are expanded)
 
#define ARMARX_FIRST_PARAMETER(...)
 Expands the given parameters and returns the first.
 
#define ARMARX_ID(...)
 Expands the given parameters and returns them unmodified.
 
#define ARMARX_SECOND_PARAMETER(...)
 Expands the given parameters and returns the second.
 
#define ARMARX_STRINGIFY(...)
 Expands the given parameters and stringifies them.
 
#define ARMARX_THIRD_PARAMETER(...)
 Expands the given parameters and returns the third.
 

Detailed Description

Macro Definition Documentation

◆ _detail_ARMARX_IF_IN_PARENTHESIS_EXPAND

#define _detail_ARMARX_IF_IN_PARENTHESIS_EXPAND ( ...)

#include <ArmarXCore/util/CPPUtility/Preprocessor/if_in_parentheses.h>

Value:
,

If the first parameter is in parenthesis, the second parameter is returned, otherwise the third is returned.

Definition at line 32 of file if_in_parentheses.h.

◆ ARMARX_ANONYMOUS_VARIABLE

#define ARMARX_ANONYMOUS_VARIABLE   ARMARX_ANONYMOUS_VARIABLE_WITH_PREFIX(armarxAnonymousVariable)

#include <ArmarXCore/util/CPPUtility/Preprocessor/anonymous_variable.h>

creates a identifier.

The created identifier contains the linenumber and is unique per translation unit. This makro's usecase are other macros, where a variable for RAII has to be created in the enclosing scope.

can be used like this:

void foo()
{
std::mutex mtx;
std::lock_guard<std::mutex> ARMARX_ANONYMOUS_VARIABLE(mtx);
//guarded section
}
#define ARMARX_ANONYMOUS_VARIABLE
creates a identifier.

Definition at line 74 of file anonymous_variable.h.

◆ ARMARX_ANONYMOUS_VARIABLE_WITH_PREFIX

#define ARMARX_ANONYMOUS_VARIABLE_WITH_PREFIX ( pre)

#include <ArmarXCore/util/CPPUtility/Preprocessor/anonymous_variable.h>

Value:
ARMARX_CONCATENATE_5(pre, _IN_LINE_, __LINE__, _WITH_COUNT_, __COUNTER__)
#define __COUNTER__
#define ARMARX_CONCATENATE_5(s1, s2, s3, s4, s5)
concatenates its 5 parameters to one token (macros are expanded)
Definition concat.h:37

creates a identifier with a given prefix.

The prefix may help when the variable shows up in compiler output.

can be used like this:

void foo()
{
std::mutex mtx;
std::lock_guard<std::mutex> ARMARX_ANONYMOUS_VARIABLE_WITH_PREFIX(guard)(mtx);
//guarded section
}
#define ARMARX_ANONYMOUS_VARIABLE_WITH_PREFIX(pre)
creates a identifier with a given prefix.
See also
ARMARX_ANONYMOUS_VARIABLE

Definition at line 55 of file anonymous_variable.h.

◆ ARMARX_CONCATENATE_5

#define ARMARX_CONCATENATE_5 ( s1,
s2,
s3,
s4,
s5 )

#include <ArmarXCore/util/CPPUtility/Preprocessor/concat.h>

Value:
ARMARX_CONCATENATE_5_IMPL(s1, s2, s3, s4, s5)
#define ARMARX_CONCATENATE_5_IMPL(s1, s2, s3, s4, s5)
concatenates its 5 parameters to one token (macros are not expanded) Use ARMARX_CONCATENATE_5 instead...
Definition concat.h:31

concatenates its 5 parameters to one token (macros are expanded)

Definition at line 37 of file concat.h.

◆ ARMARX_FIRST_PARAMETER

#define ARMARX_FIRST_PARAMETER ( ...)

#include <ArmarXCore/util/CPPUtility/Preprocessor/tuple_element.h>

Value:
#define ARMARX_FIRST_PARAMETER_IMPL(x1,...)

Expands the given parameters and returns the first.

Definition at line 30 of file tuple_element.h.

◆ ARMARX_ID

#define ARMARX_ID ( ...)

#include <ArmarXCore/util/CPPUtility/Preprocessor/identity.h>

Value:
ARMARX_ID_IMPL(__VA_ARGS__)
#define ARMARX_ID_IMPL(...)
Definition identity.h:31

Expands the given parameters and returns them unmodified.

Definition at line 30 of file identity.h.

◆ ARMARX_SECOND_PARAMETER

#define ARMARX_SECOND_PARAMETER ( ...)

#include <ArmarXCore/util/CPPUtility/Preprocessor/tuple_element.h>

Value:
#define ARMARX_SECOND_PARAMETER_IMPL(x1, x2,...)

Expands the given parameters and returns the second.

Definition at line 37 of file tuple_element.h.

◆ ARMARX_STRINGIFY

#define ARMARX_STRINGIFY ( ...)

#include <ArmarXCore/util/CPPUtility/Preprocessor/stringify.h>

Value:
#define ARMARX_STRINGIFY_IMPL(...)
Definition stringify.h:31

Expands the given parameters and stringifies them.

Definition at line 30 of file stringify.h.

◆ ARMARX_THIRD_PARAMETER

#define ARMARX_THIRD_PARAMETER ( ...)

#include <ArmarXCore/util/CPPUtility/Preprocessor/tuple_element.h>

Value:
#define ARMARX_THIRD_PARAMETER_IMPL(x1, x2, x3,...)

Expands the given parameters and returns the third.

Definition at line 44 of file tuple_element.h.