This class describes a serializer in memory.
Protected Member Functions | |
| void | writeCharArray (const char *elementArray, unsigned int arraySize) |
| void | readCharArray (char *charArray, unsigned int arraySize) |
Protected Attributes | |
| unsigned int | position |
| SBVector< char > * | dataVector |
Constructors and destructors | |
| SBCSerializerMemory () | |
| virtual | ~SBCSerializerMemory () |
Writing elements | |
| virtual void | writeStartElement (const std::string &elementName) |
Writes the start element with elementName name. | |
| virtual void | writeEndElement () |
| Writes the end element. | |
| virtual void | writeStringElement (const std::string &elementName, const std::string &element) |
Writes an element of string type with elementName name and value element. | |
| virtual void | writeStringElementInBase64 (const std::string &elementName, const std::string &element) |
Writes an element of string type in Base64 (supports html) with elementName name and value element. | |
| virtual void | writeBoolElement (const std::string &elementName, bool element) |
Writes an element of boolean type with elementName name and value element. | |
| virtual void | writeCharElement (const std::string &elementName, char element) |
Writes an element of char type with elementName name and value element. | |
| virtual void | writeUnsignedCharElement (const std::string &elementName, unsigned char element) |
Writes an element of unsigned char type with elementName name and value element. | |
| virtual void | writeShortElement (const std::string &elementName, short element) |
Writes an element of short integer type with elementName name and value element. | |
| virtual void | writeUnsignedShortElement (const std::string &elementName, unsigned short element) |
Writes an element of unsigned short integer type with elementName name and value element. | |
| virtual void | writeIntElement (const std::string &elementName, int element) |
Writes an element of integer type with elementName name and value element. | |
| virtual void | writeUnsignedIntElement (const std::string &elementName, unsigned int element) |
Writes an element of unsigned integer type with elementName name and value element. | |
| virtual void | writeLongElement (const std::string &elementName, long element) |
Writes an element of long integer type with elementName name and value element. More... | |
| virtual void | writeUnsignedLongElement (const std::string &elementName, unsigned long element) |
Writes an element of unsigned long integer type with elementName name and value element. More... | |
| virtual void | writeLongLongElement (const std::string &elementName, long long element) |
Writes an element of long long integer type with elementName name and value element. | |
| virtual void | writeUnsignedLongLongElement (const std::string &elementName, unsigned long long element) |
Writes an element of unsigned long long integer type with elementName name and value element. | |
| virtual void | writeFloatElement (const std::string &elementName, float element) |
Writes an element of float type with elementName name and value element. | |
| virtual void | writeDoubleElement (const std::string &elementName, double element) |
Writes an element of double type with elementName name and value element. | |
| virtual void | writeCharArrayElement (const std::string &elementName, const char *elementArray, unsigned int arraySize) |
Writes an element of char array type with elementName name of size arraySize and values elementArray. | |
Reading elements | |
| virtual void | readStartElement () |
| Reads the start element. | |
| virtual void | readEndElement () |
| Reads the end element. | |
| virtual std::string | readStringElement () |
| Reads an element of string type. | |
| virtual std::string | readStringElementFromBase64 () |
| Reads an element of string type in Base64 (supports html) | |
| virtual bool | readBoolElement () |
| Reads an element of boolean type. | |
| virtual char | readCharElement () |
| Reads an element of char type. | |
| virtual unsigned char | readUnsignedCharElement () |
| Reads an element of unsigned char type. | |
| virtual short | readShortElement () |
| Reads an element of short integer type. | |
| virtual unsigned short | readUnsignedShortElement () |
| Reads an element of unsigned short integer type. | |
| virtual int | readIntElement () |
| Reads an element of integer type. | |
| virtual unsigned int | readUnsignedIntElement () |
| Reads an element of unsigned integer type. | |
| virtual long | readLongElement () |
| Reads an element of long integer type. More... | |
| virtual unsigned long | readUnsignedLongElement () |
| Reads an element of unsigned long integer type. More... | |
| virtual long long | readLongLongElement () |
| Reads an element of long long integer type. | |
| virtual unsigned long long | readUnsignedLongLongElement () |
| Reads an element of unsigned long long integer type. | |
| virtual float | readFloatElement () |
| Reads an element of float type. | |
| virtual double | readDoubleElement () |
| Reads an element of double type. | |
| virtual char * | readCharArrayElement (unsigned int &arraySize) |
Reads an element of char array type of size arraySize. | |
Control | |
| void | clear () |
| void | rewind () |
| char * | getData () const |
| unsigned int | getDataSize () const |
Additional Inherited Members | |
Public Member Functions inherited from SBCSerializer | |
| SBCSerializer () | |
| virtual | ~SBCSerializer () |
|
virtual |
Note: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required.
Reimplemented from SBCSerializer.
|
virtual |
Note: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required.
Reimplemented from SBCSerializer.
|
virtual |
Note: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required.
Reimplemented from SBCSerializer.
|
virtual |
Note: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required.
Reimplemented from SBCSerializer.