WORM 0.2
A C++ DAL/ORM code generation framework
|
The WSqlDatum class represents an abstraction of a data element retrieved from a database. More...
#include <wsqldatum.h>
Public Member Functions | |
WSqlDatum () | |
WSqlDatum (const WSqlDatum &other) | |
virtual | ~WSqlDatum () |
virtual WSqlDatum & | operator= (const WSqlDatum &other) |
virtual bool | operator== (const WSqlDatum &other) const |
bool | operator!= (const WSqlDatum &other) const |
template<typename T > | |
void | setData (const T t) |
template<typename T > | |
T | data () const |
short | toShort () const |
int | toInt () const |
long | toLong () const |
float | toFloat () const |
double | toDouble () const |
unsigned short | toUShort () const |
unsigned int | toUInt () const |
unsigned long | toULong () const |
std::string | toString () const |
void | clear () |
The WSqlDatum class represents an abstraction of a data element retrieved from a database.
This class provides a flexible type container for a single value found in a database column. It can be instatiated to hold the types supported by WSqlDataType. It includes methods for conversion to various types on demand.
Definition at line 28 of file wsqldatum.h.
WSql::WSqlDatum::WSqlDatum | ( | ) |
Definition at line 34 of file wsqldatum.cpp.
WSql::WSqlDatum::WSqlDatum | ( | const WSqlDatum & | other | ) |
Definition at line 38 of file wsqldatum.cpp.
WSql::WSqlDatum::~WSqlDatum | ( | ) | [virtual] |
Definition at line 43 of file wsqldatum.cpp.
void WSql::WSqlDatum::clear | ( | ) |
Erases the value stored..
Definition at line 72 of file wsqldatum.cpp.
T WSql::WSqlDatum::data | ( | ) | const [inline] |
Definition at line 49 of file wsqldatum.h.
bool WSql::WSqlDatum::operator!= | ( | const WSqlDatum & | other | ) | const [inline] |
Definition at line 37 of file wsqldatum.h.
Definition at line 47 of file wsqldatum.cpp.
bool WSql::WSqlDatum::operator== | ( | const WSqlDatum & | other | ) | const [virtual] |
Definition at line 53 of file wsqldatum.cpp.
void WSql::WSqlDatum::setData | ( | const T | t | ) | [inline] |
Definition at line 40 of file wsqldatum.h.
double WSql::WSqlDatum::toDouble | ( | ) | const [inline] |
Definition at line 64 of file wsqldatum.h.
float WSql::WSqlDatum::toFloat | ( | ) | const [inline] |
Definition at line 63 of file wsqldatum.h.
int WSql::WSqlDatum::toInt | ( | ) | const [inline] |
Definition at line 61 of file wsqldatum.h.
long WSql::WSqlDatum::toLong | ( | ) | const [inline] |
Definition at line 62 of file wsqldatum.h.
short WSql::WSqlDatum::toShort | ( | ) | const [inline] |
Definition at line 60 of file wsqldatum.h.
std::string WSql::WSqlDatum::toString | ( | ) | const [inline] |
Definition at line 70 of file wsqldatum.h.
unsigned int WSql::WSqlDatum::toUInt | ( | ) | const [inline] |
Definition at line 67 of file wsqldatum.h.
unsigned long WSql::WSqlDatum::toULong | ( | ) | const [inline] |
Definition at line 68 of file wsqldatum.h.
unsigned short WSql::WSqlDatum::toUShort | ( | ) | const [inline] |
Definition at line 66 of file wsqldatum.h.