Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/serial2/Unserializer.h>
Public Member Functions | |
virtual | ~Unserializer (void) |
virtual void | flush (void)=0 |
virtual void | beginObject (const rtti::Type &clazz, void *object)=0 |
virtual void | endObject (const rtti::Type &clazz, void *object)=0 |
virtual bool | beginField (CString name)=0 |
virtual void | endField (void)=0 |
virtual void | onPointer (const rtti::Type &clazz, void **object)=0 |
virtual bool | beginCompound (void *)=0 |
virtual bool | nextItem (void)=0 |
virtual int | countItems (void)=0 |
virtual void | endCompound (void *)=0 |
virtual int | onEnum (const rtti::Type &clazz)=0 |
virtual void | onValue (bool &v)=0 |
virtual void | onValue (signed int &v)=0 |
virtual void | onValue (unsigned int &v)=0 |
virtual void | onValue (char &v)=0 |
virtual void | onValue (signed char &v)=0 |
virtual void | onValue (unsigned char &v)=0 |
virtual void | onValue (signed short &v)=0 |
virtual void | onValue (unsigned short &v)=0 |
virtual void | onValue (signed long &v)=0 |
virtual void | onValue (unsigned long &v)=0 |
virtual void | onValue (signed long long &v)=0 |
virtual void | onValue (unsigned long long &v)=0 |
virtual void | onValue (float &v)=0 |
virtual void | onValue (double &v)=0 |
virtual void | onValue (long double &v)=0 |
virtual void | onValue (CString &v)=0 |
virtual void | onValue (String &v)=0 |
Base class of unserialization classes. The serialization is the conversion from the memory representation of a data structure to a sequential representation and the unserialization is the reverse operation.
To implement a concrete unserializer, one has to inherit from this class and to override the virtual functions. The unserialization function will be called according the unserialized value.
|
inlinevirtual |
This function is called to unserialize a compound object, that is, an object containing a collection of values with the same type.
object | Compound object to unserialize. |
Implemented in XOMUnserializer.
Referenced by elm::serial2::__unserialize(), CollectionSerializer< Vector< T >, T >::unserialize(), DataSerializer< Vector< T, M >, T >::unserialize(), and CollecAC< Coll, T >::unserialize().
Called to begin the unserialization of a field in an object.
This call is always preceded by call to beginObject() for the object containing the field and there is no more call to this function as soon as the corresponding endObject() call is performed.
Between a call to a beginField() and of a endField(), calls to the unserializer functions are performed to serialize the corresponding data.
name | Name of the field. |
Implemented in XOMUnserializer.
Referenced by elm::serial2::__unserialize().
|
pure virtual |
Called to start the unserialization of a new object.
clazz | Object class descriptor. |
object | Unserialized object. |
Implemented in XOMUnserializer.
Referenced by from_class< T >::unserialize().
|
pure virtual |
This function is called to get the count if items in a compound.
If it only called after a beginCompound() and before any to nextItem().
Implemented in XOMUnserializer.
Referenced by elm::serial2::__unserialize(), CollectionSerializer< Vector< T >, T >::unserialize(), DataSerializer< Vector< T, M >, T >::unserialize(), and CollecAC< Coll, T >::unserialize().
This function is called at the end of a compound.
This function is only called after a call to beginCompound() and matches any call to beginCompound().
Implemented in XOMUnserializer.
Referenced by elm::serial2::__unserialize(), CollectionSerializer< Vector< T >, T >::unserialize(), DataSerializer< Vector< T, M >, T >::unserialize(), and CollecAC< Coll, T >::unserialize().
Called to end the unserialization of a field in an object.
This call is always preceded by call to beginField() and there is no more call to this function as soon as the corresponding endObject() call is performed.
Implemented in XOMUnserializer.
Referenced by elm::serial2::__unserialize().
|
pure virtual |
Called to finish the unserialization of an object. This function call is always preceded by a call to beginObject().
clazz | Object class descriptor. |
object | Unserialized object. |
Implemented in XOMUnserializer.
Referenced by from_class< T >::unserialize().
Implemented in XOMUnserializer.
Afgter getting a value of a compound object, a call to this function must be performed.
This function call is always preceded by a call to beginCompound() and will not call anymore after a call to endCompound().
This call is followed by calls to other unserialization function in order to unserialize the value itself.
Implemented in XOMUnserializer.
Referenced by elm::serial2::__unserialize(), and DataSerializer< Vector< T, M >, T >::unserialize().
|
pure virtual |
Called when a value of type enumerate has to be unserialized.
clazz | Enumerated type. |
Implemented in XOMUnserializer.
Referenced by Enum< T >::unserialize(), and from_enum< T >::unserialize().
|
pure virtual |
This function is called to unserialize a pointer to an object.
clazz | Class of the pointed object. |
object | Pointed object to unserialize. |
Implemented in XOMUnserializer.
Referenced by elm::serial2::__unserialize().
Called to unserialize a value of type boolean.
v | Reference to unserialize in. |
Implemented in XOMUnserializer.
Referenced by elm::serial2::__unserialize(), from_type< T >::unserialize(), IntType< T >::unserialize(), FloatType< T >::unserialize(), BoolType::unserialize(), StringType::unserialize(), and CStringType::unserialize().
|
pure virtual |
Implemented in XOMUnserializer.
Called to unserialize a value of type C string.
v | Reference to unserialize in. |
Implemented in XOMUnserializer.
|
pure virtual |
Called to unserialize a value of type double-precision floating point.
v | Reference to unserialize in. |
Implemented in XOMUnserializer.
|
pure virtual |
Called to unserialize a value of type single-precision floating point.
v | Reference to unserialize in. |
Implemented in XOMUnserializer.
|
pure virtual |
Called to unserialize a value of type quadruple-precision floating point.
v | Reference to unserialize in. |
Implemented in XOMUnserializer.
|
pure virtual |
Implemented in XOMUnserializer.
|
pure virtual |
Called to unserialize a value of type signed integer.
v | Reference to unserialize in. |
Implemented in XOMUnserializer.
|
pure virtual |
Called to unserialize a value of type signed long integer.
v | Reference to unserialize in. |
Implemented in XOMUnserializer.
|
pure virtual |
Called to unserialize a value of type signed long long integer.
v | Reference to unserialize in. |
Implemented in XOMUnserializer.
|
pure virtual |
Called to unserialize a value of type signed short integer.
v | Reference to unserialize in. |
Implemented in XOMUnserializer.
Called to unserialize a value of type ELM string.
v | Reference to unserialize in. |
Implemented in XOMUnserializer.
|
pure virtual |
Called to unserialize a value of type unsigned byte.
v | Reference to unserialize in. |
Implemented in XOMUnserializer.
|
pure virtual |
Called to unserialize a value of type unsigned integer.
v | Reference to unserialize in. |
Implemented in XOMUnserializer.
|
pure virtual |
Called to unserialize a value of type unsigned long integer.
v | Reference to unserialize in. |
Implemented in XOMUnserializer.
|
pure virtual |
Called to unserialize a value of type unsigned long long integer.
v | Value to serialize. |
Implemented in XOMUnserializer.
|
pure virtual |
Called to unserialize a value of type unsigned short integer.
v | Reference to unserialize in. |
Implemented in XOMUnserializer.