TorqueScript Reference
Public Member Functions | List of all members
Taml Class Reference

#include <taml_ScriptBinding.h>

Inherits SimObject.

Public Member Functions

Boolean getAutoFormat ()
 
String getAutoFormatBinaryExtension ()
 
String getAutoFormatXmlExtension ()
 
Boolean getBinaryCompression ()
 
String getFormat ()
 
Boolean getJSONStrict ()
 
Boolean getProgenitorUpdate ()
 
Boolean getWriteDefaults ()
 
String read (filename)
 
void setAutoFormat (autoFormat)
 
void setAutoFormatBinaryExtension (extension)
 
void setAutoFormatXmlExtension (extension)
 
void setBinaryCompression (compressed)
 
void setFormat (format)
 
void setJSONStrict (jsonStrict)
 
void setProgenitorUpdate (progenitorUpdate)
 
void setWriteDefaults (writeDefaults)
 
Boolean write (object, filename)
 
- Public Member Functions inherited from SimObject
void assignFieldsFrom (SimObject)
 
Integer clone ([copyDynamicFields=false]?)
 
void delete ()
 
Integer getId ()
 
void setName (newName)
 
String getName ()
 
String getClassNamespace ()
 
String getSuperClassNamespace ()
 
void setClassNamespace (nameSpace)
 
void setSuperClassNamespace ()
 
Boolean isMethod (string methodName)
 
String call (methodName, [args] *)
 
void dumpClassHierarchy ()
 
void dump ()
 
Boolean isMemberOfClass (string classname)
 
String getClassName ()
 
String getFieldValue (fieldName)
 
Boolean setFieldValue (fieldName, value)
 
Boolean setEditFieldValue (fieldName, value)
 
Integer getDynamicFieldCount ()
 
String getDynamicField (index)
 
Integer getFieldCount ()
 
String getField (int index)
 
void setProgenitorFile (file)
 
String getProgenitorFile ()
 
Integer getType ()
 
String getFieldType (fieldName)
 
void setInternalName (string InternalName)
 
String getInternalName ()
 
Boolean isChildOfGroup (groupID)
 
Integer getGroup ()
 
Boolean startTimer (callbackFunction, float timePeriod, [repeat]?)
 
void stopTimer ()
 
Boolean isTimerActive ()
 
Integer schedule (time, command, [arg] *)
 
void startListening (SimObject)
 
void stopListening (SimObject)
 
void addListener (SimObject)
 
void removeListener (SimObject)
 
void removeAllListeners ()
 
void postEvent (String eventName, String data)
 
Boolean save (fileName, [selectedOnly]?)
 
void addFieldFilter (fieldName)
 
void removeFieldFilter (fieldName)
 

Member Function Documentation

◆ getAutoFormat()

Boolean getAutoFormat ( )

Gets whether the format type is automatically determined by the filename extension or not.

Returns
Whether the format type is automatically determined by the filename extension or not.

◆ getAutoFormatBinaryExtension()

String getAutoFormatBinaryExtension ( )

Gets the extension (end of filename) used to detect the Binary format.

Returns
The extension (end of filename) used to detect the Binary format.

◆ getAutoFormatXmlExtension()

String getAutoFormatXmlExtension ( )

Gets the extension (end of filename) used to detect the XML format.

Returns
The extension (end of filename) used to detect the XML format.

◆ getBinaryCompression()

Boolean getBinaryCompression ( )

Gets whether ZIP compression is used on binary formatting or not.

Returns
Whether ZIP compression is used on binary formatting or not.

◆ getFormat()

String getFormat ( )

Gets the format that Taml should use to read/write.

Returns
The format that Taml should use to read/write.

◆ getJSONStrict()

Boolean getJSONStrict ( )

Gets whether to write JSON that is strictly compatible with RFC4627 or not.

Returns
whether to write JSON that is strictly compatible with RFC4627 or not.

◆ getProgenitorUpdate()

Boolean getProgenitorUpdate ( )

Gets whether to update each type instances file-progenitor or not.

Returns
Whether to update each type instances file-progenitor or not.

◆ getWriteDefaults()

Boolean getWriteDefaults ( )

Gets whether to write static fields that are at their default or not.

Returns
Whether to write static fields that are at their default or not.

◆ read()

String read ( filename  )

Read an object from a file using Taml.

Parameters
filenameThe filename to read from.
Returns
(Object) The object read from the file or an empty string if read failed.

◆ setAutoFormat()

void setAutoFormat ( autoFormat  )

Sets whether the format type is automatically determined by the filename extension or not.

Parameters
autoFormatWhether the format type is automatically determined by the filename extension or not.
Returns
No return value.

◆ setAutoFormatBinaryExtension()

void setAutoFormatBinaryExtension ( extension  )

Sets the extension (end of filename) used to detect the Binary format.

Parameters
extensionThe extension (end of filename) used to detect the Binary format.
Returns
No return value.

◆ setAutoFormatXmlExtension()

void setAutoFormatXmlExtension ( extension  )

Sets the extension (end of filename) used to detect the XML format.

Parameters
extensionThe extension (end of filename) used to detect the XML format.
Returns
No return value.

◆ setBinaryCompression()

void setBinaryCompression ( compressed  )

Sets whether ZIP compression is used on binary formatting or not.

Parameters
compressedWhether compression is on or off.
Returns
No return value.

◆ setFormat()

void setFormat ( format  )

Sets the format that Taml should use to read/write.

Parameters
formatThe format to use: 'xml' or 'binary'.
Returns
No return value.

◆ setJSONStrict()

void setJSONStrict ( jsonStrict  )

Sets whether to write JSON that is strictly compatible with RFC4627 or not.

Parameters
jsonStrictWhether to write JSON that is strictly compatible with RFC4627 or not.
Returns
No return value.

◆ setProgenitorUpdate()

void setProgenitorUpdate ( progenitorUpdate  )

Sets whether to update each type instances file-progenitor or not. If not updating then the progenitor stay as the script that executed the call to Taml.

Parameters
progenitorUpdateWhether to update each type instances file-progenitor or not.
Returns
No return value.

◆ setWriteDefaults()

void setWriteDefaults ( writeDefaults  )

Sets whether to write static fields that are at their default or not.

Parameters
writeDefaultsWhether to write static fields that are at their default or not.
Returns
No return value.

◆ write()

Boolean write ( object  ,
filename   
)

Writes an object to a file using Taml.

Parameters
objectThe object to write.
filenameThe filename to write to.
Returns
Whether the write was successful or not.