Helper macros for Python bindings. More...
Modules | |
Python doc helper | |
Generate argument doc string for Python. | |
Macros | |
#define | PARAM_FIELD_STRINGS(_field, _seq) BOOST_PP_SEQ_FOR_EACH_I(PARAM_FIELD_STRINGS_,_field,_seq) |
Expand to a list of stringified fields. More... | |
#define | PARAM_FIELDS(_src, _seq) BOOST_PP_SEQ_FOR_EACH_I(PARAM_FIELDS_,_src,_seq) |
Expand to a list of the given field in the parameter sequence. More... | |
#define | PARAM_PY_DECLARE(_src, _seq) BOOST_PP_SEQ_FOR_EACH(PARAM_PY_DECLARE_,_src,_seq) |
Declare field variables for Python C type without initialization. More... | |
#define | PARAM_PY_DECLARE_INIT(_src, _seq) BOOST_PP_SEQ_FOR_EACH(PARAM_PY_DECLARE_INIT_,_src,_seq) |
Declare field variables of Python c type with initialization to default. More... | |
#define | PARAM_PY_DICT_SET_VALUE(_dict, _field, _src, _seq) BOOST_PP_SEQ_FOR_EACH(PARAM_PY_DICT_SET_VALUE_,(_dict,_field,_src),_seq) |
Populate a Python dict with a structure variable. More... | |
#define | PARAM_PY_FIELDS(_src, _seq) BOOST_PP_SEQ_FOR_EACH_I(PARAM_PY_FIELDS_,_src,_seq) |
Expand to a comma separated list of the given field in the sequence. More... | |
#define | PARAM_PY_KWDS(_seq) PARAM_FOREACH(PARAM_PY_KWDS_,_seq) |
Generate a format string for keywords based argument. More... | |
#define | PARAM_REF(_src, _seq) BOOST_PP_SEQ_FOR_EACH_I(PARAM_REF_,_src,_seq) |
Generate a list of field references. More... | |
Helper macros for Python bindings.
#define PARAM_FIELD_STRINGS | ( | _field, | |
_seq | |||
) | BOOST_PP_SEQ_FOR_EACH_I(PARAM_FIELD_STRINGS_,_field,_seq) |
Expand to a list of stringified fields.
#define PARAM_FIELDS | ( | _src, | |
_seq | |||
) | BOOST_PP_SEQ_FOR_EACH_I(PARAM_FIELDS_,_src,_seq) |
Expand to a list of the given field in the parameter sequence.
_src:
macro to generate source field. See here for more detailsFor example, PARAM_FIELDS(PARAM_FARG, _seq) expands to:
#define PARAM_PY_DECLARE | ( | _src, | |
_seq | |||
) | BOOST_PP_SEQ_FOR_EACH(PARAM_PY_DECLARE_,_src,_seq) |
Declare field variables for Python C type without initialization.
#define PARAM_PY_DECLARE_INIT | ( | _src, | |
_seq | |||
) | BOOST_PP_SEQ_FOR_EACH(PARAM_PY_DECLARE_INIT_,_src,_seq) |
Declare field variables of Python c type with initialization to default.
#define PARAM_PY_DICT_SET_VALUE | ( | _dict, | |
_field, | |||
_src, | |||
_seq | |||
) | BOOST_PP_SEQ_FOR_EACH(PARAM_PY_DICT_SET_VALUE_,(_dict,_field,_src),_seq) |
Populate a Python dict with a structure variable.
_dict:
the Python dictionary object _field:
specifies the field to use as key _src:
macro to generate source field. See here for more detailsRoughly translated to:
#define PARAM_PY_FIELDS | ( | _src, | |
_seq | |||
) | BOOST_PP_SEQ_FOR_EACH_I(PARAM_PY_FIELDS_,_src,_seq) |
Expand to a comma separated list of the given field in the sequence.
_src:
macro to generate source field. See here for more detailsThe field will be casted from python C to C type
#define PARAM_PY_KWDS | ( | _seq | ) | PARAM_FOREACH(PARAM_PY_KWDS_,_seq) |
Generate a format string for keywords based argument.
#define PARAM_REF | ( | _src, | |
_seq | |||
) | BOOST_PP_SEQ_FOR_EACH_I(PARAM_REF_,_src,_seq) |
Generate a list of field references.
_src:
macro to generate source field. See here formore details Expand to: