IModuleBase Class Referenceabstract

Abstract base class of all opals modules. More...

#include "IModuleBase.hpp"

+ Inheritance diagram for IModuleBase:

Public Member Functions

virtual ~IModuleBase ()
 Make sure to delete instances after use with Delete()
virtual void Delete ()=0
 Destroy modules allocated on the heap. More...
virtual ParamList run (bool reset=false)=0
virtual void reset ()=0
 Resets the module to the state after construction.
virtual opals::String name () const =0
 Returns the module name.
virtual opals::String version () const =0
 Returns the module version.
virtual opals::String special_build () const =0
 Returns the special build version.
virtual opals::String compilation_date_time () const =0
 Returns a string representing the compilation date and time.
virtual void mapParams (const ParamList &paramList)=0
 Sets module parameters from paramList according to parameter "paramMapping".
virtual void set_controlObject (IControlObject &obj)=0
 Sets control object for retrieving status information during processing.
virtual void unset_controlObject ()=0
 remove control object from the message queue
Access global options: present in all modules.
virtual opts::glob::Optionsglobals ()=0
virtual const opts::glob::Optionsglobals () const =0
Access common options: present in all modules.
virtual opts::comm::Optionscommons ()=0
virtual const opts::comm::Optionscommons () const =0
Access the base type of module-specific options.
virtual opts::IBaseoptsBase ()=0
virtual const opts::IBaseoptsBase () const =0

Detailed Description

Abstract base class of all opals modules.

Member Function Documentation

◆ Delete()

virtual void Delete ( )
pure virtual

Destroy modules allocated on the heap.

Make sure to delete instances after use in order to avoid memory leaks. This is done automatically when using std::shared_ptr in combination with opals::ModuleDeleter to manage memory, e.g.:

std::shared_ptr< opals::IModuleBase > module( opals::IImport::New(), opals::ModuleDeleter() );

That way, Delete() is called automatically when the std::shared_ptr goes out of scope.

◆ run()

virtual ParamList run ( bool  reset = false)
pure virtual

Starts the actual module execution.

resetif true, calls reset() right after execution has finished, thereby closing any open (file-) handles.
A functor that may be used for memory management of modules allocated on the heap usage: e....
Definition: ModuleDeleter.hpp:15