Loading...
Searching...
No Matches
SBCSerializerMemory Class Reference

This class describes a serializer in memory.

Control

unsigned int position
 
SBVector< char > * dataVector
 
void clear ()
 
void rewind ()
 
char * getData () const
 
unsigned int getDataSize () const
 
void writeCharArray (const char *elementArray, unsigned int arraySize)
 
void readCharArray (char *charArray, unsigned int arraySize)
 

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.
 
virtual void writeUnsignedLongElement (const std::string &elementName, unsigned long element)
 Writes an element of unsigned long integer type with elementName name and value element.
 
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.
 
virtual void writeUUIDElement (const std::string &elementName, const SBCContainerUUID &element)
 Writes an element of UUID type with elementName name and value element.
 

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.
 
virtual unsigned long readUnsignedLongElement ()
 Reads an element of unsigned long integer type.
 
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.
 
virtual SBCContainerUUID readUUIDElement ()
 Reads an element of UUID type.
 

Additional Inherited Members

- Public Member Functions inherited from SBCSerializer
 SBCSerializer ()
 
virtual ~SBCSerializer ()
 

Member Function Documentation

◆ readBoolElement()

bool SBCSerializerMemory::readBoolElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readCharArrayElement()

char * SBCSerializerMemory::readCharArrayElement ( unsigned int &  arraySize)
virtual

Reimplemented from SBCSerializer.

◆ readCharElement()

char SBCSerializerMemory::readCharElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readDoubleElement()

double SBCSerializerMemory::readDoubleElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readEndElement()

void SBCSerializerMemory::readEndElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readFloatElement()

float SBCSerializerMemory::readFloatElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readIntElement()

int SBCSerializerMemory::readIntElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readLongElement()

long SBCSerializerMemory::readLongElement ( )
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.

◆ readLongLongElement()

long long SBCSerializerMemory::readLongLongElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readShortElement()

short SBCSerializerMemory::readShortElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readStartElement()

void SBCSerializerMemory::readStartElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readStringElement()

std::string SBCSerializerMemory::readStringElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readStringElementFromBase64()

std::string SBCSerializerMemory::readStringElementFromBase64 ( )
virtual

Reimplemented from SBCSerializer.

◆ readUnsignedCharElement()

unsigned char SBCSerializerMemory::readUnsignedCharElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readUnsignedIntElement()

unsigned int SBCSerializerMemory::readUnsignedIntElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readUnsignedLongElement()

unsigned long SBCSerializerMemory::readUnsignedLongElement ( )
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.

◆ readUnsignedLongLongElement()

unsigned long long SBCSerializerMemory::readUnsignedLongLongElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readUnsignedShortElement()

unsigned short SBCSerializerMemory::readUnsignedShortElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readUUIDElement()

SBCContainerUUID SBCSerializerMemory::readUUIDElement ( )
virtual

Reimplemented from SBCSerializer.

◆ writeBoolElement()

void SBCSerializerMemory::writeBoolElement ( const std::string &  elementName,
bool  element 
)
virtual

Reimplemented from SBCSerializer.

◆ writeCharArrayElement()

void SBCSerializerMemory::writeCharArrayElement ( const std::string &  elementName,
const char *  elementArray,
unsigned int  arraySize 
)
virtual

Reimplemented from SBCSerializer.

◆ writeCharElement()

void SBCSerializerMemory::writeCharElement ( const std::string &  elementName,
char  element 
)
virtual

Reimplemented from SBCSerializer.

◆ writeDoubleElement()

void SBCSerializerMemory::writeDoubleElement ( const std::string &  elementName,
double  element 
)
virtual

Reimplemented from SBCSerializer.

◆ writeEndElement()

void SBCSerializerMemory::writeEndElement ( )
virtual

Reimplemented from SBCSerializer.

◆ writeFloatElement()

void SBCSerializerMemory::writeFloatElement ( const std::string &  elementName,
float  element 
)
virtual

Reimplemented from SBCSerializer.

◆ writeIntElement()

void SBCSerializerMemory::writeIntElement ( const std::string &  elementName,
int  element 
)
virtual

Reimplemented from SBCSerializer.

◆ writeLongElement()

void SBCSerializerMemory::writeLongElement ( const std::string &  elementName,
long  element 
)
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.

◆ writeLongLongElement()

void SBCSerializerMemory::writeLongLongElement ( const std::string &  elementName,
long long  element 
)
virtual

Reimplemented from SBCSerializer.

◆ writeShortElement()

void SBCSerializerMemory::writeShortElement ( const std::string &  elementName,
short  element 
)
virtual

Reimplemented from SBCSerializer.

◆ writeStartElement()

void SBCSerializerMemory::writeStartElement ( const std::string &  elementName)
virtual

Reimplemented from SBCSerializer.

◆ writeStringElement()

void SBCSerializerMemory::writeStringElement ( const std::string &  elementName,
const std::string &  element 
)
virtual

Reimplemented from SBCSerializer.

◆ writeStringElementInBase64()

void SBCSerializerMemory::writeStringElementInBase64 ( const std::string &  elementName,
const std::string &  element 
)
virtual

Reimplemented from SBCSerializer.

◆ writeUnsignedCharElement()

void SBCSerializerMemory::writeUnsignedCharElement ( const std::string &  elementName,
unsigned char  element 
)
virtual

Reimplemented from SBCSerializer.

◆ writeUnsignedIntElement()

void SBCSerializerMemory::writeUnsignedIntElement ( const std::string &  elementName,
unsigned int  element 
)
virtual

Reimplemented from SBCSerializer.

◆ writeUnsignedLongElement()

void SBCSerializerMemory::writeUnsignedLongElement ( const std::string &  elementName,
unsigned long  element 
)
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.

◆ writeUnsignedLongLongElement()

void SBCSerializerMemory::writeUnsignedLongLongElement ( const std::string &  elementName,
unsigned long long  element 
)
virtual

Reimplemented from SBCSerializer.

◆ writeUnsignedShortElement()

void SBCSerializerMemory::writeUnsignedShortElement ( const std::string &  elementName,
unsigned short  element 
)
virtual

Reimplemented from SBCSerializer.

◆ writeUUIDElement()

void SBCSerializerMemory::writeUUIDElement ( const std::string &  elementName,
const SBCContainerUUID element 
)
virtual

Reimplemented from SBCSerializer.