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

Public Member Functions

 PythonModuleClass (std::string modName)
 

Detailed Description

template<typename MODTYPE>
struct PythonModuleClass< MODTYPE >

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

Constructor & Destructor Documentation

◆ PythonModuleClass()

template<typename MODTYPE >
PythonModuleClass< MODTYPE >::PythonModuleClass ( std::string  modName)
inline

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

385  {
386  py::class_<ModuleWrap<MODTYPE>, std::shared_ptr<ModuleWrap<MODTYPE>>,
387  py::bases<Module>, boost::noncopyable>(
388  modName.c_str(), py::init<FieldSharedPtr>())
389 
390  .def("AddConfigOption", ModuleWrap_AddConfigOption<MODTYPE>,
391  (py::arg("key"), py::arg("defValue"), py::arg("desc"),
392  py::arg("isBool") = false))
393 
394  // Allow direct access to field object through a property.
395  .def_readwrite("field", &ModuleWrap<MODTYPE>::m_f)
396 
397  // Process function for this module.
398  .def("Process", py::pure_virtual(&Module_Process))
399  .def("Run", py::pure_virtual(&Module_Process))
400  .def("Create", py::raw_function(Module_Create<MODTYPE>))
401  .staticmethod("Create");
402 
404  }
void Module_Process(ModuleSharedPtr m)
Module wrapper to handle virtual function calls in Module and its subclasses as defined by the templa...

References Module_Process().