Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
Serializable Class Referenceabstract

#include <elm/rtti/Type.h>

+ Inheritance diagram for Serializable:

Public Member Functions

virtual ~Serializable (void)
 
virtual const Typetype (void) const =0
 
virtual voidinstantiate (void) const =0
 
virtual void serialize (serial2::Serializer &ser, const void *data) const =0
 
virtual void unserialize (serial2::Unserializer &uns, void *data) const =0
 

Detailed Description

This interface is provided by types supporting serializable facilities.

Constructor & Destructor Documentation

◆ ~Serializable()

~Serializable ( void  )
virtual

Member Function Documentation

◆ instantiate()

◆ serialize()

void serialize ( serial2::Serializer ser,
const void data 
) const
pure virtual

Serialize the data passed in parameter that must be of type corresponding to the interface.

Parameters
serSerializer to use.
dataPointer to data to serialize.

Implemented in CollectionSerializer< C, T >, CollectionSerializer< Vector< T >, T >, CStringType, StringType, BoolType, FloatType< T >, IntType< T >, and Class< T, B >.

◆ type()

const Type & type ( void  ) const
pure virtual

Get the type corresponding to this enumerable interface.

Returns
Corresponding type.

Implemented in CStringType, StringType, BoolType, FloatType< T >, IntType< T >, and AbstractClass.

◆ unserialize()

void unserialize ( serial2::Unserializer uns,
void data 
) const
pure virtual

Unserialize the coming data from the unserializer to the place pointed by data. This place must be of the same type as the serializable type.

Parameters
unsUnserializer to get data from.
dataPointer to place to unserialize in.

Implemented in CollectionSerializer< C, T >, CollectionSerializer< Vector< T >, T >, Class< T, B >, CStringType, StringType, BoolType, FloatType< T >, and IntType< T >.


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