OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::FactoryRegistrarTemplate< FactoryType, CreatedType > Class Template Reference

The FactoryRegistrarTemplate may be used to register a constructor at the factory. More...

#include "FactoryTemplate.h"

Public Member Functions

 FactoryRegistrarTemplate (const std::string &_key)
 Constructor.
 
virtual ~FactoryRegistrarTemplate ()
 Destructor. When called the constructor will be deregistered from the factory.
 
const std::string & getKey (void) const
 Get the constructor key.
 

Detailed Description

template<class FactoryType, typename CreatedType>
class ot::FactoryRegistrarTemplate< FactoryType, CreatedType >

The FactoryRegistrarTemplate may be used to register a constructor at the factory.

Note
Note that the factory used to register at must have a public static instance method which returns a reference to the factory instance.
Template Parameters
KeyTypeThe type of the key used to store and later acces the constructor.
FactoryTypeThe factory that is used to register.
CreatedTypeThe type of the created instance.

Constructor & Destructor Documentation

◆ FactoryRegistrarTemplate()

template<class FactoryType , typename CreatedType >
ot::FactoryRegistrarTemplate< FactoryType, CreatedType >::FactoryRegistrarTemplate ( const std::string & _key)

Constructor.

Parameters
_keyThe key for the constructor that is used to register at the factory.

◆ ~FactoryRegistrarTemplate()

template<class FactoryType , typename CreatedType >
ot::FactoryRegistrarTemplate< FactoryType, CreatedType >::~FactoryRegistrarTemplate ( )
virtual

Destructor. When called the constructor will be deregistered from the factory.

Member Function Documentation

◆ getKey()

template<class FactoryType , typename CreatedType >
const std::string & ot::FactoryRegistrarTemplate< FactoryType, CreatedType >::getKey ( void ) const
inline

Get the constructor key.


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