#include <map>#include <util.h>#include "DebugLogger.h"#include "Continuation.h"#include "SerialTypes.h"#include "config.h"Include dependency graph for SerialObj.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Classes | |
| class | AutoPush |
| class | SerialObj |
| class | SerialTypeRegistrator |
| class | TransientID |
Defines | |
| #define | DECLARE_ABSTRACT_SERIAL(classname) |
| #define | DECLARE_SERIAL(classname) |
| #define | IMPLEMENT_SERIAL(classname, classtype) |
| #define | DO_SERIALIZE(classtype, super) |
| #define | DO_UNSERIALIZE(super) |
| #define | SERIALIZE(x) info->s->Write(x, #x) |
| #define | SERIALIZE_STR(x, y) info->s->Write(x, y, #x) |
| #define | SERIALIZE_BIT(bit) info->s->Write(bool(bit), #bit) |
| #define | UNSERIALIZE(x) info->s->Read(x, #x) |
| #define | UNSERIALIZE_STR(x, y) info->s->Read(x, y, #x) |
| #define | UNSERIALIZE_BIT(bit) |
| #define | SERIALIZE_OPTIONAL(ptr) |
| #define | SERIALIZE_OPTIONAL_STR(str) |
| #define | UNSERIALIZE_OPTIONAL(dst, unserialize) |
| #define | UNSERIALIZE_OPTIONAL_STR(dst) |
| #define | UNSERIALIZE_OPTIONAL_STATIC(dst, unserialize, del) |
|
|
Value: virtual bool DoSerialize(SerialInfo*) const; \ virtual bool DoUnserialize(UnserialInfo*); \ Definition at line 146 of file SerialObj.h. |
|
|
Value: static classname* Instantiate(); \ static SerialTypeRegistrator register_type; \ virtual bool DoSerialize(SerialInfo*) const; \ virtual bool DoUnserialize(UnserialInfo*); \ virtual const TransientID* GetTID() const { return &tid; } \ virtual SerialType GetSerialType() const; \ TransientID tid; Definition at line 150 of file SerialObj.h. |
|
|
Value: DBG_LOG(DBG_SERIAL, __PRETTY_FUNCTION__); \ if ( info->type == SER_NONE ) \ info->type = classtype; \ AutoPush auto_push; \ if ( ! super::DoSerialize(info) ) \ return false; Definition at line 173 of file SerialObj.h. |
|
|
Value: DBG_LOG(DBG_SERIAL, __PRETTY_FUNCTION__); \ AutoPush auto_push; \ if ( ! super::DoUnserialize(info) ) \ return false; Definition at line 181 of file SerialObj.h. |
|
|
Value: SerialTypeRegistrator classname::register_type(classtype, \ FactoryFunc(&classname::Instantiate), #classname); \ SerialType classname::GetSerialType() const { return classtype; }; \ classname* classname::Instantiate() { return new classname(); } \ Definition at line 160 of file SerialObj.h. |
|
|
Definition at line 187 of file SerialObj.h. Referenced by SerialObj::DoSerialize(), TypeDecl::Serialize(), SerialObj::Serialize(), Packet::Serialize(), and EventHandler::Serialize(). |
|
|
Definition at line 193 of file SerialObj.h. |
|
|
Value: { \
if ( ptr ) \
{ \
if ( ! (info->s->Write(true, "has_" #ptr) && ptr->Serialize(info)) ) \
return false; \
} \
\
else if ( ! info->s->Write(false, "has_" #ptr) ) \
return false; \
}
Definition at line 211 of file SerialObj.h. Referenced by TypeDecl::Serialize(). |
|
|
Value: { \
if ( str ) \
{ \
if ( ! (info->s->Write(true, "has_" #str) && info->s->Write(str, "str")) ) \
return false; \
} \
\
else if ( ! info->s->Write(false, "has_" #str) ) \
return false; \
}
Definition at line 223 of file SerialObj.h. |
|
|
Definition at line 190 of file SerialObj.h. |
|
|
Definition at line 196 of file SerialObj.h. Referenced by SerialObj::Unserialize(), Packet::Unserialize(), and Serializer::UnserializeCall(). |
|
|
Value: { \
bool tmp; \
if ( ! info->s->Read(&tmp, #bit) ) \
return false; \
bit = (unsigned int) tmp; \
}
Definition at line 202 of file SerialObj.h. |
|
|
Value: { \
bool has_it; \
if ( ! info->s->Read(&has_it, "has_" #dst) ) \
return false; \
\
if ( has_it ) \
{ \
dst = unserialize; \
if ( ! dst ) \
return false; \
} \
\
else \
dst = 0; \
}
Definition at line 235 of file SerialObj.h. |
|
|
Value: { \
bool has_it; \
if ( ! info->s->Read(&has_it, "has_" #dst) ) \
{ \
delete del; \
return 0; \
} \
\
if ( has_it ) \
{ \
dst = unserialize; \
if ( ! dst ) \
{ \
delete del; \
return 0; \
} \
} \
\
else \
dst = 0; \
}
Definition at line 269 of file SerialObj.h. Referenced by TypeDecl::Unserialize(). |
|
|
Value: { \
bool has_it; \
if ( ! info->s->Read(&has_it, "has_" #dst) ) \
return false; \
\
if ( has_it ) \
{ \
info->s->Read(&dst, 0, "has_" #dst); \
if ( ! dst ) \
return false; \
} \
\
else \
dst = 0; \
}
Definition at line 252 of file SerialObj.h. |
|
|
Definition at line 199 of file SerialObj.h. Referenced by TypeDecl::Unserialize(), EventHandler::Unserialize(), and Serializer::UnserializeCall(). |
1.3.5