class ReflectExport( reflect ) Serializer
Defines the interface for serialization.
Serializer | Defines the interface for serialization. |
Functions | |
Begin | Starts a group, annotated by the tag’s type and text. |
End | Ends a group started by the tag with Begin. |
Serialize(bool) | Emits a bool. |
Serialize(long) | Emits an integer. |
Serialize(unsigned long) | Emits an integer, maybe in hex. |
Serialize(double) | Emits a float/double. |
Serialize(const Dynamic *) | The object is serialized using its <Category> (see <Category.SerializeDynamic>), or, if the object has been <Reference>d, then the serializer should emit a backreference instead. |
Reference | Adds the object to the list of objects known to this serializer. |
SerializeText | Emits a string. |
SerializeText | Emits arbitrary data. |
SerializeEnum | Emits an enum value or string. |
SerializeProperty | |
~Serializer |
virtual bool Serialize( const Dynamic * object ) = 0
The object is serialized using its <Category> (see <Category.SerializeDynamic>), or, if the object has been <Reference>d, then the serializer should emit a backreference instead.
Shallow serialization could emit the pointer value (as an integer) for immediate deserialization.
virtual bool Reference( const Dynamic * object ) = 0
Adds the object to the list of objects known to this serializer.
Reference should be called in the Class.SerializePointer method for classes that construct new, unshared, objects when deserializing (as opposed to flyweights like Type pointers).
Defines the interface for serialization.
class ReflectExport( reflect ) Serializer
Starts a group, annotated by the tag’s type and text.
virtual bool Begin( const SerializationTag & ) = 0
Ends a group started by the tag with Begin.
virtual bool End( const SerializationTag & ) = 0
Emits a bool.
virtual bool Serialize( bool ) = 0
Emits an integer.
virtual bool Serialize( long ) = 0
Emits an integer, maybe in hex.
virtual bool Serialize( unsigned long ) = 0
Emits a float/double.
virtual bool Serialize( double ) = 0
The object is serialized using its Category (see <Category.SerializeDynamic>), or, if the object has been <Reference>d, then the serializer should emit a backreference instead.
virtual bool Serialize( const Dynamic * object ) = 0
Adds the object to the list of objects known to this serializer.
virtual bool Reference( const Dynamic * object ) = 0
Emits a string.
virtual bool SerializeText( const char * text, unsigned nbytes ) = 0
Emits an enum value or string.
virtual bool SerializeEnum( int value, const EnumType * type ) = 0
virtual bool SerializeProperty( const void * object, const Property * prop ) = 0
virtual ~Serializer()
virtual void SerializePointer( const Dynamic * in, Reflector & reflector ) const
class ReflectExport( reflect ) Type : public Dynamic
References a Dynamic *.
virtual bool Reference( Dynamic * object ) = 0