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 Process (po::variables_map &vm) override
 Concrete implementation of the Module::Process function. More...
 
std::string GetModuleName () override
 
ModulePriority 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:134

◆ GetModuleName()

template<class MODTYPE >
std::string ModuleWrap< MODTYPE >::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  }

◆ GetModulePriority()

template<class MODTYPE >
ModulePriority ModuleWrap< MODTYPE >::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  }

◆ Process()

template<class MODTYPE >
void ModuleWrap< MODTYPE >::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  }