Generate argument doc string for Python. More...

Macros

#define PARAM_PY_ARGS_DOC(_field, _seq)    BOOST_PP_SEQ_FOR_EACH_I(PARAM_PY_ARGS_DOC_,_field,_seq)
 Generate argument list string. More...
 
#define PARAM_PY_DICT_SET_DOC(_dict, _field, _seq)    BOOST_PP_SEQ_FOR_EACH(PARAM_PY_DICT_SET_DOC_,(_dict,_field),_seq)
 Populate a Python dict with the doc field of the parameter sequence. More...
 

Detailed Description

Generate argument doc string for Python.

Macro Definition Documentation

◆ PARAM_PY_ARGS_DOC

#define PARAM_PY_ARGS_DOC (   _field,
  _seq 
)     BOOST_PP_SEQ_FOR_EACH_I(PARAM_PY_ARGS_DOC_,_field,_seq)

Generate argument list string.

  • _field: specifies the field to use as name

Expand to a single string:

"_field1=_def1,_field2=_def2 ..."

◆ PARAM_PY_DICT_SET_DOC

#define PARAM_PY_DICT_SET_DOC (   _dict,
  _field,
  _seq 
)     BOOST_PP_SEQ_FOR_EACH(PARAM_PY_DICT_SET_DOC_,(_dict,_field),_seq)

Populate a Python dict with the doc field of the parameter sequence.

  • _dict: the Python dictionary object
  • _field: specifies the field to use as key

Roughly translated to:

PyDict_SetItem(_dict,#_field1,doc1);
PyDict_SetItem(_dict,#_field1,doc2);
...