QxOrm  1.4.5
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)
qx::any createObject (const QString &sKey, bool bRawPointer=false) const
void * createObjectNudePtr (const QString &sKey) const
const std::type_info & typeInfo (const QString &sKey) const

Static Private Member Functions

static qx::any createInstance (const QString &sKey, bool bRawPointer=false)
static void * createInstanceNudePtr (const QString &sKey)
static const std::type_info & getTypeInfo (const QString &sKey)

Friends

class QxClassX
class IxFactory
class QxSingleton< QxFactoryX >
qx::any create (const QString &sKey, bool bRawPointer)
 Return a smart-pointer new instance of object (std::shared_ptr<T>) associated by key sKey using qx::any type (for example : qx::create("drug") return a new instance of smart-pointer drug class into qx::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 65 of file QxFactoryX.h.


Constructor & Destructor Documentation

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

Definition at line 82 of file QxFactoryX.h.

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

Definition at line 83 of file QxFactoryX.h.


Member Function Documentation

static qx::any qx::QxFactoryX::createInstance ( const QString &  sKey,
bool  bRawPointer = false 
) [inline, static, private]

Definition at line 97 of file QxFactoryX.h.

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

Definition at line 98 of file QxFactoryX.h.

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

Definition at line 85 of file QxFactoryX.h.

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

Definition at line 101 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

qx::any create ( const QString &  sKey,
bool  bRawPointer = false 
) [friend]

Return a smart-pointer new instance of object (std::shared_ptr<T>) associated by key sKey using qx::any type (for example : qx::create("drug") return a new instance of smart-pointer drug class into qx::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 69 of file QxFactoryX.h.

friend class QxClassX [friend]

Definition at line 68 of file QxFactoryX.h.

friend class QxSingleton< QxFactoryX > [friend]

Definition at line 70 of file QxFactoryX.h.


Member Data Documentation

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

Collection of all 'IxFactory' pointer.

Definition at line 77 of file QxFactoryX.h.

Mutex -> 'QxFactoryX' is thread-safe.

Definition at line 78 of file QxFactoryX.h.


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