CnC
|
Classes | |
class | explicitly_serializable |
Specifies serialization category: explicit serialization via a "serialize" function. More... | |
class | bitwise_serializable |
simple structs/classes are bitwise serializable. More... | |
class | chunk< T, Allocator > |
Serialization of arrays with and without automatic memory handling. More... | |
class | serializer |
Handles serilialization of data-objects. More... | |
Modules | |
Serialization of simple structs/classes without pointers or virtual functions. | |
Non bitwise serializable objects | |
Marshalling pointer types (e.g. items which are pointers) | |
Automatic serialization of built-in types. | |
Defines | |
#define | CNC_BITWISE_SERIALIZABLE(T) |
#define | CNC_POINTER_SERIALIZABLE(T) |
Functions | |
template<class T > | |
explicitly_serializable | serializer_category (const T *) |
There are three possible ways of setting up the serialization of your struct resp. class:
#define CNC_BITWISE_SERIALIZABLE | ( | T | ) |
inline CnC::bitwise_serializable serializer_category( const T * ) { \ return CnC::bitwise_serializable(); \ }
Convenience macro for defining that a type should be treated as bitwise serializable:
Definition at line 238 of file serializer.h.
#define CNC_POINTER_SERIALIZABLE | ( | T | ) |
namespace CnC { \
void serialize( serializer & ser, T *& t ) { \
ser & chunk< T >(t, 1); \
} \
}
Convenience macro for declaring serializable pointers. The object being pointed to should be serializable.
Definition at line 302 of file serializer.h.
explicitly_serializable CnC::serializer_category | ( | const T * | ) | [inline] |
General case: a type belongs to the category explicitly_serializable, unless there is a specialization of the function template "serializer_category" (see below).
Definition at line 225 of file serializer.h.
{
return explicitly_serializable();
}