Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Examples  

vpr::ObjectReader Class Reference

Interface used to read object data to a stream. More...

#include <ObjectReader.h>

Inheritance diagram for vpr::ObjectReader:

Inheritance graph
[legend]
Collaboration diagram for vpr::ObjectReader:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual ~ObjectReader ()
bool isBinary ()
 Returns true if the writer is a binary based format. More...

virtual void resetReading ()=0
 Reset the reading to the initial reading state. More...

virtual void pushState ()=0
 The following methods allow users to push/pop that active state of reading. More...

virtual void popState ()=0
virtual vpr::Uint8 readUint8 ()=0
virtual vpr::Uint16 readUint16 ()=0
virtual vpr::Uint32 readUint32 ()=0
virtual vpr::Uint64 readUint64 ()=0
virtual float readFloat ()=0
virtual double readDouble ()=0
virtual std::string readString ()=0
virtual bool readBool ()=0
virtual void readUint8 (vpr::Uint8 &val)
virtual void readUint16 (vpr::Uint16 &val)
virtual void readUint32 (vpr::Uint32 &val)
virtual void readUint64 (vpr::Uint64 &val)
virtual void readFloat (float &val)
virtual void readDouble (double &val)
virtual void readString (std::string &str)
virtual void readBool (bool &val)
Tag and attribute handling.
ObjectReader and ObjectWriter support an interface that allows for using tags and attributes in the written output data.

This allows support for formats such as XML where there is a logical grouping of the data.

Tags are similar to the XML concept of elements. They are used to deliniate a hierarchical group in the structure of the data. Attributes are similar to XML attributes in that they are properties of the most recently started tag.

The structure looks something like (based on XML):

<tag1> <tag2 attrib1="XXX"> </tag2> </tag1>

virtual vpr::ReturnStatus beginTag (std::string tagName)=0
 Starts a new section/element of name tagName. More...

virtual vpr::ReturnStatus endTag ()=0
 Ends the most recently named tag. More...

virtual vpr::ReturnStatus beginAttribute (std::string attributeName)=0
 Starts an attribute of the name attributeName. More...

virtual vpr::ReturnStatus endAttribute ()=0
 Ends the most recently named attribute. More...


Protected Methods

 ObjectReader ()
 ObjectReader (const ObjectReader &o)

Protected Attributes

bool mIsBinary
 Is this a binary serializer. More...


Detailed Description

Interface used to read object data to a stream.

Definition at line 55 of file ObjectReader.h.


Constructor & Destructor Documentation

vpr::ObjectReader::ObjectReader   [inline, protected]
 

Definition at line 58 of file ObjectReader.h.

References mIsBinary.

Referenced by ObjectReader.

00059       : mIsBinary(false)
00060    {;}

vpr::ObjectReader::ObjectReader const ObjectReader &    o [inline, protected]
 

Definition at line 62 of file ObjectReader.h.

References mIsBinary, and ObjectReader.

00063       : AttributeMapBase(o), mIsBinary(false)
00064    {;}

virtual vpr::ObjectReader::~ObjectReader   [inline, virtual]
 

Definition at line 67 of file ObjectReader.h.

00068    {;}


Member Function Documentation

bool vpr::ObjectReader::isBinary   [inline]
 

Returns true if the writer is a binary based format.

This can be used to choose wether to use human-readable forms of serialization.

Definition at line 73 of file ObjectReader.h.

References mIsBinary.

00074    { return mIsBinary; }

virtual vpr::ReturnStatus vpr::ObjectReader::beginTag std::string    tagName [pure virtual]
 

Starts a new section/element of name tagName.

Implemented in vpr::BufferObjectReader.

virtual vpr::ReturnStatus vpr::ObjectReader::endTag   [pure virtual]
 

Ends the most recently named tag.

Implemented in vpr::BufferObjectReader.

virtual vpr::ReturnStatus vpr::ObjectReader::beginAttribute std::string    attributeName [pure virtual]
 

Starts an attribute of the name attributeName.

Implemented in vpr::BufferObjectReader.

virtual vpr::ReturnStatus vpr::ObjectReader::endAttribute   [pure virtual]
 

Ends the most recently named attribute.

Implemented in vpr::BufferObjectReader.

virtual void vpr::ObjectReader::resetReading   [pure virtual]
 

