80 |
*/ |
*/ |
81 |
namespace Serialization { |
namespace Serialization { |
82 |
|
|
83 |
|
// just symbol prototyping |
84 |
|
class DataType; |
85 |
|
class Object; |
86 |
|
class Member; |
87 |
class Archive; |
class Archive; |
88 |
|
class ObjectPool; |
89 |
class Exception; |
class Exception; |
90 |
|
|
91 |
typedef std::string String; |
typedef std::string String; |
177 |
|
|
178 |
typedef std::vector<UID> UIDChain; |
typedef std::vector<UID> UIDChain; |
179 |
|
|
180 |
|
// prototyping of private internal friend functions |
181 |
|
static DataType _popDataTypeBlob(const char*& p, const char* end); |
182 |
|
static Member _popMemberBlob(const char*& p, const char* end); |
183 |
|
static Object _popObjectBlob(const char*& p, const char* end); |
184 |
|
static void _popPrimitiveValue(const char*& p, const char* end, Object& obj); |
185 |
|
|
186 |
/** @brief Abstract reflection of a native C++ data type. |
/** @brief Abstract reflection of a native C++ data type. |
187 |
* |
* |
188 |
* Provides detailed information about a C++ data type, whether it is a |
* Provides detailed information about a C++ data type, whether it is a |
393 |
* @code |
* @code |
394 |
* Archive a; |
* Archive a; |
395 |
* a.serialize(&myRootObject); |
* a.serialize(&myRootObject); |
396 |
* @encode |
* @endcode |
397 |
* Or if you prefer the look of operator based code: |
* Or if you prefer the look of operator based code: |
398 |
* @code |
* @code |
399 |
* Archive a; |
* Archive a; |
400 |
* a << myRootObject; |
* a << myRootObject; |
401 |
* @encode |
* @endcode |
402 |
* The Archive object will then serialize all members of the passed C++ |
* The Archive object will then serialize all members of the passed C++ |
403 |
* object, and will recursively serialize all other C++ objects which it |
* object, and will recursively serialize all other C++ objects which it |
404 |
* contains or points to. So the root object is the starting point for the |
* contains or points to. So the root object is the starting point for the |
413 |
* @code |
* @code |
414 |
* Archive a(rawDataStream); |
* Archive a(rawDataStream); |
415 |
* a.deserialize(&myRootObject); |
* a.deserialize(&myRootObject); |
416 |
* @encode |
* @endcode |
417 |
* Or with operator instead: |
* Or with operator instead: |
418 |
* @code |
* @code |
419 |
* Archive a(rawDataStream); |
* Archive a(rawDataStream); |
420 |
* a >> myRootObject; |
* a >> myRootObject; |
421 |
* @encode |
* @endcode |
422 |
* Now this framework automatically handles serialization and |
* Now this framework automatically handles serialization and |
423 |
* deserialization of fundamental data types automatically for you (like |
* deserialization of fundamental data types automatically for you (like |
424 |
* i.e. char, int, long int, float, double, etc.). However for your own |
* i.e. char, int, long int, float, double, etc.). However for your own |