TorqueScript Reference

- Main Page
- Related Pages
- Modules
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
Taml Class Reference

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
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)
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]*)
Boolean | save (fileName, [selectedOnly]?)
void | addFieldFilter (fieldName)
void | removeFieldFilter (fieldName)

## Member Function Documentation

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.

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.

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.

Boolean getBinaryCompression | ( |  | ) |

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

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

String getFormat | ( |  | ) |

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

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

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.

Boolean getProgenitorUpdate | ( |  | ) |

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

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

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.

String read | ( | filename |  | ) |

Read an object from a file using Taml.

Parameters

  filename | The filename to read from.

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

void setAutoFormat | ( | autoFormat |  | ) |

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

Parameters

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

Returns
  No return value.

void setAutoFormatBinaryExtension | ( | extension |  | ) |

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

Parameters

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

Returns
  No return value.

void setAutoFormatXmlExtension | ( | extension |  | ) |

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

Parameters

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

Returns
  No return value.

void setBinaryCompression | ( | compressed |  | ) |

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

Parameters

  compressed | Whether compression is on or off.

Returns
  No return value.

void setFormat | ( | format |  | ) |

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

Parameters

  format | The format to use: 'xml' or 'binary'.

Returns
  No return value.

void setJSONStrict | ( | jsonStrict |  | ) |

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

Parameters

  jsonStrict | Whether to write JSON that is strictly compatible with RFC4627 or not.

Returns
  No return value.

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

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

Returns
  No return value.

void setWriteDefaults | ( | writeDefaults |  | ) |

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

Parameters

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

Returns
  No return value.

Boolean write | ( | object | ,
|  | filename |
| ) |  |

Writes an object to a file using Taml.

Parameters

  object | The object to write.
  filename | The filename to write to.

Returns
  Whether the write was successful or not.