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

Constructor & Destructor Documentation

◆ PythonModuleClass()

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

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

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