QxOrm 1.4.9
C++ Object Relational Mapping library
Loading...
Searching...
No Matches
qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner > Class Template Reference

#include <QxDataMember_PImpl.h>

Inheritance diagram for qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >:
qx::IxDataMember qx::QxPropertyBag

Public Member Functions

 QxDataMember_PImpl (type_data_member_ptr pData, const QString &sKey)
 
virtual ~QxDataMember_PImpl ()
 
virtual bool isEqual (const void *pOwner1, const void *pOwner2) const Q_DECL_OVERRIDE
 
virtual QVariant toVariant (const void *pOwner, const QString &sFormat, int iIndexName=-1, qx::cvt::context::ctx_type ctx=qx::cvt::context::e_no_context) const Q_DECL_OVERRIDE
 
virtual qx_bool fromVariant (void *pOwner, const QVariant &v, const QString &sFormat, int iIndexName=-1, qx::cvt::context::ctx_type ctx=qx::cvt::context::e_no_context) Q_DECL_OVERRIDE
 
virtual QString getType () const Q_DECL_OVERRIDE
 
virtual QJsonValue toJson (const void *pOwner, const QString &sFormat) const Q_DECL_OVERRIDE
 
virtual qx_bool fromJson (void *pOwner, const QJsonValue &j, const QString &sFormat) Q_DECL_OVERRIDE
 
- Public Member Functions inherited from qx::IxDataMember
 IxDataMember (const QString &sKey, long lVersion, bool bSerialize, bool bDao, IxDataMember *pImpl)
 
virtual ~IxDataMember ()=0
 
QString getKey () const
 
QString getName () const
 
int getNameCount () const
 
QString getNameParent () const
 
const char * getNamePtr () const
 
QString getDescription () const
 
QString getFormat () const
 
long getVersion () const
 
bool getSerialize () const
 
bool getDao () const
 
QVariant getDefaultValue () const
 
QVariant getMinValue () const
 
QVariant getMaxValue () const
 
int getPrecision () const
 
int getMinLength () const
 
int getMaxLength () const
 
bool getRequired () const
 
bool getReadOnly () const
 
bool getAutoIncrement () const
 
bool getNotNull () const
 
bool getIsPrimaryKey () const
 
bool getIsIndex () const
 
bool getIsUnique () const
 
IxDataMemberXgetParent () const
 
IxSqlRelationgetSqlRelation () const
 
bool hasSqlRelation () const
 
bool getAccessDataPointer () const
 
QString getTypeParent () const
 
IxDataMembergetPImpl () const
 
void setName (const QString &s)
 
void setNameParent (const QString &s)
 
void setDescription (const QString &s)
 
void setFormat (const QString &s)
 
void setSqlType (const QString &s)
 
void setSqlAlias (const QString &s)
 
void setVersion (long l)
 
void setSerialize (bool b)
 
void setDao (bool b)
 
void setDefaultValue (const QVariant &v)
 
void setPrecision (int i)
 
void setRequired (bool b)
 
void setReadOnly (bool b)
 
void setAutoIncrement (bool b)
 
void setIsPrimaryKey (bool b)
 
void setIsIndex (bool b)
 
void setIsUnique (bool b)
 
void setParent (IxDataMemberX *p)
 
void setSqlRelation (IxSqlRelation *p)
 
void setAccessDataPointer (bool b)
 
void setMinValue (long lMinValue, const QString &sMessage=QString())
 
void setMinValue (double dMinValue, const QString &sMessage=QString())
 
void setMaxValue (long lMaxValue, const QString &sMessage=QString())
 
void setMaxValue (double dMaxValue, const QString &sMessage=QString())
 
void setMinLength (int iMinLength, const QString &sMessage=QString())
 
void setMaxLength (int iMaxLength, const QString &sMessage=QString())
 
void setNotNull (bool bNotNull, const QString &sMessage=QString())
 
bool isThereRelationPartOfPrimaryKey (int iIndexNamePK, IxSqlRelation *&pRelation, int &iIndexNameFK) const
 
bool isPartOfPrimaryKey (int iIndexNameFK, IxDataMember *&pPrimaryKey, int &iIndexNamePK) const
 
void setRelationPartOfPrimaryKey (int iIndexNamePK, IxSqlRelation *pRelation, int iIndexNameFK)
 
void setPartOfPrimaryKey (int iIndexNameFK, IxDataMember *pPrimaryKey, int iIndexNamePK)
 
QString getName (int iIndex, const QString &sOtherName=QString()) const
 
QString getSqlAlias (const QString &sTable=QString(), bool bClauseWhere=false, int iIndexName=0, qx::IxSqlQueryBuilder *pSqlQueryBuilder=NULL) const
 
QString getSqlType (int iIndexName=-1) const
 
QString getSqlTypeAndParams (int iIndexName=-1) const
 
