Web Analytics Made Easy - Statcounter
Skip to content

Class SBCSerializerMemory#

ClassList > SBCSerializerMemory

More...

  • #include <SBCSerializerMemory.hpp>

Inherits the following classes: SBCSerializer

Public Functions#

Type Name
SBCSerializerMemory ()
void clear ()
char * getData () const
unsigned int getDataSize () const
virtual bool readBoolElement ()
Reads an element of boolean type.
virtual char * readCharArrayElement (unsigned int & arraySize)
Reads an element of char array type of size arraySize .
virtual char readCharElement ()
Reads an element of char type.
virtual double readDoubleElement ()
Reads an element of double type.
virtual void readEndElement ()
Reads the end element.
virtual float readFloatElement ()
Reads an element of float type.
virtual int readIntElement ()
Reads an element of integer type.
virtual long readLongElement ()
Reads an element of long integer type.
virtual long long readLongLongElement ()
Reads an element of long long integer type.
virtual short readShortElement ()
Reads an element of short integer type.
virtual void readStartElement ()
Reads the start 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 SBCContainerUUID readUUIDElement ()
Reads an element of UUID type.
virtual unsigned char readUnsignedCharElement ()
Reads an element of unsigned char type.
virtual unsigned int readUnsignedIntElement ()
Reads an element of unsigned integer type.
virtual unsigned long readUnsignedLongElement ()
Reads an element of unsigned long integer type.
virtual unsigned long long readUnsignedLongLongElement ()
Reads an element of unsigned long long integer type.
virtual unsigned short readUnsignedShortElement ()
Reads an element of unsigned short integer type.
void rewind ()
virtual void writeBoolElement (const std::string & elementName, bool element)
Writes an element of boolean type with elementName name and valueelement .
virtual void writeCharArrayElement (const std::string & elementName, const char * elementArray, unsigned int arraySize)
Writes an element of char array type with elementName name of sizearraySize and valueselementArray .
virtual void writeCharElement (const std::string & elementName, char element)
Writes an element of char type with elementName name and valueelement .
virtual void writeDoubleElement (const std::string & elementName, double element)
Writes an element of double type with elementName name and valueelement .
virtual void writeEndElement ()
Writes the end element.
virtual void writeFloatElement (const std::string & elementName, float element)
Writes an element of float type with elementName name and valueelement .
virtual void writeIntElement (const std::string & elementName, int element)
Writes an element of integer type with elementName name and valueelement .
virtual void writeLongElement (const std::string & elementName, long element)
Writes an element of long integer type with elementName name and valueelement .
virtual void writeLongLongElement (const std::string & elementName, long long element)
Writes an element of long long integer type with elementName name and valueelement .
virtual void writeShortElement (const std::string & elementName, short element)
Writes an element of short integer type with elementName name and valueelement .
virtual void writeStartElement (const std::string & elementName)
Writes the start element with elementName name.
virtual void writeStringElement (const std::string & elementName, const std::string & element)
Writes an element of string type with elementName name and valueelement .
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 valueelement .
virtual void writeUUIDElement (const std::string & elementName, const SBCContainerUUID & element)
Writes an element of UUID type with elementName name and valueelement .
virtual void writeUnsignedCharElement (const std::string & elementName, unsigned char element)
Writes an element of unsigned char type with elementName name and valueelement .
virtual void writeUnsignedIntElement (const std::string & elementName, unsigned int element)
Writes an element of unsigned integer type with elementName name and valueelement .
virtual void writeUnsignedLongElement (const std::string & elementName, unsigned long element)
Writes an element of unsigned long integer type with elementName name and valueelement .
virtual void writeUnsignedLongLongElement (const std::string & elementName, unsigned long long element)
Writes an element of unsigned long long integer type with elementName name and valueelement .
virtual void writeUnsignedShortElement (const std::string & elementName, unsigned short element)
Writes an element of unsigned short integer type with elementName name and valueelement .
virtual ~SBCSerializerMemory ()

Public Functions inherited from SBCSerializer#

See SBCSerializer

