#include <cel_serializable.h>

Public Member Functions | |
| virtual void | serialize (Stream *inStream, size_t inLevel, Endian inEndian) |
| virtual AutoPtr< Serializable > | duplicate () const |
| T & | getValue () |
| const T & | getValue () const |
Public Member Functions inherited from Celartem::Serializable | |
| const Guid & | getClassId () const |
| String | getClassName () const |
Public Member Functions inherited from Celartem::Referable | |
| Referable () | |
| void | addRef () const |
| void | releaseRef () const |
| size_t | getReferenceCount () const |
Static Public Member Functions | |
| static Serializable * | create (const T &t) |
| static AutoPtr< Serializable > | deserialize (Stream *inStream, size_t inLevel, Endian inEndian) |
Static Public Member Functions inherited from Celartem::Referable | |
| static void | dumpDbgAllRefCount () |
This class template is to add serialize/deserialize feature to existing non-serializable classes.
With this class, all you have to do is to implement following two methods:
They should be normal methods; NOT virtual methods.
|
inlinestatic |
This method is a factory for the Serializable instance from the specified instance of T .
| t | The instance to store. |
|
inlinestatic |
This method only calles the deserialize method of T.
| inStream | The stream from which the instance information is read. |
| inLevel | The de-serialization level. In the top level, this value is 0. |
| inEndian | The endianness used to read the data. |
|
inlinevirtual |
To deal with duplicate method, the data type used with SerializableData template should be shared without any risk.
Implements Celartem::Serializable.
|
inline |
This method returns a reference to the T instance.
|
inline |
This method returns a const reference to the T instance.
|
inlinevirtual |
This method only calls the serialize method of T .
| inStream | The stream to which the instance information is written. |
| inLevel | The serialization level. In the top level, this value is 0. |
| inEndian | The endianness used to write the data. |
Implements Celartem::Serializable.