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

55 : MODTYPE(field), py::wrapper<MODTYPE>()
56 {
57 }

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

89 {
90 ConfigOption conf(isBool, def, desc);
91 this->m_config[key] = conf;
92 }
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 67 of file Python/Module.cpp.

68 {
69 py::override f = this->get_override("GetModuleName");
70 return py::call<std::string>(f.ptr());
71 }

◆ v_GetModulePriority()

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

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

74 {
75 py::override f = this->get_override("GetModulePriority");
76 return py::call<ModulePriority>(f.ptr());
77 }

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

63 {
64 this->get_override("Process")();
65 }