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 383 of file Python/Module.cpp.

Constructor & Destructor Documentation

◆ PythonModuleClass()

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

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

386  {
387  py::class_<ModuleWrap<MODTYPE>, std::shared_ptr<ModuleWrap<MODTYPE>>,
388  py::bases<Module>, boost::noncopyable>(
389  modName.c_str(), py::init<FieldSharedPtr>())
390 
391  .def("AddConfigOption", ModuleWrap_AddConfigOption<MODTYPE>,
392  (py::arg("key"), py::arg("defValue"), py::arg("desc"),
393  py::arg("isBool") = false))
394 
395  // Allow direct access to field object through a property.
396  .def_readwrite("field", &ModuleWrap<MODTYPE>::m_f)
397 
398  // Process function for this module.
399  .def("Process", py::pure_virtual(&Module_Process))
400  .def("Run", py::pure_virtual(&Module_Process))
401  .def("Create", py::raw_function(Module_Create<MODTYPE>))
402  .staticmethod("Create");
403 
405  }
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().