tntdb::Value Class Reference

The class Value represents a value, which is fetched from the database. More...

#include <value.h>

List of all members.

Public Member Functions

bool operator! () const
 Returns true, if this class is not connected to a actual statement.
const IValue * getImpl () const
 Returns the actual implementation-class.
bool isNull () const
 return true, when value is null
bool getBool () const
 return true, when value represents boolean true.
int getInt () const
 tries to convert value into an int.
unsigned getUnsigned () const
 tries to convert value into an unsigned.
float getFloat () const
 tries to convert value into an float.
double getDouble () const
 tries to convert value into an double.
char getChar () const
 returns the first character of the texte-representation.
std::string getString () const
 returns the value as a string.
Date getDate () const
 returns the value as a Date.
Time getTime () const
 returns the value as a Time.
Datetime getDatetime () const
 returns the value as a Datetime.
 operator bool () const
 Make Value-objects implicit convertable.
 operator int () const
 Make Value-objects implicit convertable.
 operator unsigned () const
 Make Value-objects implicit convertable.
 operator float () const
 Make Value-objects implicit convertable.
 operator double () const
 Make Value-objects implicit convertable.
 operator char () const
 Make Value-objects implicit convertable.
 operator std::string () const
 Make Value-objects implicit convertable.
 operator Date () const
 Make Value-objects implicit convertable.
 operator Time () const
 Make Value-objects implicit convertable.
 operator Datetime () const
 Make Value-objects implicit convertable.


Detailed Description

The class Value represents a value, which is fetched from the database.


Member Function Documentation

bool tntdb::Value::getBool (  )  const [inline]

return true, when value represents boolean true.

char tntdb::Value::getChar (  )  const [inline]

returns the first character of the texte-representation.

Date tntdb::Value::getDate (  )  const [inline]

returns the value as a Date.

Datetime tntdb::Value::getDatetime (  )  const [inline]

returns the value as a Datetime.

double tntdb::Value::getDouble (  )  const [inline]

tries to convert value into an double.

float tntdb::Value::getFloat (  )  const [inline]

tries to convert value into an float.

const IValue* tntdb::Value::getImpl (  )  const [inline]

Returns the actual implementation-class.

int tntdb::Value::getInt (  )  const [inline]

tries to convert value into an int.

std::string tntdb::Value::getString (  )  const [inline]

returns the value as a string.

Time tntdb::Value::getTime (  )  const [inline]

returns the value as a Time.

unsigned tntdb::Value::getUnsigned (  )  const [inline]

tries to convert value into an unsigned.

bool tntdb::Value::isNull (  )  const [inline]

return true, when value is null

The get-methods return the value in the requested type. If the value can't be converted to the requested type, a exception of type tntdb::TypeError is thrown.

tntdb::Value::operator bool (  )  const [inline]

Make Value-objects implicit convertable.

This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.

tntdb::Value::operator char (  )  const [inline]

Make Value-objects implicit convertable.

This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.

tntdb::Value::operator Date (  )  const [inline]

Make Value-objects implicit convertable.

This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.

tntdb::Value::operator Datetime (  )  const [inline]

Make Value-objects implicit convertable.

This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.

tntdb::Value::operator double (  )  const [inline]

Make Value-objects implicit convertable.

This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.

tntdb::Value::operator float (  )  const [inline]

Make Value-objects implicit convertable.

This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.

tntdb::Value::operator int (  )  const [inline]

Make Value-objects implicit convertable.

This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.

tntdb::Value::operator std::string (  )  const [inline]

Make Value-objects implicit convertable.

This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.

tntdb::Value::operator Time (  )  const [inline]

Make Value-objects implicit convertable.

This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.

tntdb::Value::operator unsigned (  )  const [inline]

Make Value-objects implicit convertable.

This class defines implicit convert-operators to convert the value automatically to different types. They are identical with the corresponding get-methods.

bool tntdb::Value::operator! (  )  const [inline]

Returns true, if this class is not connected to a actual statement.


The documentation for this class was generated from the following file:
Generated on Mon Oct 23 01:30:01 2006 for tntdb by  doxygen 1.4.7