Type Name
SBCSerializer ()
virtual bool readBoolElement ()
Reads an element of boolean type.
virtual char * readCharArrayElement (unsigned int & arraySize)
Reads an element of char array type of size arraySize .
virtual char readCharElement ()
Reads an element of char type.
virtual double readDoubleElement ()
Reads an element of double type.
virtual void readEndElement ()
Reads the end element.
virtual float readFloatElement ()
Reads an element of float type.
virtual int readIntElement ()
Reads an element of integer type.
virtual long readLongElement ()
Reads an element of long integer type.
virtual long long readLongLongElement ()
Reads an element of long long integer type.
virtual short readShortElement ()
Reads an element of short integer type.
virtual void readStartElement ()
Reads the start 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 SBCContainerUUID readUUIDElement ()
Reads an element of UUID type.
virtual unsigned char readUnsignedCharElement ()
Reads an element of unsigned char type.
virtual unsigned int readUnsignedIntElement ()
Reads an element of unsigned integer type.
virtual unsigned long readUnsignedLongElement ()
Reads an element of unsigned long integer type.
virtual unsigned long long readUnsignedLongLongElement ()
Reads an element of unsigned long long integer type.
virtual unsigned short readUnsignedShortElement ()
Reads an element of unsigned short integer type.
virtual void writeBoolElement (const std::string & elementName, bool element)
Writes an element of boolean type with elementName name and valueelement .
virtual void writeCharArrayElement (const std::string & elementName, const char * elementArray, unsigned int arraySize)
Writes an element of char array type with elementName name of sizearraySize and valueselementArray .
virtual void writeCharElement (const std::string & elementName, char element)
Writes an element of char type with elementName name and valueelement .
virtual void writeDoubleElement (const std::string & elementName, double element)
Writes an element of double type with elementName name and valueelement .
virtual void writeEndElement ()
Writes the end element.
virtual void writeFloatElement (const std::string & elementName, float element)
Writes an element of float type with elementName name and valueelement .
virtual void writeIntElement (const std::string & elementName, int element)
Writes an element of integer type with elementName name and valueelement .
virtual void writeLongElement (const std::string & elementName, long element)
Writes an element of long integer type with elementName name and valueelement .
virtual void writeLongLongElement (const std::string & elementName, long long element)
Writes an element of long long integer type with elementName name and valueelement .
virtual void writeShortElement (const std::string & elementName, short element)
Writes an element of short integer type with elementName name and valueelement .
virtual void writeStartElement (const std::string & elementName)
Writes the start element with elementName name.
virtual void writeStringElement (const std::string & elementName, const std::string & element)
Writes an element of string type with elementName name and valueelement .
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 valueelement .
virtual void writeUUIDElement (const std::string & elementName, const SBCContainerUUID & element)
Writes an element of UUID type with elementName name and valueelement .
virtual void writeUnsignedCharElement (const std::string & elementName, unsigned char element)
Writes an element of unsigned char type with elementName name and valueelement .
virtual void writeUnsignedIntElement (const std::string & elementName, unsigned int element)
Writes an element of unsigned integer type with elementName name and valueelement .
virtual void writeUnsignedLongElement (const std::string & elementName, unsigned long element)
Writes an element of unsigned long integer type with elementName name and valueelement .
virtual void writeUnsignedLongLongElement (const std::string & elementName, unsigned long long element)
Writes an element of unsigned long long integer type with elementName name and valueelement .
virtual void writeUnsignedShortElement (const std::string & elementName, unsigned short element)
Writes an element of unsigned short integer type with elementName name and valueelement .
virtual ~SBCSerializer ()

Protected Attributes#

Type Name
SBVector< char > * dataVector
unsigned int position

Protected Functions#

Type Name
void readCharArray (char * charArray, unsigned int arraySize)
void writeCharArray (const char * elementArray, unsigned int arraySize)

Detailed Description#

This class describes a serializer in memory

Short name: SBSerializerMemory

Public Functions Documentation#

function SBCSerializerMemory#

SBCSerializerMemory::SBCSerializerMemory () 

function clear#

void SBCSerializerMemory::clear () 

function getData#

char * SBCSerializerMemory::getData () const

function getDataSize#

unsigned int SBCSerializerMemory::getDataSize () const

function readBoolElement#

Reads an element of boolean type.

virtual bool SBCSerializerMemory::readBoolElement () 

Implements SBCSerializer::readBoolElement


function readCharArrayElement#

Reads an element of char array type of size arraySize .

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

Implements SBCSerializer::readCharArrayElement


function readCharElement#

Reads an element of char type.

virtual char SBCSerializerMemory::readCharElement () 

Implements SBCSerializer::readCharElement


function readDoubleElement#

Reads an element of double type.

virtual double SBCSerializerMemory::readDoubleElement () 

Implements SBCSerializer::readDoubleElement


function readEndElement#

Reads the end element.

virtual void SBCSerializerMemory::readEndElement () 

Implements SBCSerializer::readEndElement


function readFloatElement#

Reads an element of float type.

virtual float SBCSerializerMemory::readFloatElement () 

Implements SBCSerializer::readFloatElement


function readIntElement#

Reads an element of integer type.

virtual int SBCSerializerMemory::readIntElement () 

Implements SBCSerializer::readIntElement


function readLongElement#

Reads an element of long integer type.

virtual long SBCSerializerMemory::readLongElement () 

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.

Implements SBCSerializer::readLongElement


function readLongLongElement#

Reads an element of long long integer type.

virtual long long SBCSerializerMemory::readLongLongElement () 

Implements SBCSerializer::readLongLongElement


function readShortElement#

Reads an element of short integer type.

virtual short SBCSerializerMemory::readShortElement () 

Implements SBCSerializer::readShortElement


function readStartElement#

Reads the start element.

virtual void SBCSerializerMemory::readStartElement () 

Implements SBCSerializer::readStartElement


function readStringElement#

Reads an element of string type.

virtual std::string SBCSerializerMemory::readStringElement () 

Implements SBCSerializer::readStringElement


function readStringElementFromBase64#

Reads an element of string type in Base64 (supports html)

virtual std::string SBCSerializerMemory::readStringElementFromBase64 () 

Implements SBCSerializer::readStringElementFromBase64


function readUUIDElement#

Reads an element of UUID type.

virtual SBCContainerUUID SBCSerializerMemory::readUUIDElement () 

Implements SBCSerializer::readUUIDElement


function readUnsignedCharElement#

Reads an element of unsigned char type.

virtual unsigned char SBCSerializerMemory::readUnsignedCharElement () 

Implements SBCSerializer::readUnsignedCharElement


function readUnsignedIntElement#

Reads an element of unsigned integer type.

virtual unsigned int SBCSerializerMemory::readUnsignedIntElement () 

Implements SBCSerializer::readUnsignedIntElement


function readUnsignedLongElement#

Reads an element of unsigned long integer type.

virtual unsigned long SBCSerializerMemory::readUnsignedLongElement () 

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.

Implements SBCSerializer::readUnsignedLongElement


function readUnsignedLongLongElement#

Reads an element of unsigned long long integer type.

virtual unsigned long long SBCSerializerMemory::readUnsignedLongLongElement () 

Implements SBCSerializer::readUnsignedLongLongElement


function readUnsignedShortElement#

Reads an element of unsigned short integer type.

virtual unsigned short SBCSerializerMemory::readUnsignedShortElement () 

Implements SBCSerializer::readUnsignedShortElement


function rewind#

void SBCSerializerMemory::rewind () 

function writeBoolElement#

Writes an element of boolean type with elementName name and valueelement .

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

Implements SBCSerializer::writeBoolElement


function writeCharArrayElement#

Writes an element of char array type with elementName name of sizearraySize and valueselementArray .

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

Implements SBCSerializer::writeCharArrayElement


function writeCharElement#

Writes an element of char type with elementName name and valueelement .

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

Implements SBCSerializer::writeCharElement


function writeDoubleElement#

Writes an element of double type with elementName name and valueelement .

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

Implements SBCSerializer::writeDoubleElement


function writeEndElement#

Writes the end element.

virtual void SBCSerializerMemory::writeEndElement () 

Implements SBCSerializer::writeEndElement


function writeFloatElement#

Writes an element of float type with elementName name and valueelement .

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

Implements SBCSerializer::writeFloatElement


function writeIntElement#

Writes an element of integer type with elementName name and valueelement .

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

Implements SBCSerializer::writeIntElement


function writeLongElement#

Writes an element of long integer type with elementName name and valueelement .

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

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.

Implements SBCSerializer::writeLongElement


function writeLongLongElement#

Writes an element of long long integer type with elementName name and valueelement .

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

Implements SBCSerializer::writeLongLongElement


function writeShortElement#

Writes an element of short integer type with elementName name and valueelement .

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

Implements SBCSerializer::writeShortElement


function writeStartElement#

Writes the start element with elementName name.

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

Implements SBCSerializer::writeStartElement


function writeStringElement#

Writes an element of string type with elementName name and valueelement .

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

Implements SBCSerializer::writeStringElement


function writeStringElementInBase64#

Writes an element of string type in Base64 (supports html) with elementName name and valueelement .

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

Implements SBCSerializer::writeStringElementInBase64


function writeUUIDElement#

Writes an element of UUID type with elementName name and valueelement .

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

Implements SBCSerializer::writeUUIDElement


function writeUnsignedCharElement#

Writes an element of unsigned char type with elementName name and valueelement .

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

Implements SBCSerializer::writeUnsignedCharElement


function writeUnsignedIntElement#

Writes an element of unsigned integer type with elementName name and valueelement .

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

Implements SBCSerializer::writeUnsignedIntElement


function writeUnsignedLongElement#

Writes an element of unsigned long integer type with elementName name and valueelement .

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

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.

Implements SBCSerializer::writeUnsignedLongElement


function writeUnsignedLongLongElement#

Writes an element of unsigned long long integer type with elementName name and valueelement .

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

Implements SBCSerializer::writeUnsignedLongLongElement


function writeUnsignedShortElement#

Writes an element of unsigned short integer type with elementName name and valueelement .

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

Implements SBCSerializer::writeUnsignedShortElement


function ~SBCSerializerMemory#

virtual SBCSerializerMemory::~SBCSerializerMemory () 

Protected Attributes Documentation#

variable dataVector#

SBVector<char>* dataVector;

variable position#

unsigned int position;

Protected Functions Documentation#

function readCharArray#

void SBCSerializerMemory::readCharArray (
    char * charArray,
    unsigned int arraySize
) 

function writeCharArray#

void SBCSerializerMemory::writeCharArray (
    const char * elementArray,
    unsigned int arraySize
)