ICF 3.1.1.10
Technical documentation of ICF Libraries
istd::TComposedFactory< InterfaceType > Class Template Reference

Standard generic implementation of the composed factory. More...

#include <TComposedFactory.h>

Inheritance diagram for istd::TComposedFactory< InterfaceType >:
Collaboration diagram for istd::TComposedFactory< InterfaceType >:

Public Types

typedef TIFactory< InterfaceType > FactoryInterface
 
- Public Types inherited from istd::TIFactory< InterfaceType >
typedef InterfaceType InterfaceType
 
- Public Types inherited from istd::IFactoryInfo
typedef QSet< QByteArray > KeyList
 

Public Member Functions

bool RegisterFactory (istd::TOptDelPtr< FactoryInterface > &&factoryPtr)
 Registers object factory factoryPtr that will be mapped to the keyId.
 
virtual IFactoryInfo::KeyList GetFactoryKeys () const
 Returns all posible keys for this factory.
 
virtual std::unique_ptr< InterfaceType > CreateInstance (const QByteArray &keyId="") const
 Create an instance of the object, mapped to the keyId keyId.
 
- Public Member Functions inherited from istd::TIFactory< InterfaceType >
- Public Member Functions inherited from istd::IFactoryInfo

Protected Types

typedef istd::TOptDelPtr< FactoryInterface > FactoryPtr
 
typedef std::vector< FactoryPtr > FactoryList
 

Protected Attributes

FactoryList m_factoryList
 

Detailed Description

template<class InterfaceType>
class istd::TComposedFactory< InterfaceType >

Standard generic implementation of the composed factory.

Definition at line 25 of file TComposedFactory.h.

Member Typedef Documentation

◆ FactoryInterface

Definition at line 28 of file TComposedFactory.h.

◆ FactoryList

template<class InterfaceType >
std::vector<FactoryPtr> istd::TComposedFactory< InterfaceType >::FactoryList
protected

Definition at line 45 of file TComposedFactory.h.

◆ FactoryPtr

Definition at line 44 of file TComposedFactory.h.

Member Function Documentation

◆ CreateInstance()

template<class InterfaceType >
std::unique_ptr< InterfaceType > istd::TComposedFactory< InterfaceType >::CreateInstance ( const QByteArray & keyId = "") const
virtual

Create an instance of the object, mapped to the keyId keyId.

Parameters
keyId
Returns
pointer to created object or nullptr if it was not possible to create it or keyId does not exist.

Implements istd::TIFactory< InterfaceType >.

Definition at line 90 of file TComposedFactory.h.

◆ GetFactoryKeys()

template<class InterfaceType >
IFactoryInfo::KeyList istd::TComposedFactory< InterfaceType >::GetFactoryKeys ( ) const
virtual

Returns all posible keys for this factory.

Implements istd::IFactoryInfo.

Definition at line 71 of file TComposedFactory.h.

◆ RegisterFactory()

template<class InterfaceType >
bool istd::TComposedFactory< InterfaceType >::RegisterFactory ( istd::TOptDelPtr< FactoryInterface > && factoryPtr)

Registers object factory factoryPtr that will be mapped to the keyId.

Parameters
factoryPtrpointer to slave factory object. It cannot be nullptr.

Definition at line 54 of file TComposedFactory.h.

Referenced by ilog::CMessageContainer::RegisterMessageType().

Member Data Documentation

◆ m_factoryList

template<class InterfaceType >
FactoryList istd::TComposedFactory< InterfaceType >::m_factoryList
protected

Definition at line 47 of file TComposedFactory.h.


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

© Witold Gantzke and Kirill Lepskiy