Nektar++
Public Member Functions | List of all members
PythonModuleClass< MODTYPE > Struct Template Reference

Public Member Functions

 PythonModuleClass (py::module &m, std::string modName)
 

Detailed Description

template<typename MODTYPE>
struct PythonModuleClass< MODTYPE >

Definition at line 363 of file Python/Module.cpp.

Constructor & Destructor Documentation

◆ PythonModuleClass()

template<typename MODTYPE >
PythonModuleClass< MODTYPE >::PythonModuleClass ( py::module &  m,
std::string  modName 
)
inline

Definition at line 365 of file Python/Module.cpp.

366 {
367 py::classh<MODTYPE, Module, ModuleWrap<MODTYPE>>(m, modName.c_str())
368 .def(py::init<FieldSharedPtr>())
369
370 .def("AddConfigOption", &ModuleWrap_AddConfigOption<MODTYPE>,
371 py::arg("key"), py::arg("defValue"), py::arg("desc"),
372 py::arg("isBool") = false)
373
374 // Allow direct access to field object through a property.
375 .def_readwrite("field", &ModuleWrap<MODTYPE>::m_f)
376
377 // Process function for this module.
378 .def("Process", &ModulePublic<MODTYPE>::v_Process)
380 .def_static("Create", &Module_Create<MODTYPE>);
381 }
Module wrapper to handle virtual function calls in Module and its subclasses as defined by the templa...