Loading...
Searching...
No Matches
SBCSerializerXML Class Reference

This class describes an XML serializer.

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.
 

Constructors and destructors

 SBCSerializerXML (const std::string &fileName, bool write)
 
virtual ~SBCSerializerXML ()
 

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.
 

Additional Inherited Members

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

Member Function Documentation

◆ readBoolElement()

bool SBCSerializerXML::readBoolElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readCharArrayElement()

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

Reimplemented from SBCSerializer.

◆ readCharElement()

char SBCSerializerXML::readCharElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readDoubleElement()

double SBCSerializerXML::readDoubleElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readEndElement()

void SBCSerializerXML::readEndElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readFloatElement()

float SBCSerializerXML::readFloatElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readIntElement()

int SBCSerializerXML::readIntElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readLongElement()

long SBCSerializerXML::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 SBCSerializerXML::readLongLongElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readShortElement()

short SBCSerializerXML::readShortElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readStartElement()

void SBCSerializerXML::readStartElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readStringElement()

std::string SBCSerializerXML::readStringElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readStringElementFromBase64()

std::string SBCSerializerXML::readStringElementFromBase64 ( )
virtual

Reimplemented from SBCSerializer.

◆ readUnsignedCharElement()

unsigned char SBCSerializerXML::readUnsignedCharElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readUnsignedIntElement()

unsigned int SBCSerializerXML::readUnsignedIntElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readUnsignedLongElement()

unsigned long SBCSerializerXML::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 SBCSerializerXML::readUnsignedLongLongElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readUnsignedShortElement()

unsigned short SBCSerializerXML::readUnsignedShortElement ( )
virtual

Reimplemented from SBCSerializer.

◆ readUUIDElement()

SBCContainerUUID SBCSerializerXML::readUUIDElement ( )
virtual

Reimplemented from SBCSerializer.

◆ writeBoolElement()

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

Reimplemented from SBCSerializer.

◆ writeCharArrayElement()

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

Reimplemented from SBCSerializer.

◆ writeCharElement()

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

Reimplemented from SBCSerializer.

◆ writeDoubleElement()

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

Reimplemented from SBCSerializer.

◆ writeEndElement()

void SBCSerializerXML::writeEndElement ( )
virtual

Reimplemented from SBCSerializer.

◆ writeFloatElement()

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

Reimplemented from SBCSerializer.

◆ writeIntElement()

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

Reimplemented from SBCSerializer.

◆ writeLongElement()

void SBCSerializerXML::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 SBCSerializerXML::writeLongLongElement ( const std::string &  elementName,
long long  element 
)
virtual

Reimplemented from SBCSerializer.

◆ writeShortElement()

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

Reimplemented from SBCSerializer.

◆ writeStartElement()

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

Reimplemented from SBCSerializer.

◆ writeStringElement()

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

Reimplemented from SBCSerializer.

◆ writeStringElementInBase64()

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

Reimplemented from SBCSerializer.

◆ writeUnsignedCharElement()

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

Reimplemented from SBCSerializer.

◆ writeUnsignedIntElement()

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

Reimplemented from SBCSerializer.

◆ writeUnsignedLongElement()

void SBCSerializerXML::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 SBCSerializerXML::writeUnsignedLongLongElement ( const std::string &  elementName,
unsigned long long  element 
)
virtual

Reimplemented from SBCSerializer.

◆ writeUnsignedShortElement()

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

Reimplemented from SBCSerializer.

◆ writeUUIDElement()

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

Reimplemented from SBCSerializer.