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

qx::QxDateTimeNeutral : helper class to store a date-time value into database under neutral format (YYYYMMDDHHMMSS) => cross database compatibility More...

#include <QxDateTimeNeutral.h>

Public Member Functions

 QxDateTimeNeutral ()
 
 QxDateTimeNeutral (const QDateTime &dt)
 
 QxDateTimeNeutral (const QString &neutral)
 
virtual ~QxDateTimeNeutral ()
 
QDateTime toDateTime () const
 
QString toNeutral () const
 
bool isValid () const
 
void setDateTime (const QDateTime &dt)
 
void setNeutral (const QString &neutral)
 

Static Public Member Functions

static QxDateTimeNeutral fromDateTime (const QDateTime &dt)
 
static QxDateTimeNeutral fromNeutral (const QString &neutral)
 

Private Member Functions

void update ()
 
template<class Archive >
void serialize (Archive &ar, const unsigned int file_version)
 

Static Private Member Functions

static const char * format ()
 

Private Attributes

QDateTime m_dt
 Data value under QDateTime format from Qt library.
 
QString m_neutral
 Data value under neutral format 'yyyyMMddhhmmss'.
 

Friends

class boost::serialization::access
 
QX_DLL_EXPORT QDataStream & operator<< (QDataStream &stream, const qx::QxDateTimeNeutral &t)
 
QX_DLL_EXPORT QDataStream & operator>> (QDataStream &stream, qx::QxDateTimeNeutral &t)
 

Detailed Description

qx::QxDateTimeNeutral : helper class to store a date-time value into database under neutral format (YYYYMMDDHHMMSS) => cross database compatibility

Definition at line 71 of file QxDateTimeNeutral.h.

Constructor & Destructor Documentation

◆ QxDateTimeNeutral() [1/3]

qx::QxDateTimeNeutral::QxDateTimeNeutral ( )
inline

Definition at line 88 of file QxDateTimeNeutral.h.

◆ QxDateTimeNeutral() [2/3]

qx::QxDateTimeNeutral::QxDateTimeNeutral ( const QDateTime & dt)
inlineexplicit

Definition at line 89 of file QxDateTimeNeutral.h.

◆ QxDateTimeNeutral() [3/3]

qx::QxDateTimeNeutral::QxDateTimeNeutral ( const QString & neutral)
inlineexplicit

Definition at line 90 of file QxDateTimeNeutral.h.

◆ ~QxDateTimeNeutral()

virtual qx::QxDateTimeNeutral::~QxDateTimeNeutral ( )
inlinevirtual

Definition at line 91 of file QxDateTimeNeutral.h.

Member Function Documentation

◆ format()

static const char * qx::QxDateTimeNeutral::format ( )
inlinestaticprivate

Definition at line 105 of file QxDateTimeNeutral.h.

◆ fromDateTime()

static QxDateTimeNeutral qx::QxDateTimeNeutral::fromDateTime ( const QDateTime & dt)
inlinestatic

Definition at line 100 of file QxDateTimeNeutral.h.

◆ fromNeutral()

static QxDateTimeNeutral qx::QxDateTimeNeutral::fromNeutral ( const QString & neutral)
inlinestatic

Definition at line 101 of file QxDateTimeNeutral.h.

◆ isValid()

bool qx::QxDateTimeNeutral::isValid ( ) const
inline

Definition at line 95 of file QxDateTimeNeutral.h.

◆ serialize()

template<class Archive >
void qx::QxDateTimeNeutral::serialize ( Archive & ar,
const unsigned int file_version )
inlineprivate

Definition at line 116 of file QxDateTimeNeutral.h.

◆ setDateTime()

void qx::QxDateTimeNeutral::setDateTime ( const QDateTime & dt)
inline

Definition at line 97 of file QxDateTimeNeutral.h.

◆ setNeutral()

void qx::QxDateTimeNeutral::setNeutral ( const QString & neutral)
inline

Definition at line 98 of file QxDateTimeNeutral.h.

◆ toDateTime()

QDateTime qx::QxDateTimeNeutral::toDateTime ( ) const
inline

Definition at line 93 of file QxDateTimeNeutral.h.

◆ toNeutral()

QString qx::QxDateTimeNeutral::toNeutral ( ) const
inline

Definition at line 94 of file QxDateTimeNeutral.h.

◆ update()

void qx::QxDateTimeNeutral::update ( )
inlineprivate

Definition at line 107 of file QxDateTimeNeutral.h.

Friends And Related Symbol Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 75 of file QxDateTimeNeutral.h.

◆ operator<<

QX_DLL_EXPORT QDataStream & operator<< ( QDataStream & stream,
const qx::QxDateTimeNeutral & t )
friend

◆ operator>>

QX_DLL_EXPORT QDataStream & operator>> ( QDataStream & stream,
qx::QxDateTimeNeutral & t )
friend

Member Data Documentation

◆ m_dt

QDateTime qx::QxDateTimeNeutral::m_dt
private

Data value under QDateTime format from Qt library.

Definition at line 83 of file QxDateTimeNeutral.h.

◆ m_neutral

QString qx::QxDateTimeNeutral::m_neutral
private

Data value under neutral format 'yyyyMMddhhmmss'.

Definition at line 84 of file QxDateTimeNeutral.h.


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