QString getSqlPlaceHolder (const QString &sAppend=QString(), int iIndexName=0, const QString &sSep=QString(", "), const QString &sOtherName=QString(), bool bCheckFKPartOfPK=false) const
 
void setSqlPlaceHolder (QSqlQuery &query, void *pOwner, const QString &sAppend=QString(), const QString &sOtherName=QString(), bool bCheckFKPartOfPK=false, qx::QxCollection< QString, QVariantList > *pLstExecBatch=NULL) const
 
QString getSqlAliasEqualToPlaceHolder (const QString &sTable=QString(), bool bClauseWhere=false, const QString &sAppend=QString(), const QString &sSep=QString(" AND "), bool bCheckFKPartOfPK=false, qx::IxSqlQueryBuilder *pSqlQueryBuilder=NULL) const
 
QString getSqlNameEqualToPlaceHolder (const QString &sAppend=QString(), const QString &sSep=QString(" AND "), bool bCheckFKPartOfPK=false, qx::IxSqlQueryBuilder *pSqlQueryBuilder=NULL) const
 
QString getSqlTablePointNameAsAlias (const QString &sTable, const QString &sSep=QString(", "), const QString &sSuffixAlias=QString(), bool bCheckFKPartOfPK=false, const QString &sCustomAlias=QString(), qx::IxSqlQueryBuilder *pSqlQueryBuilder=NULL) const
 
QString getSqlName (const QString &sSep=QString(", "), const QString &sOtherName=QString(), bool bCheckFKPartOfPK=false, qx::IxSqlQueryBuilder *pSqlQueryBuilder=NULL) const
 
QString getSqlNameAndTypeAndParams (const QString &sSep=QString(", "), const QString &sOtherName=QString(), bool bCheckFKPartOfPK=false) const
 
void customGetSqlName (type_fct_sql_callback fct)
 
void customGetSqlTablePointNameAsAlias (type_fct_sql_callback fct)
 
void customGetSqlNameEqualToPlaceHolder (type_fct_sql_callback fct)
 
void customGetSqlAliasEqualToPlaceHolder (type_fct_sql_callback fct)
 
void customGetSqlAlias (type_fct_sql_callback fct)
 
QVariant toVariant (const void *pOwner, int iIndexName=-1, qx::cvt::context::ctx_type ctx=qx::cvt::context::e_no_context) const
 
qx_bool fromVariant (void *pOwner, const QVariant &v, int iIndexName=-1, qx::cvt::context::ctx_type ctx=qx::cvt::context::e_no_context)
 
QJsonValue toJson (const void *pOwner) const
 
qx_bool fromJson (void *pOwner, const QJsonValue &j)
 
qx::any getValueAnyPtr (const void *pOwner) const
 
qx::any getValueAnyPtr (void *pOwner)
 
void * getValueVoidPtr (const void *pOwner) const
 
void * getValueVoidPtr (void *pOwner)
 
template<typename T >
T * getValuePtr (void *pOwner, bool *bOk=NULL)
 
template<typename T >
getValue (void *pOwner, bool *bOk=NULL)
 
template<typename T >
bool setValue (void *pOwner, const T &val)
 
- Public Member Functions inherited from qx::QxPropertyBag
 QxPropertyBag ()
 
virtual ~QxPropertyBag ()
 
void setPropertyBag (const QString &key, const QVariant &value)
 
QVariant getPropertyBag (const QString &key) const
 
void removePropertyBag (const QString &key)
 
void clearPropertyBag ()
 
long countPropertyBag () const
 
QList< QString > getAllPropertyBagKeys () const
 

Protected Types

typedef std::unique_ptr< DataType > Owner::* type_data_member_ptr
 
- Protected Types inherited from qx::QxPropertyBag
typedef QHash< QString, QVariant > type_hash_prop_bag
 
typedef std::shared_ptr< type_hash_prop_bagtype_hash_prop_bag_ptr
 

Protected Member Functions

std::unique_ptr< DataType > * getData (void *pOwner) const
 
const std::unique_ptr< DataType > * getData (const void *pOwner) const
 
virtual qx::any getDataPtr (const void *pOwner) const Q_DECL_FINAL
 
virtual qx::any getDataPtr (void *pOwner) Q_DECL_FINAL
 
virtual void * getDataVoidPtr (const void *pOwner) const Q_DECL_FINAL
 
virtual void * getDataVoidPtr (void *pOwner) Q_DECL_FINAL
 

Protected Attributes

type_data_member_ptr m_pData
 Data member under format "& Owner::DataMember".
 
- Protected Attributes inherited from qx::QxPropertyBag
type_hash_prop_bag_ptr m_lstPropertyBag
 List of all properties in the bag (meta-data)
 

Additional Inherited Members

- Public Types inherited from qx::IxDataMember
typedef std::function< void(IxDataMemberSqlCallbackParams &)> type_fct_sql_callback
 
- Static Public Member Functions inherited from qx::IxDataMember
static QString getSqlFromTable (const QString &sTable, const QString &sCustomAlias=QString())
 
