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

Constructor & Destructor Documentation

◆ PythonModuleClass()

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

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

415 {
416 py::class_<ModuleWrap<MODTYPE>, std::shared_ptr<ModuleWrap<MODTYPE>>,
417 py::bases<Module>, boost::noncopyable>(
418 modName.c_str(), py::init<FieldSharedPtr>())
419
420 .def("AddConfigOption", ModuleWrap_AddConfigOption<MODTYPE>,
421 (py::arg("key"), py::arg("defValue"), py::arg("desc"),
422 py::arg("isBool") = false))
423
424 // Allow direct access to field object through a property.
425 .def_readwrite("field", &ModuleWrap<MODTYPE>::m_f)
426
427 // Process function for this module.
428 .def("Process", py::pure_virtual(&Module_Process))
429 .def("Run", py::pure_virtual(&Module_Process))
430 .def("Create", py::raw_function(Module_Create<MODTYPE>))
431 .staticmethod("Create");
432
434 }
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().