CnC
 All Classes Namespaces Functions Variables Typedefs Enumerator Friends Groups Pages
Modules | Classes | Macros | Functions
Serialization

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.

Classes

class  serializable
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...

Macros

#define CNC_BITWISE_SERIALIZABLE(T)
#define CNC_POINTER_SERIALIZABLE(T)

Functions

template<class T >
explicitly_serializable serializer_category (const T *)

Detailed Description

There are three possible ways of setting up the serialization of your struct resp. class:


Macro Definition Documentation

#define CNC_BITWISE_SERIALIZABLE (   T)
Value:

Convenience macro for defining that a type should be treated as bitwise serializable:

Definition at line 226 of file serializer.h.

#define CNC_POINTER_SERIALIZABLE (   T)
Value:
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 288 of file serializer.h.


Function Documentation

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 213 of file serializer.h.

{
return explicitly_serializable();
}