QxOrm 1.4.9
C++ Object Relational Mapping library
Loading...
Searching...
No Matches

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

Protected Attributes

QHash< QString, IxFactory * > m_mapFactoryX
 Collection of all 'IxFactory' pointer.
 
QMutex m_oMutexFactoryX
 Mutex -> 'QxFactoryX' is thread-safe.
 
- Protected Attributes inherited from qx::IxSingleton
QString m_sKeySingleton
 Singleton key used by 'QxSingletonX' container.
 

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=false)
 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.
 

Additional Inherited Members

- Static Public Member Functions inherited from qx::QxSingleton< QxFactoryX >
static QxFactoryXgetSingleton ()
 
static void deleteSingleton ()
 
- Protected Member Functions inherited from qx::QxSingleton< QxFactoryX >
 QxSingleton (const QString &sKey)
 
virtual ~QxSingleton ()
 
virtual void deleteInstance ()
 
- Protected Member Functions inherited from qx::IxSingleton
 IxSingleton (const QString &sKey)
 
virtual ~IxSingleton ()
 
- Static Protected Member Functions inherited from qx::QxSingleton< QxFactoryX >
static bool isSingletonNull ()
 
- Static Protected Member Functions inherited from qx::IxSingleton
static void initQxSingletonX ()
 

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

◆ QxFactoryX()

qx::QxFactoryX::QxFactoryX ( )
inlineprivate

Definition at line 82 of file QxFactoryX.h.

◆ ~QxFactoryX()

virtual qx::QxFactoryX::~QxFactoryX ( )
inlineprivatevirtual

Definition at line 83 of file QxFactoryX.h.

Member Function Documentation

◆ createInstance()

static qx::any qx::QxFactoryX::createInstance ( const QString & sKey,
bool bRawPointer = false )
inlinestaticprivate

Definition at line 97 of file QxFactoryX.h.

◆ createInstanceNudePtr()

static void * qx::QxFactoryX::createInstanceNudePtr ( const QString & sKey)
inlinestaticprivate

Definition at line 98 of file QxFactoryX.h.

◆ createObject()

qx::any qx::QxFactoryX::createObject ( const QString & sKey,
bool bRawPointer = false ) const
private

◆ createObjectNudePtr()

void * qx::QxFactoryX::createObjectNudePtr ( const QString & sKey) const
private

◆ getAllFactory()

QHash< QString, IxFactory * > * qx::QxFactoryX::getAllFactory ( )
inlineprivate

Definition at line 85 of file QxFactoryX.h.

◆ getTypeInfo()

static const std::type_info & qx::QxFactoryX::getTypeInfo ( const QString & sKey)
inlinestaticprivate

Definition at line 101 of file QxFactoryX.h.

◆ registerFactory()

void qx::QxFactoryX::registerFactory ( const QString & sKey,
IxFactory * pFactory )
private

◆ typeInfo()

const std::type_info & qx::QxFactoryX::typeInfo ( const QString & sKey) const
private

◆ unregisterFactory()

void qx::QxFactoryX::unregisterFactory ( const QString & sKey)
private

Friends And Related Symbol Documentation

◆ create

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)

Definition at line 110 of file QxFactoryX.h.

◆ create_nude_ptr

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.

Definition at line 118 of file QxFactoryX.h.

◆ create_void_ptr

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.

Definition at line 129 of file QxFactoryX.h.

◆ IxFactory

friend class IxFactory
friend

Definition at line 69 of file QxFactoryX.h.

◆ QxClassX

friend class QxClassX
friend

Definition at line 68 of file QxFactoryX.h.

◆ QxSingleton< QxFactoryX >

friend class QxSingleton< QxFactoryX >
friend

Definition at line 69 of file QxFactoryX.h.

Member Data Documentation

◆ m_mapFactoryX

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

Collection of all 'IxFactory' pointer.

Definition at line 77 of file QxFactoryX.h.

◆ m_oMutexFactoryX

QMutex qx::QxFactoryX::m_oMutexFactoryX
protected

Mutex -> 'QxFactoryX' is thread-safe.

Definition at line 78 of file QxFactoryX.h.


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