LSST Applications g0fba68d861+c44c4642ff,g123d84c11c+8c5ae1fdc5,g1ec0fe41b4+f0b7a83aa5,g1fd858c14a+d55c29f552,g22210bfa2a+9298f3fc7c,g3533f9d6cb+722901cf7e,g35bb328faa+8c5ae1fdc5,g3fc7d4f5b9+c2ec2f26fd,g4178042926+d73d17933f,g4a8f988797+0519b1fd53,g53246c7159+8c5ae1fdc5,g548d740b8c+47e4a7beb3,g60b5630c4e+722901cf7e,g663da51e9b+859b113070,g67b6fd64d1+c104138150,g78460c75b0+7e33a9eb6d,g786e29fd12+668abc6043,g8352419a5c+8c5ae1fdc5,g8852436030+08cbd4c692,g89139ef638+c104138150,g8b40312ef5+5b6744d273,g989de1cb63+c104138150,g9f33ca652e+ba6fca5554,ga1e959baac+5fbc491aed,ga2f891cd6c+722901cf7e,ga5b27134d2+0c6e989ba2,gabe3b4be73+8856018cbb,gabf8522325+5cb9e9d408,gb1101e3267+2d26775618,gb89ab40317+c104138150,gcf25f946ba+08cbd4c692,gd6cbbdb0b4+be834e5da7,gde0f65d7ad+e537754a52,ge278dab8ac+fa35eb453c,ge410e46f29+c104138150,gf5e32f922b+8c5ae1fdc5,gf67bdafdda+c104138150,gffe7e49bb4+722901cf7e,v29.1.0.rc4
LSST Data Management Base Package
Loading...
Searching...
No Matches
python.h File Reference

Go to the source code of this file.

Macros

#define LSST_DECLARE_CONTROL_FIELD(WRAPPER, CLASS, NAME)
 Macro used to wrap fields declared by LSST_CONTROL_FIELD using Pybind11.
 
#define LSST_DECLARE_NESTED_CONTROL_FIELD(WRAPPER, CLASS, NAME)
 Macro used to wrap fields declared by LSST_NESTED_CONTROL_FIELD using Pybind11.
 

Macro Definition Documentation

◆ LSST_DECLARE_CONTROL_FIELD

#define LSST_DECLARE_CONTROL_FIELD ( WRAPPER,
CLASS,
NAME )
Value:
WRAPPER.def_readwrite(#NAME, &CLASS::NAME); \
WRAPPER.def_static("_doc_" #NAME, &CLASS::_doc_ ## NAME); \
WRAPPER.def_static("_type_" #NAME, &CLASS::_type_ ## NAME);

Macro used to wrap fields declared by LSST_CONTROL_FIELD using Pybind11.

Example:

LSST_DECLARE_CONTROL_FIELD(clsFoo, Foo, myField)
Parameters
WRAPPERThe py::class_ object representing the control class being wrapped.
CLASSThe control class. Must be a C++ identifier (not a string), properly namespace-qualified for the context where this macro is being called.
NAMEThe control field. Must be a C++ identifier (not a string), and must match the NAME argument of the original LSST_CONTROL_FIELD macro.

Definition at line 50 of file python.h.

50#define LSST_DECLARE_CONTROL_FIELD(WRAPPER, CLASS, NAME) \
51 WRAPPER.def_readwrite(#NAME, &CLASS::NAME); \
52 WRAPPER.def_static("_doc_" #NAME, &CLASS::_doc_ ## NAME); \
53 WRAPPER.def_static("_type_" #NAME, &CLASS::_type_ ## NAME);

◆ LSST_DECLARE_NESTED_CONTROL_FIELD

#define LSST_DECLARE_NESTED_CONTROL_FIELD ( WRAPPER,
CLASS,
NAME )
Value:
WRAPPER.def_readwrite(#NAME, &CLASS::NAME); \
WRAPPER.def_static("_doc_" #NAME, &CLASS::_doc_ ## NAME); \
WRAPPER.def_static("_type_" #NAME, &CLASS::_type_ ## NAME); \
WRAPPER.def_static("_module_" #NAME, &CLASS::_module_ ## NAME);

Macro used to wrap fields declared by LSST_NESTED_CONTROL_FIELD using Pybind11.

Example:

LSST_DECLARE_NESTED_CONTROL_FIELD(clsFoo, Foo, myField)
Parameters
WRAPPERThe py::class_ object representing the control class being wrapped.
CLASSThe control class. Must be a C++ identifier (not a string), properly namespace-qualified for the context where this macro is being called.
NAMEThe control field. Must be a C++ identifier (not a string), and must match the NAME argument of the original LSST_CONTROL_FIELD macro.

Definition at line 72 of file python.h.

72#define LSST_DECLARE_NESTED_CONTROL_FIELD(WRAPPER, CLASS, NAME) \
73 WRAPPER.def_readwrite(#NAME, &CLASS::NAME); \
74 WRAPPER.def_static("_doc_" #NAME, &CLASS::_doc_ ## NAME); \
75 WRAPPER.def_static("_type_" #NAME, &CLASS::_type_ ## NAME); \
76 WRAPPER.def_static("_module_" #NAME, &CLASS::_module_ ## NAME);