Adventure Creator 1.84.3
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2024
Loading...
Searching...
No Matches
AC.FileFormatHandler_Xml Class Reference
Inheritance diagram for AC.FileFormatHandler_Xml:
AC.iFileFormatHandler

Public Member Functions

string GetSaveMethod ()
 Gets the name of the file format.
string GetSaveExtension ()
 Gets the extension of files that are saved in this format.
virtual string SerializeObject< T > (object dataObject)
 Converts a serializeable object to a data string that can be saved to disk.
virtual T DeserializeObject< T > (string dataString)
 Converts a data string to an object that it represents.
virtual string SerializeAllRoomData (List< SingleLevelData > dataObjects)
 Converts all scene data, as a List of SingleLevelData isntances, to a single string.
virtual List< SingleLevelDataDeserializeAllRoomData (string dataString)
 Converts a data string to a List of SingleLevelData instances.
virtual T LoadScriptData< T > (string dataString)
 Converts a data string to a subclass of RememberData.

Protected Member Functions

string UTF8ByteArrayToString (byte[] characters)
byte[] StringToUTF8ByteArray (string pXmlString)

Detailed Description

A format handler that serializes data into XML format

Member Function Documentation

◆ DeserializeAllRoomData()

virtual List< SingleLevelData > AC.FileFormatHandler_Xml.DeserializeAllRoomData ( string dataString)
virtual

Converts a data string to a List of SingleLevelData instances.

Parameters
dataStringThe List of SingleLevelData, represented as a serialized string
Returns
The List of SingleLevelData instances, deserialized from the string

Implements AC.iFileFormatHandler.

◆ DeserializeObject< T >()

virtual T AC.FileFormatHandler_Xml.DeserializeObject< T > ( string dataString)
virtual

Converts a data string to an object that it represents.

Parameters
dataStringThe object represented as a serialized string
Returns
The object, deserialized from the string

Implements AC.iFileFormatHandler.

◆ GetSaveExtension()

string AC.FileFormatHandler_Xml.GetSaveExtension ( )

Gets the extension of files that are saved in this format.

Returns
The extension of files that are saved in this format.

Implements AC.iFileFormatHandler.

◆ GetSaveMethod()

string AC.FileFormatHandler_Xml.GetSaveMethod ( )

Gets the name of the file format.

Returns
The name of the file format.

Implements AC.iFileFormatHandler.

◆ LoadScriptData< T >()

virtual T AC.FileFormatHandler_Xml.LoadScriptData< T > ( string dataString)
virtual

Converts a data string to a subclass of RememberData.

Parameters
dataStringThe RememberData subclass, represented as a serialized string
Returns
The RememberData subclass, deserialized from the string

Implements AC.iFileFormatHandler.

Type Constraints
T :RememberData 

◆ SerializeAllRoomData()

virtual string AC.FileFormatHandler_Xml.SerializeAllRoomData ( List< SingleLevelData > dataObjects)
virtual

Converts all scene data, as a List of SingleLevelData isntances, to a single string.

Parameters
dataObjectsThe scene data to serialize
Returns
The scene data, serialized as a string

Implements AC.iFileFormatHandler.

◆ SerializeObject< T >()

virtual string AC.FileFormatHandler_Xml.SerializeObject< T > ( object dataObject)
virtual

Converts a serializeable object to a data string that can be saved to disk.

Parameters
dataObjectThe object to convert
Returns
The object, serialized as a string

Implements AC.iFileFormatHandler.