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

Module wrapper to handle virtual function calls in Module and its subclasses as defined by the template parameter. More...

Inheritance diagram for ModuleWrap< MODTYPE >:
[legend]

Public Member Functions

 ModuleWrap (FieldSharedPtr field)
 Constructor, which is identical to FieldUtils::Module. More...
 
void v_Process (po::variables_map &vm) override
 Concrete implementation of the Module::Process function. More...
 
std::string v_GetModuleName () override
 
ModulePriority v_GetModulePriority () override
 
void AddConfigOption (std::string key, std::string def, std::string desc, bool isBool)
 Defines a configuration option for this module. More...
 

Detailed Description

template<class MODTYPE>
struct ModuleWrap< MODTYPE >

Module wrapper to handle virtual function calls in Module and its subclasses as defined by the template parameter.

Template Parameters
MODTYPE.

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

Constructor & Destructor Documentation

◆ ModuleWrap()

template<class MODTYPE >
ModuleWrap< MODTYPE >::ModuleWrap ( FieldSharedPtr  field)
inline

Constructor, which is identical to FieldUtils::Module.

Parameters
fieldInput field.

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

60 : MODTYPE(field), py::wrapper<MODTYPE>()
61 {
62 }

Member Function Documentation

◆ AddConfigOption()

template<class MODTYPE >
void ModuleWrap< MODTYPE >::AddConfigOption ( std::string  key,
std::string  def,
std::string  desc,
bool  isBool 
)
inline

Defines a configuration option for this module.

Parameters
keyThe name of the configuration option.
defThe option's default value.
descA text description of the option.
isBoolIf true, this option is a boolean-type (true/false).

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

94 {
95 ConfigOption conf(isBool, def, desc);
96 this->m_config[key] = conf;
97 }
Represents a command-line configuration option.
Definition: Module.h:129

◆ v_GetModuleName()

template<class MODTYPE >
std::string ModuleWrap< MODTYPE >::v_GetModuleName ( )
inlineoverride

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

73 {
74 py::override f = this->get_override("GetModuleName");
75 return py::call<std::string>(f.ptr());
76 }

◆ v_GetModulePriority()

template<class MODTYPE >
ModulePriority ModuleWrap< MODTYPE >::v_GetModulePriority ( )
inlineoverride

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

79 {
80 py::override f = this->get_override("GetModulePriority");
81 return py::call<ModulePriority>(f.ptr());
82 }

◆ v_Process()

template<class MODTYPE >
void ModuleWrap< MODTYPE >::v_Process ( po::variables_map &  vm)
inlineoverride

Concrete implementation of the Module::Process function.

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

68 {
69 this->get_override("Process")();
70 }