Public Types | Public Member Functions | List of all members
istd::TSingleFactory< Interface, Implementation > Class Template Reference

Template based object factory interface. More...

#include <TSingleFactory.h>

Inheritance diagram for istd::TSingleFactory< Interface, Implementation >:
istd::TIFactory< Interface > istd::IFactoryInfo istd::IPolymorphic

Public Types

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

Public Member Functions

 TSingleFactory (const QByteArray &keyId)
 
virtual IFactoryInfo::KeyList GetFactoryKeys () const
 Returns all posible keys for this factory. More...
 
virtual Interface * CreateInstance (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 ()
 

Detailed Description

template<class Interface, class Implementation>
class istd::TSingleFactory< Interface, Implementation >

Template based object factory interface.

Definition at line 20 of file TSingleFactory.h.

Member Typedef Documentation

template<class Interface , class Implementation >
typedef TIFactory<Interface> istd::TSingleFactory< Interface, Implementation >::FactoryInterface

Definition at line 24 of file TSingleFactory.h.

template<class Interface , class Implementation >
typedef Implementation istd::TSingleFactory< Interface, Implementation >::ImplementationType

Definition at line 23 of file TSingleFactory.h.

Constructor & Destructor Documentation

template<class Interface , class Implementation >
istd::TSingleFactory< Interface, Implementation >::TSingleFactory ( const QByteArray &  keyId)
explicit

Definition at line 42 of file TSingleFactory.h.

Member Function Documentation

template<class Interface , class Implementation >
Interface * istd::TSingleFactory< Interface, Implementation >::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< Interface >.

Definition at line 63 of file TSingleFactory.h.

References NULL.

template<class Interface , class Implementation >
IFactoryInfo::KeyList istd::TSingleFactory< Interface, Implementation >::GetFactoryKeys ( ) const
virtual

Returns all posible keys for this factory.

Implements istd::IFactoryInfo.

Definition at line 52 of file TSingleFactory.h.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy