NVtype Class Reference

Abstracts variable data type elements. More...

List of all members.

Public Types

enum  Type {
  VOID, CHAR, INT32, UINT32,
  INT64, UINT64, STRING, DATASTREAM
}

Public Member Functions

 NVtype (void)
 Constructs a NVtype object.
 NVtype (const NVtype &other)
 Copy constructor.
 NVtype (char val)
 Constructs a NVtype object.
 NVtype (nint32 val)
 Constructs a NVType object.
 NVtype (nuint32 val)
 Constructs a NVType object.
 NVtype (nint64 val)
 Constructs a NVType object.
 NVtype (nuint64 val)
 Constructs a NVType object.
 NVtype (const NString &str)
 Constructs a NVType object.
 NVtype (const NDataStream &str)
 Constructs a NVType object.
Type getType () const
 Current datatype of object.
char toChar () const
 Gets the current data as a char.
nint32 toInt32 () const
 Gets the current data as a signed 32 bit int.
nuint32 toUInt32 () const
 Gets the current data as an unsigned 32 bit int.
nint64 toInt64 () const
 Gets the current data as a signed 64 bit int.
nuint64 toUInt64 () const
 Gets the current data as an unsigned 64 bit int.
NString toString () const
 Gets the current data as a string.
NDataStream toStream () const
 Gets the current data as a stream of bytes.
nuint32 getSize () const
 Gets the size of the current data.
NVtypeoperator= (const NVtype &rhs)
 Assignment operator.
bool operator== (const NVtype &rhs) const
 Checks whether the current object is equals rhs.
bool operator!= (const NVtype &rhs) const
 Checks whether the current object is different than rhs.


Detailed Description

Abstracts variable data type elements.
Examples:

nsqlapp.cpp.

Definition at line 39 of file nvtype.h.


Member Enumeration Documentation

enum Type

Enumerator:
VOID  Void data type
CHAR  Char data type
INT32  32 bits signed integer data type
UINT32  32 bits unsigned integer data type
INT64  64 bits signed integer data type
UINT64  64 bits unsigned integer data type
STRING  string data type
DATASTREAM  stream data type

Definition at line 41 of file nvtype.h.


Constructor & Destructor Documentation

NVtype ( const NVtype other  ) 

Copy constructor.

Parameters:
other Other NVtype object to be copied

Definition at line 32 of file nvtype.cpp.

References m_data, and m_type.

NVtype ( char  val  )  [explicit]

Constructs a NVtype object.

Parameters:
val Value to assign to the object

Definition at line 40 of file nvtype.cpp.

References NDataStream::set().

NVtype ( nint32  val  )  [explicit]

Constructs a NVType object.

Parameters:
val Value to assign to the object

Definition at line 48 of file nvtype.cpp.

References NDataStream::set().

NVtype ( nuint32  val  )  [explicit]

Constructs a NVType object.

Parameters:
val Value to assign to the object

Definition at line 55 of file nvtype.cpp.

References NDataStream::set().

NVtype ( nint64  val  )  [explicit]

Constructs a NVType object.

Parameters:
val Value to assign to the object

Definition at line 62 of file nvtype.cpp.

References NDataStream::set().

NVtype ( nuint64  val  )  [explicit]

Constructs a NVType object.

Parameters:
val Value to assign to the object

Definition at line 69 of file nvtype.cpp.

References NDataStream::set().

NVtype ( const NString str  ) 

Constructs a NVType object.

Parameters:
str Value (string) to assign to the object

Definition at line 76 of file nvtype.cpp.

References NDataStream::set().

NVtype ( const NDataStream str  )  [explicit]

Constructs a NVType object.

Parameters:
val Value (stream) to assign to the object

Definition at line 83 of file nvtype.cpp.


Member Function Documentation

char toChar ( void   )  const

Gets the current data as a char.

Returns:
The data as a char

Definition at line 94 of file nvtype.cpp.

References NDataStream::toChar().

nint32 toInt32 ( void   )  const

Gets the current data as a signed 32 bit int.

Returns:
The data as an int

Definition at line 98 of file nvtype.cpp.

References NDataStream::toInt32().

nuint32 toUInt32 (  )  const

Gets the current data as an unsigned 32 bit int.

Returns:
The data as an int

Definition at line 102 of file nvtype.cpp.

References NDataStream::toInt32().

nint64 toInt64 ( void   )  const

Gets the current data as a signed 64 bit int.

Returns:
The data as an int

Definition at line 106 of file nvtype.cpp.

References NDataStream::toInt64().

nuint64 toUInt64 (  )  const

Gets the current data as an unsigned 64 bit int.

Returns:
The data as an int

Definition at line 110 of file nvtype.cpp.

References NDataStream::toInt64().

NString toString ( void   )  const

Gets the current data as a string.

Returns:
The data as an string
Examples:
nsqlapp.cpp.

Definition at line 114 of file nvtype.cpp.

References NDataStream::toString().

Referenced by NSqlQuery::addBindValue(), and NSqlQuery::bindValue().

NDataStream toStream (  )  const

Gets the current data as a stream of bytes.

Returns:
The data as a stream

Definition at line 118 of file nvtype.cpp.

nuint32 getSize (  )  const

Gets the size of the current data.

Returns:
The size of the current data

Definition at line 123 of file nvtype.cpp.

References NDataStream::size().

NVtype & operator= ( const NVtype rhs  ) 

Assignment operator.

Parameters:
rhs The object to be copied
Returns:
A reference to this

Definition at line 128 of file nvtype.cpp.

References m_data, and m_type.

bool operator== ( const NVtype rhs  )  const

Checks whether the current object is equals rhs.

Parameters:
rhs The object to be checked if it's equal
Returns:
True if it's equal or false otherwise

Definition at line 133 of file nvtype.cpp.

References m_data, and m_type.

bool operator!= ( const NVtype rhs  )  const

Checks whether the current object is different than rhs.

Parameters:
rhs The object to be checked if it's different
Returns:
True if it's different or false otherwise

Definition at line 142 of file nvtype.cpp.

References m_data, and m_type.


The documentation for this class was generated from the following files:
Generated on Wed Mar 5 23:10:37 2008 for NemesisUtilitiesSystem by  doxygen 1.5.4