Reset the reading to the initial reading state.

Postcondition:
The reader can be reused and will function as if it were just initialized.

Implemented in vpr::BufferObjectReader.

virtual void vpr::ObjectReader::pushState   [pure virtual]
 

The following methods allow users to push/pop that active state of reading.

This can be used to move back to previous reading states if needed.

Implemented in vpr::BufferObjectReader.

virtual void vpr::ObjectReader::popState   [pure virtual]
 

Implemented in vpr::BufferObjectReader.

virtual vpr::Uint8 vpr::ObjectReader::readUint8   [pure virtual]
 

Implemented in vpr::BufferObjectReader.

Referenced by vpr::GUID::readObject, and readUint8.

virtual vpr::Uint16 vpr::ObjectReader::readUint16   [pure virtual]
 

Implemented in vpr::BufferObjectReader.

Referenced by vpr::GUID::readObject, and readUint16.

virtual vpr::Uint32 vpr::ObjectReader::readUint32   [pure virtual]
 

Implemented in vpr::BufferObjectReader.

Referenced by vpr::GUID::readObject, and readUint32.

virtual vpr::Uint64 vpr::ObjectReader::readUint64   [pure virtual]
 

Implemented in vpr::BufferObjectReader.

Referenced by readUint64.

virtual float vpr::ObjectReader::readFloat   [pure virtual]
 

Implemented in vpr::BufferObjectReader.

Referenced by readFloat.

virtual double vpr::ObjectReader::readDouble   [pure virtual]
 

Implemented in vpr::BufferObjectReader.

Referenced by readDouble.

virtual std::string vpr::ObjectReader::readString   [pure virtual]
 

Implemented in vpr::BufferObjectReader.

Referenced by readString.

virtual bool vpr::ObjectReader::readBool   [pure virtual]
 

Implemented in vpr::BufferObjectReader.

Referenced by readBool.

virtual void vpr::ObjectReader::readUint8 vpr::Uint8   val [inline, virtual]
 

Reimplemented in vpr::BufferObjectReader.

Definition at line 132 of file ObjectReader.h.

References readUint8.

00133    { val = this->readUint8(); }

virtual void vpr::ObjectReader::readUint16 vpr::Uint16   val [inline, virtual]
 

Reimplemented in vpr::BufferObjectReader.

Definition at line 134 of file ObjectReader.h.

References readUint16.

00135    { val = this->readUint16(); }

virtual void vpr::ObjectReader::readUint32 vpr::Uint32   val [inline, virtual]
 

Reimplemented in vpr::BufferObjectReader.

Definition at line 136 of file ObjectReader.h.

References readUint32.

00137    { val = this->readUint32(); }

virtual void vpr::ObjectReader::readUint64 vpr::Uint64   val [inline, virtual]
 

Reimplemented in vpr::BufferObjectReader.

Definition at line 138 of file ObjectReader.h.

References readUint64.

00139    { val = this->readUint64(); }

virtual void vpr::ObjectReader::readFloat float &    val [inline, virtual]
 

Reimplemented in vpr::BufferObjectReader.

Definition at line 140 of file ObjectReader.h.

References readFloat.

00141    { val = this->readFloat(); }

virtual void vpr::ObjectReader::readDouble double &    val [inline, virtual]
 

Reimplemented in vpr::BufferObjectReader.

Definition at line 142 of file ObjectReader.h.

References readDouble.

00143    { val = this->readDouble(); }

virtual void vpr::ObjectReader::readString std::string &    str [inline, virtual]
 

Reimplemented in vpr::BufferObjectReader.

Definition at line 144 of file ObjectReader.h.

References readString.

00145    { str = this->readString(); }

virtual void vpr::ObjectReader::readBool bool &    val [inline, virtual]
 

Reimplemented in vpr::BufferObjectReader.

Definition at line 146 of file ObjectReader.h.

References readBool.

00147    { val = this->readBool(); }


Member Data Documentation

bool vpr::ObjectReader::mIsBinary [protected]
 

Is this a binary serializer.

Definition at line 150 of file ObjectReader.h.

Referenced by vpr::BufferObjectReader::BufferObjectReader, isBinary, and ObjectReader.


The documentation for this class was generated from the following file:
Generated on Sun May 2 14:46:50 2004 for VR Juggler Portable Runtime by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002