WORM 0.2
A C++ DAL/ORM code generation framework
Public Member Functions

WSql::WSqlDatum Class Reference

The WSqlDatum class represents an abstraction of a data element retrieved from a database. More...

#include <wsqldatum.h>

List of all members.

Public Member Functions

 WSqlDatum ()
 WSqlDatum (const WSqlDatum &other)
virtual ~WSqlDatum ()
virtual WSqlDatumoperator= (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 >
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 ()

Detailed Description

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.

See also:
WSqlDataType WSqlField WSqlColumn

Definition at line 28 of file wsqldatum.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

void WSql::WSqlDatum::clear ( )

Erases the value stored..

Definition at line 72 of file wsqldatum.cpp.

template<typename T >
T WSql::WSqlDatum::data ( ) const [inline]

Todo:
handle exception

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.

WSqlDatum & WSql::WSqlDatum::operator= ( const WSqlDatum other) [virtual]

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.

template<typename T >
void WSql::WSqlDatum::setData ( const T  t) [inline]

Todo:
handle exception

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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Defines