ot_lib::ot_obj Class Reference

OT_LIB base object class. More...

#include <ot_lib.h>

Inheritance diagram for ot_lib::ot_obj:

ot_lib::ot_bool ot_lib::ot_exception ot_lib::ot_ior ot_lib::ot_list ot_lib::ot_map ot_lib::ot_null ot_lib::ot_num< X > ot_lib::ot_path ot_lib::ot_rawData ot_lib::ot_string ot_lib::ot_time ot_lib::ot_vector ot_lib::ot_num< float > ot_lib::ot_num< int > ot_lib::ot_num< unsigned int >

List of all members.

Public Member Functions

virtual ~ot_obj ()
 Default destructor.
OT_OBJECT_TYPE getType (void) const
virtual ot_objdup (void) const =0
virtual bool operator== (const ot_obj *o) const =0
 Eq operator.
bool operator== (const ot_obj &o) const
 Eq operator.
virtual void asXml (ostream &s=cout, int i=0) const =0
virtual bool asData (ostream &s) const =0

Static Public Member Functions

static bool readStringFromData (istream &s, string &ret)
static bool readIntegerFromData (istream &s, int &ret)
static bool readUnsignedIntegerFromData (istream &s, unsigned int &ret)
static bool readFloatFromData (istream &s, float &ret)
static bool readBoolFromData (istream &s, bool &ret)
static bool readRawFromData (istream &s, char *&data, int &size)
static bool writeStringAsData (ostream &s, const string &val)
static bool writeIntegerAsData (ostream &s, int val)
static bool writeBoolAsData (ostream &s, bool val)
static bool writeRawAsData (ostream &s, const char *data, int size)

Protected Member Functions

 ot_obj (OT_OBJECT_TYPE type)

Private Attributes

OT_OBJECT_TYPE m_type
 Identify the object type.


Detailed Description

OT_LIB base object class.

This is the base class of all OT objects


Constructor & Destructor Documentation

ot_lib::ot_obj::ot_obj ( OT_OBJECT_TYPE  type  )  [protected]

Default costructor

Parameters:
type The object type

virtual ot_lib::ot_obj::~ot_obj (  )  [virtual]

Default destructor.


Member Function Documentation

OT_OBJECT_TYPE ot_lib::ot_obj::getType ( void   )  const

Get object type

Returns:
The object type

virtual ot_obj* ot_lib::ot_obj::dup ( void   )  const [pure virtual]

Clone the object and return the pointer of the new object

Returns:
Pointer to the new object

Implemented in ot_lib::ot_null, ot_lib::ot_bool, ot_lib::ot_int, ot_lib::ot_uint, ot_lib::ot_float, ot_lib::ot_string, ot_lib::ot_list, ot_lib::ot_vector, ot_lib::ot_map, ot_lib::ot_time, ot_lib::ot_rawData, ot_lib::ot_ior, and ot_lib::ot_path.

virtual bool ot_lib::ot_obj::operator== ( const ot_obj o  )  const [pure virtual]

bool ot_lib::ot_obj::operator== ( const ot_obj o  )  const

Eq operator.

virtual void ot_lib::ot_obj::asXml ( ostream &  s = cout,
int  i = 0 
) const [pure virtual]

virtual bool ot_lib::ot_obj::asData ( ostream &  s  )  const [pure virtual]

static bool ot_lib::ot_obj::readStringFromData ( istream &  s,
string &  ret 
) [static]

Read a string from data stream

Parameters:
s The input stream
ret The readed string
Returns:
True if ok or error

static bool ot_lib::ot_obj::readIntegerFromData ( istream &  s,
int ret 
) [static]

Read a integer from data stream

Parameters:
s The input stream
ret The readed intefer
Returns:
True if ok or error

static bool ot_lib::ot_obj::readUnsignedIntegerFromData ( istream &  s,
unsigned int ret 
) [static]

Read a unsigned integer from data stream

Parameters:
s The input stream
ret The readed intefer
Returns:
True if ok or error

static bool ot_lib::ot_obj::readFloatFromData ( istream &  s,
float ret 
) [static]

Read a float from data stream

Parameters:
s The input stream
ret The readed float
Returns:
True if ok or error

static bool ot_lib::ot_obj::readBoolFromData ( istream &  s,
bool &  ret 
) [static]

Read a bool from data stream

Parameters:
s The input stream
ret The readed bool
Returns:
True if ok or error

static bool ot_lib::ot_obj::readRawFromData ( istream &  s,
char *&  data,
int size 
) [static]

Read buffer from data stream

Parameters:
s The input stream
data The readed buffer
size The size of readed buffer
Returns:
True if ok or error

static bool ot_lib::ot_obj::writeStringAsData ( ostream &  s,
const string &  val 
) [static]

Write string on data stream

Parameters:
s The output stream
val The string to write
Returns:
True if ok or error

static bool ot_lib::ot_obj::writeIntegerAsData ( ostream &  s,
int  val 
) [static]

Write integer on data stream

Parameters:
s The output stream
val The integer to write
Returns:
True if ok or error

static bool ot_lib::ot_obj::writeBoolAsData ( ostream &  s,
bool  val 
) [static]

Write bool on data stream

Parameters:
s The output stream
val The boolean to write
Returns:
True if ok or error

static bool ot_lib::ot_obj::writeRawAsData ( ostream &  s,
const char *  data,
int  size 
) [static]

Write buffer on data stream

Parameters:
s The output stream
data Pointer to data
size The size of the buffer
Returns:
True if ok or error


Member Data Documentation

Identify the object type.

Reimplemented in ot_lib::ot_ior.


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

Generated on Sun May 4 12:42:45 2008 for OT_LIB 4.1 by  doxygen 1.5.5