static QString getSqlTableName (const QString &sTable)
 
static QString getSqlColumnName (const QString &sColumn)
 
static QString getSqlTableNameAlias (const QString &sTable)
 
static QString getSqlColumnNameAlias (const QString &sColumn)
 

Detailed Description

template<typename DataType, class Owner>
class qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >

Definition at line 134 of file QxDataMember_PImpl.h.

Member Typedef Documentation

◆ type_data_member_ptr

template<typename DataType , class Owner >
typedef std::unique_ptr<DataType> Owner::* qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >::type_data_member_ptr
protected

Definition at line 139 of file QxDataMember_PImpl.h.

Constructor & Destructor Documentation

◆ QxDataMember_PImpl()

template<typename DataType , class Owner >
qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >::QxDataMember_PImpl ( type_data_member_ptr pData,
const QString & sKey )
inline

Definition at line 145 of file QxDataMember_PImpl.h.

◆ ~QxDataMember_PImpl()

template<typename DataType , class Owner >
virtual qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >::~QxDataMember_PImpl ( )
inlinevirtual

Definition at line 146 of file QxDataMember_PImpl.h.

Member Function Documentation

◆ fromJson()

template<typename DataType , class Owner >
virtual qx_bool qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >::fromJson ( void * pOwner,
const QJsonValue & j,
const QString & sFormat )
inlinevirtual

Implements qx::IxDataMember.

Definition at line 155 of file QxDataMember_PImpl.h.

◆ fromVariant()

template<typename DataType , class Owner >
virtual qx_bool qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >::fromVariant ( void * pOwner,
const QVariant & v,
const QString & sFormat,
int iIndexName = -1,
qx::cvt::context::ctx_type ctx = qx::cvt::context::e_no_context )
inlinevirtual

Implements qx::IxDataMember.

Definition at line 150 of file QxDataMember_PImpl.h.

◆ getData() [1/2]

template<typename DataType , class Owner >
const std::unique_ptr< DataType > * qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >::getData ( const void * pOwner) const
inlineprotected

Definition at line 161 of file QxDataMember_PImpl.h.

◆ getData() [2/2]

template<typename DataType , class Owner >
std::unique_ptr< DataType > * qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >::getData ( void * pOwner) const
inlineprotected

Definition at line 160 of file QxDataMember_PImpl.h.

◆ getDataPtr() [1/2]

template<typename DataType , class Owner >
virtual qx::any qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >::getDataPtr ( const void * pOwner) const
inlineprotectedvirtual

Implements qx::IxDataMember.

Definition at line 163 of file QxDataMember_PImpl.h.

◆ getDataPtr() [2/2]

template<typename DataType , class Owner >
virtual qx::any qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >::getDataPtr ( void * pOwner)
inlineprotectedvirtual

Implements qx::IxDataMember.

Definition at line 164 of file QxDataMember_PImpl.h.

◆ getDataVoidPtr() [1/2]

template<typename DataType , class Owner >
virtual void * qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >::getDataVoidPtr ( const void * pOwner) const
inlineprotectedvirtual

Implements qx::IxDataMember.

Definition at line 165 of file QxDataMember_PImpl.h.

◆ getDataVoidPtr() [2/2]

template<typename DataType , class Owner >
virtual void * qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >::getDataVoidPtr ( void * pOwner)
inlineprotectedvirtual

Implements qx::IxDataMember.

Definition at line 166 of file QxDataMember_PImpl.h.

◆ getType()

template<typename DataType , class Owner >
virtual QString qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >::getType ( ) const
inlinevirtual

Reimplemented from qx::IxDataMember.

Definition at line 151 of file QxDataMember_PImpl.h.

◆ isEqual()

template<typename DataType , class Owner >
virtual bool qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >::isEqual ( const void * pOwner1,
const void * pOwner2 ) const
inlinevirtual

Implements qx::IxDataMember.

Definition at line 148 of file QxDataMember_PImpl.h.

◆ toJson()

template<typename DataType , class Owner >
virtual QJsonValue qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >::toJson ( const void * pOwner,
const QString & sFormat ) const
inlinevirtual

Implements qx::IxDataMember.

Definition at line 154 of file QxDataMember_PImpl.h.

◆ toVariant()

template<typename DataType , class Owner >
virtual QVariant qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >::toVariant ( const void * pOwner,
const QString & sFormat,
int iIndexName = -1,
qx::cvt::context::ctx_type ctx = qx::cvt::context::e_no_context ) const
inlinevirtual

Implements qx::IxDataMember.

Definition at line 149 of file QxDataMember_PImpl.h.

Member Data Documentation

◆ m_pData

template<typename DataType , class Owner >
type_data_member_ptr qx::QxDataMember_PImpl< std::unique_ptr< DataType >, Owner >::m_pData
protected

Data member under format "& Owner::DataMember".

Definition at line 141 of file QxDataMember_PImpl.h.


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