Belle II Software  release-08-01-10
ModuleProxyBase Class Referenceabstract

The base module proxy class is used to create new instances of a module. More...

#include <Module.h>

Collaboration diagram for ModuleProxyBase:

Public Member Functions

 ModuleProxyBase (std::string moduleType, std::string package)
 The constructor of the ModuleProxyBase class. More...
 
virtual ~ModuleProxyBase ()
 The destructor of the ModuleProxyBase class.
 
ModulePtr createModule () const
 Abstract method which creates a new module and returns a shared pointer to it. More...
 
const std::string & getModuleName () const
 Returns the module name of the module associated to this proxy.
 

Protected Member Functions

virtual ModulecreateInstance () const =0
 create a new instance of the module in question
 

Protected Attributes

std::string m_moduleType
 The type name of the module. More...
 
std::string m_package
 Package this module is found in (may be empty).
 

Detailed Description

The base module proxy class is used to create new instances of a module.

By loading a shared library, which contains modules, the proxy class of each module is automatically registered to the global ModuleManager. If an instance of a module is required, its proxy class is responsible to create an instance of the module.

Definition at line 597 of file Module.h.

Constructor & Destructor Documentation

◆ ModuleProxyBase()

ModuleProxyBase ( std::string  moduleType,
std::string  package 
)

The constructor of the ModuleProxyBase class.

The constructor registers the proxy to the ModuleManager.

Parameters
moduleTypeThe type name of the module.
packagethe package which contains the module

Definition at line 497 of file Module.cc.

Member Function Documentation

◆ createModule()

ModulePtr createModule ( ) const
inline

Abstract method which creates a new module and returns a shared pointer to it.

Instances of modules can only be created by this method.

Returns
A shared pointer to the created module instance.

Definition at line 618 of file Module.h.

Member Data Documentation

◆ m_moduleType

std::string m_moduleType
protected

The type name of the module.

(without trailing "Module")

Definition at line 637 of file Module.h.


The documentation for this class was generated from the following files: