Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

network
Class ISerializable

   in Serialization.h
Direct Known Subclasses:
CNetMessage, jsval_ser

class ISerializable

An interface for serializable objects. For a serializable object to be usable as a network message field, it must have a constructor without arguments.


Method Summary
 virtual const u8* Deserialize( const u8* buffer, const u8* end )= 0
          Deserialize the object (i.e. read in data from the buffer and initialize the object's fields).
 virtual uint GetSerializedLength() const = 0
          Return the length of the serialized form of this object
 virtual u8* Serialize( u8* buffer ) const = 0
          Serialize the object into the passed buffer.
 

Method Detail

Deserialize

public virtual const u8* Deserialize( const u8* buffer, const u8* end )= 0;
Deserialize the object (i.e. read in data from the buffer and initialize the object's fields). Note that it is up to the deserializer to detect errors in data format.
Parameters:
buffer - A pointer pointing to the start of the serialized data.
end - A pointer to the end of the message.

GetSerializedLength

public virtual uint GetSerializedLength() const = 0;
Return the length of the serialized form of this object

Serialize

public virtual u8* Serialize( u8* buffer ) const = 0;
Serialize the object into the passed buffer.
Returns:
a pointer to the location in the buffer right after the serialized object

 Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
Generated on September 04, 2007 at 18:14
CppDoc v2.4.0
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD