#include <ObjectReader.h>
Inheritance diagram for vpr::ObjectReader:


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... | |
Definition at line 55 of file ObjectReader.h.
|
|
Definition at line 58 of file ObjectReader.h. References mIsBinary. Referenced by ObjectReader.
00059 : mIsBinary(false) 00060 {;} |
|
|
Definition at line 62 of file ObjectReader.h. References mIsBinary, and ObjectReader.
00063 : AttributeMapBase(o), mIsBinary(false) 00064 {;} |
|
|
Definition at line 67 of file ObjectReader.h.
00068 {;}
|
|
|
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; }
|
|
|
Starts a new section/element of name tagName.
Implemented in vpr::BufferObjectReader. |
|
|
Ends the most recently named tag.
Implemented in vpr::BufferObjectReader. |
|
|
Starts an attribute of the name attributeName.
Implemented in vpr::BufferObjectReader. |
|
|
Ends the most recently named attribute.
Implemented in vpr::BufferObjectReader. |
|
|
Reset the reading to the initial reading state.
Implemented in vpr::BufferObjectReader. |
|
|
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. |
|
|
Implemented in vpr::BufferObjectReader. |
|
|
Implemented in vpr::BufferObjectReader. Referenced by vpr::GUID::readObject, and readUint8. |
|
|
Implemented in vpr::BufferObjectReader. Referenced by vpr::GUID::readObject, and readUint16. |
|
|
Implemented in vpr::BufferObjectReader. Referenced by vpr::GUID::readObject, and readUint32. |
|
|
Implemented in vpr::BufferObjectReader. Referenced by readUint64. |
|
|
Implemented in vpr::BufferObjectReader. Referenced by readFloat. |
|
|
Implemented in vpr::BufferObjectReader. Referenced by readDouble. |
|
|
Implemented in vpr::BufferObjectReader. Referenced by readString. |
|
|
Implemented in vpr::BufferObjectReader. Referenced by readBool. |
|
|
Reimplemented in vpr::BufferObjectReader. Definition at line 132 of file ObjectReader.h. References readUint8.
00133 { val = this->readUint8(); }
|
|
|
Reimplemented in vpr::BufferObjectReader. Definition at line 134 of file ObjectReader.h. References readUint16.
00135 { val = this->readUint16(); }
|
|
|
Reimplemented in vpr::BufferObjectReader. Definition at line 136 of file ObjectReader.h. References readUint32.
00137 { val = this->readUint32(); }
|
|
|
Reimplemented in vpr::BufferObjectReader. Definition at line 138 of file ObjectReader.h. References readUint64.
00139 { val = this->readUint64(); }
|
|
|
Reimplemented in vpr::BufferObjectReader. Definition at line 140 of file ObjectReader.h. References readFloat.
00141 { val = this->readFloat(); }
|
|
|
Reimplemented in vpr::BufferObjectReader. Definition at line 142 of file ObjectReader.h. References readDouble.
00143 { val = this->readDouble(); }
|
|
|
Reimplemented in vpr::BufferObjectReader. Definition at line 144 of file ObjectReader.h. References readString.
00145 { str = this->readString(); }
|
|
|
Reimplemented in vpr::BufferObjectReader. Definition at line 146 of file ObjectReader.h. References readBool.
00147 { val = this->readBool(); }
|
|
|
Is this a binary serializer.
Definition at line 150 of file ObjectReader.h. Referenced by vpr::BufferObjectReader::BufferObjectReader, isBinary, and ObjectReader. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002