Public Types | Public Member Functions | Protected Types | Protected Attributes | List of all members
istd::TComposedFactory< InterfaceType > Class Template Reference

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

#include <TComposedFactory.h>

Inheritance diagram for istd::TComposedFactory< InterfaceType >:
istd::TIFactory< InterfaceType > istd::IFactoryInfo istd::IPolymorphic

Public Types

typedef TIFactory< InterfaceTypeFactoryInterface
 
- 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 (FactoryInterface *factoryPtr, bool releaseFlag=false)
 Registers object factory factoryPtr that will be mapped to the keyId. More...
 
virtual IFactoryInfo::KeyList GetFactoryKeys () const
 Returns all posible keys for this factory. More...
 
virtual InterfaceTypeCreateInstance (const QByteArray &keyId="") const
 Create an instance of the object, mapped to the keyId keyId. More...
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Protected Types

typedef istd::TOptDelPtr
< FactoryInterface
FactoryPtr
 
typedef QList< FactoryPtrFactoryList
 

Protected Attributes

FactoryList m_factoryList
 

Detailed Description

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

Standard generic implementation of the composed factory.

Definition at line 21 of file TComposedFactory.h.

Member Typedef Documentation

template<class InterfaceType>
typedef TIFactory<InterfaceType> istd::TComposedFactory< InterfaceType >::FactoryInterface

Definition at line 24 of file TComposedFactory.h.

template<class InterfaceType>
typedef QList<FactoryPtr> istd::TComposedFactory< InterfaceType >::FactoryList
protected

Definition at line 42 of file TComposedFactory.h.

template<class InterfaceType>
typedef istd::TOptDelPtr<FactoryInterface> istd::TComposedFactory< InterfaceType >::FactoryPtr
protected

Definition at line 41 of file TComposedFactory.h.

Member Function Documentation

template<class InterfaceType >
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 NULL 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.

References NULL.

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

Returns all posible keys for this factory.

Implements istd::IFactoryInfo.

Definition at line 69 of file TComposedFactory.h.

template<class InterfaceType >
bool istd::TComposedFactory< InterfaceType >::RegisterFactory ( FactoryInterface factoryPtr,
bool  releaseFlag = false 
)

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

Parameters
factoryPtrpointer to slave factory object. It cannot be NULL.
releaseFlagif it is true, factory object will be automatically removed from memory.

Definition at line 51 of file TComposedFactory.h.

References istd::IFactoryInfo::GetFactoryKeys(), and NULL.

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

Member Data Documentation

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

Definition at line 44 of file TComposedFactory.h.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy