![]() |
Pixel Dust Game Engine
v0.9.5
|
Public Types | |
typedef ISerializable *(* | CreateSerializableFunc )() |
Public Member Functions | |
virtual uint64 | deserialize_8u () MAY_THROW(out_of_data)=0 |
Deserialize an 8 byte (64 bit) value. | |
int64 | deserialize_8 () MAY_THROW(out_of_data) |
virtual uint32 | deserialize_4u () MAY_THROW(out_of_data)=0 |
Deserialize a 4 byte (32 bit) value. | |
int32 | deserialize_4 () MAY_THROW(out_of_data) |
virtual uint32 | deserialize_3u () MAY_THROW(out_of_data)=0 |
Deserialize a 3 byte (24 bit) value. | |
virtual uint16 | deserialize_2u () MAY_THROW(out_of_data)=0 |
Deserialize a 2 byte (16 bit) value. | |
int16 | deserialize_2 () MAY_THROW(out_of_data) |
virtual uint8 | deserialize_1u () MAY_THROW(out_of_data)=0 |
Deserialize an 1 byte (8 bit) value. | |
int8 | deserialize_1 () MAY_THROW(out_of_data) |
float | deserialize_f () MAY_THROW(out_of_data) |
Serialize a floating point value into a buffer. | |
double | deserialize_d () MAY_THROW(out_of_data) |
Serialize a double precision floating point value into a buffer. | |
virtual bool | deserialize_bool () MAY_THROW(out_of_data)=0 |
Deserialize a boolean (1 bit) value. | |
virtual uint32 | deserialize_uint () MAY_THROW(out_of_data)=0 |
Deserialize an unsigned value. | |
virtual Color | deserialize_color () MAY_THROW(out_of_data)=0 |
Deserialize a pdg::Color value. | |
virtual Offset | deserialize_offset () MAY_THROW(out_of_data)=0 |
Deserialize a pdg::Offset value. | |
Point | deserialize_point () MAY_THROW(out_of_data) |
Deserialize a pdg::Point value. | |
Vector | deserialize_vector () MAY_THROW(out_of_data) |
Deserialize a pdg::Vector value. | |
virtual Rect | deserialize_rect () MAY_THROW(out_of_data)=0 |
Deserialize a pdg::Rect. | |
virtual RotatedRect | deserialize_rotr () MAY_THROW(out_of_data)=0 |
Deserialize a pdg::RotatedRect. | |
virtual Quad | deserialize_quad () MAY_THROW(out_of_data)=0 |
Deserialize a pdg::Quad. | |
virtual uint32 | deserialize_str (char *outStr, uint32 strMaxLen) MAY_THROW((out_of_data |
Deserialize a string value. | |
virtual uint32 | deserialize_strGetLen () MAY_THROW((out_of_data |
get length of a string value, including NUL terminator, as if it were deserialized | |
void | deserialize_string (std::string &outStr) MAY_THROW((out_of_data |
Deserialize a string value into a std::string. | |
virtual uint32 | deserialize_mem (void *outMem, uint32 memMaxLen) MAY_THROW((out_of_data |
Deserialize an arbitrary block of memory. | |
virtual uint32 | deserialize_memGetLen () MAY_THROW((out_of_data |
Deserialize an string value. | |
virtual ISerializable * | deserialize_obj () MAY_THROW((out_of_data |
Deserialize a serializable object. | |
template<typename T > | |
T * | deserialize_ref () MAY_THROW((out_of_data |
Deserialize a reference to a non-serializable object. | |
Static Public Member Functions | |
template<class T > | |
static void | registerClass () |
Register a class that is derived from Serializable. | |
static void | registerClass (uint32 classTag, CreateSerializableFunc classNewFunc) |
Register a class that is derived from ISerializable. | |
static void | registerObject (void *obj, uint32 uniqueId) |
Register object that is not serializable for use with |de|serialize_ref() | |
Public Attributes | |
virtual uint32 | bad_tag = 0 |
void | bad_tag |
virtual ISerializable | bad_tag |
virtual ISerializable | sync_error |
virtual ISerializable | unknown_object = 0 |
T | bad_tag |
T | sync_error |
T | unknown_object |
Static Public Attributes | |
static int | s_TraceDepth |
Protected Member Functions | |
virtual char * | statusDump (int hiliteBytes=0)=0 |
virtual void * | deserialize_ptr () MAY_THROW((out_of_data |
Protected Attributes | |
virtual void | bad_tag |
virtual void | sync_error |
virtual void | unknown_object = 0 |
typedef ISerializable*(* CreateSerializableFunc)() |
|
inline |
|
pure virtual |
Deserialize an 1 byte (8 bit) value.
internal pointer is advanced 1 btye
Implemented in Deserializer.
|
inline |
|
pure virtual |
Deserialize a 2 byte (16 bit) value.
internal pointer is advanced 2 btyes
Implemented in Deserializer.
|
pure virtual |
Deserialize a 3 byte (24 bit) value.
internal pointer is advanced 3 btyes
Implemented in Deserializer.
|
inline |
|
pure virtual |
Deserialize a 4 byte (32 bit) value.
internal pointer is advanced 4 btyes
Implemented in Deserializer.
|
inline |
|
pure virtual |
Deserialize an 8 byte (64 bit) value.
internal pointer is advanced 8 btyes
Implemented in Deserializer.
|
pure virtual |
Deserialize a boolean (1 bit) value.
internal pointer gets advanced by 1 or 0 bytes, depending on bytes required to store the value
Implemented in Deserializer.
|
pure virtual |
Deserialize a pdg::Color value.
internal pointer is advanced by ? bytes, depending on bytes required to store value
Implemented in Deserializer.
|
inline |
Serialize a double precision floating point value into a buffer.
internal pointer gets advanced by 8 bytes
|
inline |
Serialize a floating point value into a buffer.
internal pointer gets advanced by 4 bytes
|
virtual |
Deserialize an arbitrary block of memory.
p | a reference to a buffer pointer; pointer gets advanced past mem block to start of next entity in buffer |
outMem,a | buffer to hold the resulting block of memory |
memMaxLen,the | max length of the output block, that the buffer can accomodate If the serialized memory is longer than memMaxLen, it will be truncated and the buffer pointer p will still be advanced past the memory block to the start of the next entity in the buffer. |
Reimplemented in Deserializer.
|
virtual |
Deserialize an string value.
internal pointer is NOT advanced. Use this to pre-flight allocation for blocks of memory
Reimplemented in Deserializer.
|
virtual |
Deserialize a serializable object.
internal pointer gets advanced past object to start of next entity in buffer
Reimplemented in Deserializer.
|
pure virtual |
Deserialize a pdg::Offset value.
internal pointer is advanced by 1 to 9 bytes, depending on bytes required to store value
Implemented in Deserializer.
|
inline |
Deserialize a pdg::Point value.
internal pointer is advanced by 1 to 9 bytes, depending on bytes required to store value
|
protectedvirtual |
Reimplemented in Deserializer.
|
pure virtual |
Deserialize a pdg::Quad.
internal pointer is advanced by 1, 3 or 5 bytes, depending on bytes required to store value
Implemented in Deserializer.
|
pure virtual |
Deserialize a pdg::Rect.
internal pointer is advanced by ? bytes, depending on bytes required to store value
Implemented in Deserializer.
|
inline |
Deserialize a reference to a non-serializable object.
|
pure virtual |
Deserialize a pdg::RotatedRect.
internal pointer is advanced by ? bytes, depending on bytes required to store value
Implemented in Deserializer.
|
virtual |
Deserialize a string value.
outStr,a | buffer to hold the resulting string |
strMaxLen,the | max length of the output string, including NUL terminator, that the buffer can accomodate If the serialized string is longer than strMaxLen, it will be truncated and the internal pointer p will still be advanced past the string to the start of the next entity in the internal buffer. |
Reimplemented in Deserializer.
|
virtual |
get length of a string value, including NUL terminator, as if it were deserialized
internal pointer is NOT advanced. Use this to pre-flight allocation for longer strings
Reimplemented in Deserializer.
|
inline |
Deserialize a string value into a std::string.
outStr,a | std::string to hold the resulting string |
|
pure virtual |
Deserialize an unsigned value.
internal pointer is advanced by 1, 3 or 5 bytes, depending on bytes required to store value
Implemented in Deserializer.
|
inline |
Deserialize a pdg::Vector value.
internal pointer is advanced by 1 to 9 bytes, depending on bytes required to store value
|
inlinestatic |
Register a class that is derived from Serializable.
this is the prefered way of registering classes for serialization
|
static |
Register a class that is derived from ISerializable.
classTag | a 32 bit value uniquely identifying the class |
classNewFunc | the factory function that can create new instances of the class You should derive classes from Serializable rather than ISerializable, and use the template based registerClass() to register them unless you have a really good reason not to. |
|
static |
Register object that is not serializable for use with |de|serialize_ref()
uniqueId | a 32 bit value that uniquely identifies this object Calling this twice with the same uniqueId will replace the old value. These values are then sent instead of the object data or pointer. On deserialization, the object registered to that id on the receiver is used. |
|
protectedpure virtual |
Implemented in Deserializer.
uint32 bad_tag = 0 |
void bad_tag |
virtual ISerializable bad_tag |
T bad_tag |
|
protected |
|
static |
virtual ISerializable sync_error |
|
protected |
virtual ISerializable unknown_object = 0 |
|
protected |