QxOrm  1.4.2
C++ Object Relational Mapping library

qx::QxFactoryX : list of all classes registered with QxOrm library factory pattern to create object instance dynamically using the class name More...

#include <QxFactoryX.h>

Inheritance diagram for qx::QxFactoryX:
qx::QxSingleton< QxFactoryX > qx::IxSingleton

List of all members.

Protected Attributes

QHash< QString, IxFactory * > m_mapFactoryX
 Collection of all 'IxFactory' pointer.
QMutex m_oMutexFactoryX
 Mutex -> 'QxFactoryX' is thread-safe.

Private Member Functions

 QxFactoryX ()
virtual ~QxFactoryX ()
QHash< QString, IxFactory * > * getAllFactory ()
void registerFactory (const QString &sKey, IxFactory *pFactory)
void unregisterFactory (const QString &sKey)
boost::any createObject (const QString &sKey) const
void * createObjectNudePtr (const QString &sKey) const
const std::type_info & typeInfo (const QString &sKey) const

Static Private Member Functions

static boost::any createInstance (const QString &sKey)
static void * createInstanceNudePtr (const QString &sKey)
static const std::type_info & getTypeInfo (const QString &sKey)

Friends

class QxClassX
class IxFactory
class QxSingleton< QxFactoryX >
boost::any create (const QString &sKey)
 Return a smart-pointer new instance of object (qx_shared_ptr<T>) associated by key sKey using boost::any type (for example : qx::create("drug") return a new instance of smart-pointer drug class into boost::any type)
template<typename T >
T * create_nude_ptr (const QString &sKey)
 Return a nude pointer (be careful with memory leak) of type T associated by key sKey, or return NULL if sKey is not registered into factory engine.
void * create_void_ptr (const QString &sKey)
 Return a void * pointer (be careful with memory leak) associated by key sKey, or return NULL if sKey is not registered into factory engine.

Detailed Description

qx::QxFactoryX : list of all classes registered with QxOrm library factory pattern to create object instance dynamically using the class name

Definition at line 67 of file QxFactoryX.h.


Constructor & Destructor Documentation

qx::QxFactoryX::QxFactoryX ( ) [inline, private]

Definition at line 84 of file QxFactoryX.h.

virtual qx::QxFactoryX::~QxFactoryX ( ) [inline, private, virtual]

Definition at line 85 of file QxFactoryX.h.


Member Function Documentation

static boost::any qx::QxFactoryX::createInstance ( const QString &  sKey) [inline, static, private]

Definition at line 99 of file QxFactoryX.h.

static void* qx::QxFactoryX::createInstanceNudePtr ( const QString &  sKey) [inline, static, private]

Definition at line 100 of file QxFactoryX.h.

boost::any qx::QxFactoryX::createObject ( const QString &  sKey) const [private]
void* qx::QxFactoryX::createObjectNudePtr ( const QString &  sKey) const [private]
QHash<QString, IxFactory *>* qx::QxFactoryX::getAllFactory ( ) [inline, private]

Definition at line 87 of file QxFactoryX.h.

static const std::type_info& qx::QxFactoryX::getTypeInfo ( const QString &  sKey) [inline, static, private]

Definition at line 103 of file QxFactoryX.h.

void qx::QxFactoryX::registerFactory ( const QString &  sKey,
IxFactory pFactory 
) [private]
const std::type_info& qx::QxFactoryX::typeInfo ( const QString &  sKey) const [private]
void qx::QxFactoryX::unregisterFactory ( const QString &  sKey) [private]

Friends And Related Function Documentation

boost::any create ( const QString &  sKey) [friend]

Return a smart-pointer new instance of object (qx_shared_ptr<T>) associated by key sKey using boost::any type (for example : qx::create("drug") return a new instance of smart-pointer drug class into boost::any type)

template<typename T >
T* create_nude_ptr ( const QString &  sKey) [friend]

Return a nude pointer (be careful with memory leak) of type T associated by key sKey, or return NULL if sKey is not registered into factory engine.

void* create_void_ptr ( const QString &  sKey) [friend]

Return a void * pointer (be careful with memory leak) associated by key sKey, or return NULL if sKey is not registered into factory engine.

friend class IxFactory [friend]

Definition at line 71 of file QxFactoryX.h.

friend class QxClassX [friend]

Definition at line 70 of file QxFactoryX.h.

friend class QxSingleton< QxFactoryX > [friend]

Definition at line 72 of file QxFactoryX.h.


Member Data Documentation

QHash<QString, IxFactory *> qx::QxFactoryX::m_mapFactoryX [protected]

Collection of all 'IxFactory' pointer.

Definition at line 79 of file QxFactoryX.h.

Mutex -> 'QxFactoryX' is thread-safe.

Definition at line 80 of file QxFactoryX.h.


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