Loki::Factory< AbstractProduct, IdentifierType, CreatorParmTList, FactoryErrorPolicy > Class Template Reference
[Factory]

#include <Factory.h>

Collaboration diagram for Loki::Factory< AbstractProduct, IdentifierType, CreatorParmTList, FactoryErrorPolicy >:

[legend]
List of all members.

Public Member Functions

 Factory ()
 ~Factory ()
bool Register (const IdentifierType &id, ProductCreator creator)
template<class PtrObj, typename CreaFn>
bool Register (const IdentifierType &id, const PtrObj &p, CreaFn fn)
bool Unregister (const IdentifierType &id)
std::vector< IdentifierType > RegisteredIds ()
AbstractProduct * CreateObject (const IdentifierType &id)
AbstractProduct * CreateObject (const IdentifierType &id, Parm1 p1)
AbstractProduct * CreateObject (const IdentifierType &id, Parm1 p1, Parm2 p2)
AbstractProduct * CreateObject (const IdentifierType &id, Parm1 p1, Parm2 p2, Parm3 p3)
AbstractProduct * CreateObject (const IdentifierType &id, Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
AbstractProduct * CreateObject (const IdentifierType &id, Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
AbstractProduct * CreateObject (const IdentifierType &id, Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6)
AbstractProduct * CreateObject (const IdentifierType &id, Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7)
AbstractProduct * CreateObject (const IdentifierType &id, Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7, Parm8 p8)
AbstractProduct * CreateObject (const IdentifierType &id, Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
AbstractProduct * CreateObject (const IdentifierType &id, Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10)
AbstractProduct * CreateObject (const IdentifierType &id, Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11)
AbstractProduct * CreateObject (const IdentifierType &id, Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11, Parm12 p12)
AbstractProduct * CreateObject (const IdentifierType &id, Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11, Parm12 p12, Parm13 p13)
AbstractProduct * CreateObject (const IdentifierType &id, Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11, Parm12 p12, Parm13 p13, Parm14 p14)
AbstractProduct * CreateObject (const IdentifierType &id, Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11, Parm12 p12, Parm13 p13, Parm14 p14, Parm15 p15)

Detailed Description

template<class AbstractProduct, typename IdentifierType, typename CreatorParmTList = NullType, template< typename, class > class FactoryErrorPolicy = DefaultFactoryError>
class Loki::Factory< AbstractProduct, IdentifierType, CreatorParmTList, FactoryErrorPolicy >

Implements a generic object factory.

Create functions can have up to 15 parameters.

Singleton lifetime when used with Loki::SingletonHolder
Because Factory uses internally Functors which inherits from SmallObject you must use the singleton lifetime Alternatively you could suppress for Functor the inheritance from SmallObject by defining the macro:
 LOKI_FUNCTOR_IS_NOT_A_SMALLOBJECT 

Definition at line 752 of file Factory.h.


The documentation for this class was generated from the following file:
Generated on Sun Feb 25 16:52:37 2007 for Loki by  doxygen 1.5.1-p1