Classes | Namespaces | Macros | Typedefs
cel_serializable.h File Reference

Serializable Class Definition. More...

#include "cel_memory.h"
#include "cel_autoptr.h"
#include "cel_string.h"
#include "cel_guid.h"
#include <vector>
#include <typeinfo>
Include dependency graph for cel_serializable.h:
This graph shows which files directly or indirectly include this file:

Classes

class  Celartem::Serializable
 
struct  Celartem::SerializableDataHelper< T, IS_POD >
 
struct  Celartem::SerializableDataHelper< T, true >
 
class  Celartem::SerializableData< T >
 

Namespaces

 Celartem
 

Macros

#define REGISTER_SERIALIZABLECLASS(ID, CLASSNAME)
 
#define REGISTER_SERIALIZABLECLASS2(ID, CLASSNAME, DISPNAME)
 

Typedefs

typedef AutoPtr< Serializable >(* Celartem::DeserializeFunc )(Stream *inStream, size_t inLevel, Endian inEndian)
 

Detailed Description

Serializable Class Definition.

Macro Definition Documentation

#define REGISTER_SERIALIZABLECLASS (   ID,
  CLASSNAME 
)
Value:
::Celartem::Serializable::registerClass( \
ID,#CLASSNAME, typeid(CLASSNAME).name(), CLASSNAME::deserialize)

This macro is used to register user defined Celartem::Serializable derivative classes.
If you don't need to change the display name of registered class, use REGISTER_SERIALIZABLECLASS like follows:

"{F9BD76CF-1077-4bee-9DA9-1AC9B9E1A751}", MySerializableClass);
See Also
Celartem::Serializable, Celartem::DataStore, Celartem::DeserializeFunc
REGISTER_SERIALIZABLECLASS2
#define REGISTER_SERIALIZABLECLASS2 (   ID,
  CLASSNAME,
  DISPNAME 
)
Value:
::Celartem::Serializable::registerClass( \
ID,DISPNAME, typeid(CLASSNAME).name(), CLASSNAME::deserialize)

This macro is used to register user defined Celartem::Serializable derivative classes.
If your class does not have Celartem::Serializable feature natively, you may use Celartem::SerializableData<> adapter to deal with it, and then you feel to simplify the name obtained from typeinfo structure. REGISTER_SERIALIZABLECLASS2 is just for this purpose:

"{257382B3-79F2-486a-8F4E-F3577B48E940}",
SerializableData<MyDataClass>, "MyDataClass");
See Also
Celartem::Serializable, Celartem::DataStore, Celartem::DeserializeFunc
REGISTER_SERIALIZABLECLASS

Cuminas DjVu SDK 3.0.33103
This document is made with doxygen 1.8.5 at Sun Dec 15 2013 19:38:05.
Cuminas Logo