Enfusion Script API
Loading...
Searching...
No Matches
ScriptedSerializationSaveContainer Interface Reference

Scripted save container for custom handling of storage. More...

Inheritance diagram for ScriptedSerializationSaveContainer:
BaseSerializationSaveContainer BaseSerializationContainer Managed

Protected Member Functions

bool StartObject ()
 Objects are serialized as sequence of: StartObject() WriteKey("myValue"); WriteInt(42); WriteKey("anotherValue") WriteFloat(13.37); ... EndObject();.
 
bool EndObject ()
 
bool StartArray (int count)
 Arrays don't have named values and as such are only a sequence of value writes.
 
bool EndArray ()
 
bool StartMap (int count)
 Maps are key value pairs which are written similar to objects, as sequence of WriteKey(key) + WriteXXX(value); Keys are converted automatically to strings for serialization for cases such as map<int, float>.
 
bool EndMap ()
 
bool WriteKey (string key)
 Key writer for named properties in objects or map keys.
 
bool WriteNull ()
 Typed value writers.
 
bool WriteBool (bool value)
 
bool WriteString (string value)
 
bool WriteInt (int value)
 
bool WriteFloat (float value)
 
bool WriteVector (vector value)
 

Additional Inherited Members

- Public Member Functions inherited from Managed
proto external ref Managed Clone ()
 Return shallow copy of object, or null if it is not allowed (not public constructor)
 

Detailed Description

Scripted save container for custom handling of storage.

Member Function Documentation

◆ EndArray()

bool ScriptedSerializationSaveContainer.EndArray ( )
protected

◆ EndMap()

bool ScriptedSerializationSaveContainer.EndMap ( )
protected

◆ EndObject()

bool ScriptedSerializationSaveContainer.EndObject ( )
protected

◆ StartArray()

bool ScriptedSerializationSaveContainer.StartArray ( int count)
protected

Arrays don't have named values and as such are only a sequence of value writes.

Arrays may be nested, in which case StartArray is called while already inside an array. Sets are considered arrays for serialization.

◆ StartMap()

bool ScriptedSerializationSaveContainer.StartMap ( int count)
protected

Maps are key value pairs which are written similar to objects, as sequence of WriteKey(key) + WriteXXX(value); Keys are converted automatically to strings for serialization for cases such as map<int, float>.

The value type of the map is known one the first value write is called.

◆ StartObject()

bool ScriptedSerializationSaveContainer.StartObject ( )
protected

Objects are serialized as sequence of: StartObject() WriteKey("myValue"); WriteInt(42); WriteKey("anotherValue") WriteFloat(13.37); ... EndObject();.

There may be sub-objects/arrays/maps. These will be written using a sequence of WriteKey(...) + StartObject/Array/Map(). Each nested object/array/map will be terminated by EndObject/Array/Map();

◆ WriteBool()

bool ScriptedSerializationSaveContainer.WriteBool ( bool value)
protected

◆ WriteFloat()

bool ScriptedSerializationSaveContainer.WriteFloat ( float value)
protected

◆ WriteInt()

bool ScriptedSerializationSaveContainer.WriteInt ( int value)
protected

◆ WriteKey()

bool ScriptedSerializationSaveContainer.WriteKey ( string key)
protected

Key writer for named properties in objects or map keys.

◆ WriteNull()

bool ScriptedSerializationSaveContainer.WriteNull ( )
protected

Typed value writers.

◆ WriteString()

bool ScriptedSerializationSaveContainer.WriteString ( string value)
protected

◆ WriteVector()

bool ScriptedSerializationSaveContainer.WriteVector ( vector value)
protected

The documentation for this interface was generated from the following file: