Common helpers
Modules | |
Enum convert helpers | |
Macros | |
#define | PARAM_ARGS(_src, _seq) BOOST_PP_SEQ_FOR_EACH_I(PARAM_ARGS_,_src,_seq) |
Declare the parameters as function argument list without defaults. More... | |
#define | PARAM_ARGS_DEF(_src, _seq) BOOST_PP_SEQ_FOR_EACH_I(PARAM_ARGS_DEF_,_src,_seq) |
Declare the parameters as function argument list with defaults. More... | |
#define | PARAM_DECLARE(_src, _seq) BOOST_PP_SEQ_FOR_EACH(PARAM_DECLARE_,_src,_seq) |
Declares parameters using the given field as name. More... | |
#define | PARAM_DECLARE_INIT(_src, _seq) BOOST_PP_SEQ_FOR_EACH(PARAM_DECLARE_INIT_,_src,_seq) |
Declares parameters with initialization to default using the given field as name. More... | |
#define | PARAM_INIT(_src, _seq) BOOST_PP_SEQ_FOR_EACH_I(PARAM_INIT_,_src,_seq) |
Constructor initialization. More... | |
#define | PARAM_OP(_src, _op, _dst, _seq) BOOST_PP_SEQ_FOR_EACH(PARAM_COPY_,(_src,_op,_dst),_seq) |
Perform operation on two instance of each parameter in a sequence. More... | |
#define | PARAM_TYPE(_param) PARAM_TYPED(PARAM_TYPE_,_param) |
Obtain parameter type. More... | |
Detailed Description
Macro Definition Documentation
◆ PARAM_ARGS
#define PARAM_ARGS | ( | _src, | |
_seq | |||
) | BOOST_PP_SEQ_FOR_EACH_I(PARAM_ARGS_,_src,_seq) |
Declare the parameters as function argument list without defaults.
_src:
macro to generate source field. See here for more details
Expand to:
type1 _src(_param1), type2 _src(_param2) ...
◆ PARAM_ARGS_DEF
#define PARAM_ARGS_DEF | ( | _src, | |
_seq | |||
) | BOOST_PP_SEQ_FOR_EACH_I(PARAM_ARGS_DEF_,_src,_seq) |
Declare the parameters as function argument list with defaults.
_src:
macro to generate source field. See here for more details
Expand to:
type1 _src(_param1)=def1, type2 _src(_param1)=def2 ...
◆ PARAM_DECLARE
#define PARAM_DECLARE | ( | _src, | |
_seq | |||
) | BOOST_PP_SEQ_FOR_EACH(PARAM_DECLARE_,_src,_seq) |
Declares parameters using the given field as name.
_src:Macro
to generate source variable. The signature must be_src(_param)<\tt>, where
_param
is the tuple defining the parameter. You pass any of the parameteraccessors" to directly access the field. Or, supply your own macro to append any prefix as you like. For example:#define MY_SRC(_param) BOOST_PP_CAT(my,PARAM_FNAME(_param))->my##<name>
Expands to:
type1 _src(_param1);type2 _src(_param2); ...
◆ PARAM_DECLARE_INIT
#define PARAM_DECLARE_INIT | ( | _src, | |
_seq | |||
) | BOOST_PP_SEQ_FOR_EACH(PARAM_DECLARE_INIT_,_src,_seq) |
Declares parameters with initialization to default using the given field as name.
_src:
macro to generate source field. See here for more details
Expands to:
type1 _src(_param1)=_def1;type2 _src(_param2)=_def2; ...
◆ PARAM_INIT
#define PARAM_INIT | ( | _src, | |
_seq | |||
) | BOOST_PP_SEQ_FOR_EACH_I(PARAM_INIT_,_src,_seq) |
Constructor initialization.
_src:
macro to generate source field. See here for more details
Expand to,
_src(_param1)(def1), _src(_param1)(def2)...
◆ PARAM_OP
#define PARAM_OP | ( | _src, | |
_op, | |||
_dst, | |||
_seq | |||
) | BOOST_PP_SEQ_FOR_EACH(PARAM_COPY_,(_src,_op,_dst),_seq) |
Perform operation on two instance of each parameter in a sequence.
_src:
Macro to generate source variable. The signature must be_src(_param)<\tt>, where
_param
is the tuple defining the parameter. You pass any of the parameter accessors to directly access the field. Or, supply your own macro to append any prefix as you like._op:
a boolean operator_dst:
Same as_src
above.
Expands to:
_src(_param1) _op _src(_param2);
◆ PARAM_TYPE
#define PARAM_TYPE | ( | _param | ) | PARAM_TYPED(PARAM_TYPE_,_param) |
Obtain parameter type.
The main purpose is to alias enum type to short