LSST Applications g013ef56533+a4edc895bc,g042eb84c57+b29c0f3956,g199a45376c+0ba108daf9,g1fd858c14a+7764c0e026,g210f2d0738+9b8977b7da,g262e1987ae+658a70c76f,g29ae962dfc+d6d222e393,g2ac17093b6+61d6563b1e,g2b1d02342f+ba37d77f3a,g2cef7863aa+aef1011c0b,g35bb328faa+8c5ae1fdc5,g3fd5ace14f+a760dfcc03,g47891489e3+b510cb74c0,g4cdb532a89+b2ec8e584f,g511e8cfd20+f87fe9d336,g53246c7159+8c5ae1fdc5,g54cd7ddccb+fd7ad03fde,g64539dfbff+9b8977b7da,g67b6fd64d1+b510cb74c0,g67fd3c3899+9b8977b7da,g74acd417e5+37183b8be2,g786e29fd12+668abc6043,g87389fa792+8856018cbb,g89139ef638+b510cb74c0,g8d7436a09f+081e6fee71,g8ea07a8fe4+760ca7c3fc,g90f42f885a+033b1d468d,g97be763408+0a2f391ffa,gb8d5351fc1+9b8977b7da,gbf99507273+8c5ae1fdc5,gca7fc764a6+b510cb74c0,gce8aa8abaa+8c5ae1fdc5,gd7ef33dd92+b510cb74c0,gdab6d2f7ff+37183b8be2,ge410e46f29+b510cb74c0,ge68da09559+59ba3a5125,geaed405ab2+c4bbc419c6,gf9a733ac38+8c5ae1fdc5,w.2025.40
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);