cxxtools::SerializationInfo Class Reference

Represents arbitrary types during serialization. More...

#include <cxxtools/serializationinfo.h>

Inheritance diagram for cxxtools::SerializationInfo:
cxxtools::Settings

Classes

class  ConstIterator
class  Iterator
union  U

Public Types

enum  Category { Void = 0, Value = 1, Object = 2, Array = 6 }
typedef long int_type
typedef unsigned long unsigned_type

Public Member Functions

 SerializationInfo ()
 SerializationInfo (const SerializationInfo &si)
 ~SerializationInfo ()
void reserve (size_t n)
Category category () const
void setCategory (Category cat)
SerializationInfoparent ()
const SerializationInfoparent () const
const std::string & typeName () const
void setTypeName (const std::string &type)
const std::string & name () const
void setName (const std::string &name)
void setValue (const String &value)
 Serialization of flat data-types.
void setValue (const std::string &value)
void setValue (const char *value)
void setValue (Char value)
void setValue (wchar_t value)
void setValue (bool value)
void setValue (char value)
void setValue (unsigned char value)
void setValue (short value)
void setValue (unsigned short value)
void setValue (int value)
void setValue (unsigned int value)
void setValue (long value)
void setValue (unsigned long value)
void setValue (float value)
void setValue (double value)
void setValue (long double value)
void setNull ()
void getValue (String &value) const
 Deserialization of flat data-types.
void getValue (std::string &value) const
void getValue (Char &value) const
void getValue (wchar_t &value) const
void getValue (bool &value) const
void getValue (char &value) const
void getValue (signed char &value) const
void getValue (unsigned char &value) const
void getValue (short &value) const
void getValue (unsigned short &value) const
void getValue (int &value) const
void getValue (unsigned int &value) const
void getValue (long &value) const
void getValue (unsigned long &value) const
void getValue (float &value) const
void getValue (double &value) const
void getValue (long double &value) const
template<typename T >
SerializationInfoaddValue (const std::string &name, const T &value)
 Serialization of flat member data-types.
SerializationInfoaddMember (const std::string &name)
 Serialization of member data.
const SerializationInfogetMember (const std::string &name) const
 Deserialization of member data.
const SerializationInfogetMember (unsigned idx) const
 Deserialization of member data.
template<typename T >
bool getMember (const std::string &name, T &value) const
 Deserialization of member data.
const SerializationInfofindMember (const std::string &name) const
 Find member data by name.
SerializationInfofindMember (const std::string &name)
 Find member data by name.
size_t memberCount () const
Iterator begin ()
Iterator end ()
ConstIterator begin () const
ConstIterator end () const
SerializationInfooperator= (const SerializationInfo &si)
void clear ()
void swap (SerializationInfo &si)
bool isNull () const
bool isString () const
bool isString8 () const
bool isChar () const
bool isBool () const
bool isInt () const
bool isUInt () const
bool isFloat () const
void dump (std::ostream &out, const std::string &praefix=std::string()) const

Protected Member Functions

void setParent (SerializationInfo &si)

Detailed Description

Represents arbitrary types during serialization.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator:
Void 
Value 
Object 
Array 

Constructor & Destructor Documentation

cxxtools::SerializationInfo::SerializationInfo ( )
cxxtools::SerializationInfo::SerializationInfo ( const SerializationInfo si)
cxxtools::SerializationInfo::~SerializationInfo ( )
inline

Member Function Documentation

SerializationInfo& cxxtools::SerializationInfo::addMember ( const std::string &  name)

Serialization of member data.

template<typename T >
SerializationInfo& cxxtools::SerializationInfo::addValue ( const std::string &  name,
const T &  value 
)
inline

Serialization of flat member data-types.

Iterator cxxtools::SerializationInfo::begin ( )
ConstIterator cxxtools::SerializationInfo::begin ( ) const
Category cxxtools::SerializationInfo::category ( ) const
inline
void cxxtools::SerializationInfo::clear ( )
void cxxtools::SerializationInfo::dump ( std::ostream &  out,
const std::string &  praefix = std::string() 
) const
Iterator cxxtools::SerializationInfo::end ( )
ConstIterator cxxtools::SerializationInfo::end ( ) const
const SerializationInfo* cxxtools::SerializationInfo::findMember ( const std::string &  name) const

Find member data by name.

This method returns the data for an object with the name name. or null if it is not present.

SerializationInfo* cxxtools::SerializationInfo::findMember ( const std::string &  name)

Find member data by name.

This method returns the data for an object with the name name. or null if it is not present.

const SerializationInfo& cxxtools::SerializationInfo::getMember ( const std::string &  name) const

Deserialization of member data.

