ISerialize

#include

Public Member Functions

virtual void ReadStringValue (const char *name, SSerializeString &curValue, uint32 policy=0)=0
This is for string values – they need special support.
virtual void WriteStringValue (const char *name, SSerializeString &buffer, uint32 policy=0)=0
virtual void Update (ISerializeUpdateFunction *pUpdate)=0
virtual void FlagPartialRead ()=0
virtual void BeginGroup (const char *szName)=0
virtual bool BeginOptionalGroup (const char *szName, bool condition)=0
virtual void EndGroup ()=0
virtual bool IsReading () const =0
virtual bool ShouldCommitValues () const =0
virtual ESerializationTarget GetSerializationTarget () const =0
virtual bool Ok () const =0
SERIALIZATION_TYPE (ScriptAnyValue) SERIALIZATION_TYPE(XmlNodeRef) SERIALIZATION_TYPE(ScriptAnyValue) SERIALIZATION_TYPE(XmlNodeRef) template< class B > void Value(const char *name
Declare all primitive Value() implementations.
template
void Value (const char *name, B &x, uint32 policy)
template
void ValueWithDefault (const char *name, B &x, const B &defaultValue)
Based off ValueWithDefault in SimpleSerialize.h.

Public Attributes

B & x

Static Public Attributes

static const int ENUM_POLICY_TAG = 0xe0000000

Detailed Description

ISerialize is intended to be implemented by objects that need to read and write from various data sources in such a way that different tradeoffs can be balanced by the object that is being serialized, and so that objects being serialized need only write a single function in order to be read from and written to.

Member Function Documentation

◆ BeginGroup()

virtual void ISerialize::BeginGroup ( const char * szName)
pure virtual

Begins a serialization group - must be matched by an EndGroup. SzName is preferably as short as possible for performance reasons. Spaces in szName cause undefined behaviour, use alpha characters,underscore and numbers only for a name.

◆ FlagPartialRead()

virtual void ISerialize::FlagPartialRead ( )
pure virtual

For network updates: notify the network engine that this value was only partially read and we. Should re-request an update from the server soon.

◆ Update()

virtual void ISerialize::Update ( ISerializeUpdateFunction * pUpdate)
pure virtual

This function should be implemented to call the passed in interface. If we are reading, and to not call it if we are writing.

Member Data Documentation

◆ x

B& ISerialize::x
Initial value:
{
Value(name, x, 0)