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. More...
 
#define ARMARX_ANONYMOUS_VARIABLE   ARMARX_ANONYMOUS_VARIABLE_WITH_PREFIX(armarxAnonymousVariable)
 creates a identifier. More...
 
#define ARMARX_ANONYMOUS_VARIABLE_WITH_PREFIX(pre)   ARMARX_CONCATENATE_5(pre, _IN_LINE_, __LINE__, _WITH_COUNT_, __COUNTER__)
 creates a identifier with a given prefix. More...
 
#define ARMARX_CONCATENATE_5(s1, s2, s3, s4, s5)   ARMARX_CONCATENATE_5_IMPL(s1, s2, s3, s4, s5)
 concatenates its 5 parameters to one token (macros are expanded) More...
 
#define ARMARX_FIRST_PARAMETER(...)   ARMARX_FIRST_PARAMETER_IMPL(__VA_ARGS__,)
 Expands the given parameters and returns the first. More...
 
#define ARMARX_ID(...)   ARMARX_ID_IMPL(__VA_ARGS__)
 Expands the given parameters and returns them unmodified. More...
 
#define ARMARX_SECOND_PARAMETER(...)   ARMARX_SECOND_PARAMETER_IMPL(__VA_ARGS__,)
 Expands the given parameters and returns the second. More...
 
#define ARMARX_STRINGIFY(...)   ARMARX_STRINGIFY_IMPL(__VA_ARGS__)
 Expands the given parameters and stringifies them. More...
 
#define ARMARX_THIRD_PARAMETER(...)   ARMARX_THIRD_PARAMETER_IMPL(__VA_ARGS__,,)
 Expands the given parameters and returns the third. More...
 

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>

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
}

Definition at line 72 of file anonymous_variable.h.

◆ ARMARX_ANONYMOUS_VARIABLE_WITH_PREFIX

#define ARMARX_ANONYMOUS_VARIABLE_WITH_PREFIX (   pre)    ARMARX_CONCATENATE_5(pre, _IN_LINE_, __LINE__, _WITH_COUNT_, __COUNTER__)

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

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
}
See also
ARMARX_ANONYMOUS_VARIABLE

Definition at line 54 of file anonymous_variable.h.

◆ ARMARX_CONCATENATE_5

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

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

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 (   ...)    ARMARX_FIRST_PARAMETER_IMPL(__VA_ARGS__,)

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

Expands the given parameters and returns the first.

Definition at line 30 of file tuple_element.h.

◆ ARMARX_ID

#define ARMARX_ID (   ...)    ARMARX_ID_IMPL(__VA_ARGS__)

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

Expands the given parameters and returns them unmodified.

Definition at line 30 of file identity.h.

◆ ARMARX_SECOND_PARAMETER

#define ARMARX_SECOND_PARAMETER (   ...)    ARMARX_SECOND_PARAMETER_IMPL(__VA_ARGS__,)

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

Expands the given parameters and returns the second.

Definition at line 37 of file tuple_element.h.

◆ ARMARX_STRINGIFY

#define ARMARX_STRINGIFY (   ...)    ARMARX_STRINGIFY_IMPL(__VA_ARGS__)

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

Expands the given parameters and stringifies them.

Definition at line 30 of file stringify.h.

◆ ARMARX_THIRD_PARAMETER

#define ARMARX_THIRD_PARAMETER (   ...)    ARMARX_THIRD_PARAMETER_IMPL(__VA_ARGS__,,)

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

Expands the given parameters and returns the third.

Definition at line 44 of file tuple_element.h.

ARMARX_ANONYMOUS_VARIABLE_WITH_PREFIX
#define ARMARX_ANONYMOUS_VARIABLE_WITH_PREFIX(pre)
creates a identifier with a given prefix.
Definition: anonymous_variable.h:54
ARMARX_ANONYMOUS_VARIABLE
#define ARMARX_ANONYMOUS_VARIABLE
creates a identifier.
Definition: anonymous_variable.h:72