Exceptions
SerializationErrorwhen member is not found.
const SerializationInfo& cxxtools::SerializationInfo::getMember ( unsigned  idx) const

Deserialization of member data.

Exceptions
std::range_errorwhen index is too large
template<typename T >
bool cxxtools::SerializationInfo::getMember ( const std::string &  name,
T &  value 
) const
inline

Deserialization of member data.

Returns
true if member is found, false otherwise. The passed value is not modified when the member was not found.
void cxxtools::SerializationInfo::getValue ( String value) const

Deserialization of flat data-types.

void cxxtools::SerializationInfo::getValue ( std::string &  value) const
void cxxtools::SerializationInfo::getValue ( Char value) const
inline
void cxxtools::SerializationInfo::getValue ( wchar_t &  value) const
inline
void cxxtools::SerializationInfo::getValue ( bool &  value) const
inline
void cxxtools::SerializationInfo::getValue ( char &  value) const
inline
void cxxtools::SerializationInfo::getValue ( signed char &  value) const
inline
void cxxtools::SerializationInfo::getValue ( unsigned char &  value) const
inline
void cxxtools::SerializationInfo::getValue ( short &  value) const
inline
void cxxtools::SerializationInfo::getValue ( unsigned short &  value) const
inline
void cxxtools::SerializationInfo::getValue ( int &  value) const
inline
void cxxtools::SerializationInfo::getValue ( unsigned int &  value) const
inline
void cxxtools::SerializationInfo::getValue ( long &  value) const
inline
void cxxtools::SerializationInfo::getValue ( unsigned long &  value) const
inline
void cxxtools::SerializationInfo::getValue ( float &  value) const
inline
void cxxtools::SerializationInfo::getValue ( double &  value) const
inline
void cxxtools::SerializationInfo::getValue ( long double &  value) const
inline
bool cxxtools::SerializationInfo::isBool ( ) const
inline
bool cxxtools::SerializationInfo::isChar ( ) const
inline
bool cxxtools::SerializationInfo::isFloat ( ) const
inline
bool cxxtools::SerializationInfo::isInt ( ) const
inline
bool cxxtools::SerializationInfo::isNull ( ) const
inline
bool cxxtools::SerializationInfo::isString ( ) const
inline
bool cxxtools::SerializationInfo::isString8 ( ) const
inline
bool cxxtools::SerializationInfo::isUInt ( ) const
inline
size_t cxxtools::SerializationInfo::memberCount ( ) const
inline
const std::string& cxxtools::SerializationInfo::name ( ) const
inline
SerializationInfo& cxxtools::SerializationInfo::operator= ( const SerializationInfo si)
SerializationInfo* cxxtools::SerializationInfo::parent ( )
inline
const SerializationInfo* cxxtools::SerializationInfo::parent ( ) const
inline
void cxxtools::SerializationInfo::reserve ( size_t  n)
void cxxtools::SerializationInfo::setCategory ( Category  cat)
inline
void cxxtools::SerializationInfo::setName ( const std::string &  name)
inline
void cxxtools::SerializationInfo::setNull ( )
void cxxtools::SerializationInfo::setParent ( SerializationInfo si)
inlineprotected
void cxxtools::SerializationInfo::setTypeName ( const std::string &  type)
inline
void cxxtools::SerializationInfo::setValue ( const String value)
inline

Serialization of flat data-types.

void cxxtools::SerializationInfo::setValue ( const std::string &  value)
inline
void cxxtools::SerializationInfo::setValue ( const char *  value)
inline
void cxxtools::SerializationInfo::setValue ( Char  value)
inline
void cxxtools::SerializationInfo::setValue ( wchar_t  value)
inline
void cxxtools::SerializationInfo::setValue ( bool  value)
inline
void cxxtools::SerializationInfo::setValue ( char  value)
inline
void cxxtools::SerializationInfo::setValue ( unsigned char  value)
inline
void cxxtools::SerializationInfo::setValue ( short  value)
inline
void cxxtools::SerializationInfo::setValue ( unsigned short  value)
inline
void cxxtools::SerializationInfo::setValue ( int  value)
inline
void cxxtools::SerializationInfo::setValue ( unsigned int  value)
inline
void cxxtools::SerializationInfo::setValue ( long  value)
inline
void cxxtools::SerializationInfo::setValue ( unsigned long  value)
inline
void cxxtools::SerializationInfo::setValue ( float  value)
inline
void cxxtools::SerializationInfo::setValue ( double  value)
inline
void cxxtools::SerializationInfo::setValue ( long double  value)
inline
void cxxtools::SerializationInfo::swap ( SerializationInfo si)
const std::string& cxxtools::SerializationInfo::typeName ( ) const
inline

The documentation for this class was generated from the following file: