Macros

#define PARAM_ENUM_DECLARE(_seq)    PARAM_TYPED_FOREACH(PARAM_ENUM_DECLARE_,_seq)
 Make anonymous enum type. More...
 
#define PARAM_ENUM_STRING_DECLARE(_prefix, _seq)    BOOST_PP_SEQ_FOR_EACH(PARAM_ENUM_STRING_DECLARE_,_prefix,_seq)
 Make enum string list. More...
 

Detailed Description

Macro Definition Documentation

◆ PARAM_ENUM_DECLARE

#define PARAM_ENUM_DECLARE (   _seq)     PARAM_TYPED_FOREACH(PARAM_ENUM_DECLARE_,_seq)

Make anonymous enum type.

Make anonymous enum type for enum type parameters in _seq. All other types are ignored. The enum member is prefixed with _name. Expand to:

enum {_name1##_seq1[0], _name1##_seq1[1] ...};
enum {_name2##_seq2[0], _name2##_seq2[1] ...};
...

◆ PARAM_ENUM_STRING_DECLARE

#define PARAM_ENUM_STRING_DECLARE (   _prefix,
  _seq 
)     BOOST_PP_SEQ_FOR_EACH(PARAM_ENUM_STRING_DECLARE_,_prefix,_seq)

Make enum string list.

Roughly translated:

_prefix##_name1[] = {#seq1[0], #seq1[1], ...,NULL};
_prefix##_name2[] = {#seq2[0], #seq2[1], ...,NULL};
...

Example usage: PARAM_ENUM_STRING_DECLARE(static const char *Enum, MyParamsSeq)