Taml
Public Attributes
bool
Whether the format type is automatically determined by the filename extension or not.
string
When using auto-format, this is the extension (end of filename) used to detect the BINARY format.
string
When using auto-format, this is the extension (end of filename) used to detect the JSON format.
string
When using auto-format, this is the extension (end of filename) used to detect the XML format.
bool
Whether ZIP compression is used on binary formatting or not.
The read/write format that should be used.
bool
Whether to write JSON that is strictly compatible with RFC4627 or not.
bool
Whether to update each type instances file-progenitor or not.
bool
Whether to write static fields that are at their default or not.
Public Functions
bool
Gets whether the format type is automatically determined by the filename extension or not.
string
Gets the extension (end of filename) used to detect the Binary format.
string
Gets the extension (end of filename) used to detect the XML format.
bool
Gets whether ZIP compression is used on binary formatting or not.
bool
Gets whether to write JSON that is strictly compatible with RFC4627 or not.
bool
Gets whether to update each type instances file-progenitor or not.
bool
Gets whether to write static fields that are at their default or not.
void
setAutoFormat(bool autoFormat)
Sets whether the format type is automatically determined by the filename extension or not.
void
setAutoFormatBinaryExtension(string extension)
Sets the extension (end of filename) used to detect the Binary format.
void
setAutoFormatXmlExtension(string extension)
Sets the extension (end of filename) used to detect the XML format.
void
setBinaryCompression(bool compressed)
Sets whether ZIP compression is used on binary formatting or not.
void
setJSONStrict(bool strict)
Sets whether to write JSON that is strictly compatible with RFC4627 or not.
void
setProgenitorUpdate(bool progenitorUpdate)
Sets whether to update each type instances file-progenitor or not.
void
setWriteDefaults(bool writeDefaults)
Sets whether to write static fields that are at their default or not.
Detailed Description
UNDOCUMENTED!
Public Attributes
bool AutoFormat
Whether the format type is automatically determined by the filename extension or not.
string AutoFormatBinaryExtension
When using auto-format, this is the extension (end of filename) used to detect the BINARY format.
string AutoFormatJSONExtension
When using auto-format, this is the extension (end of filename) used to detect the JSON format.
string AutoFormatXmlExtension
When using auto-format, this is the extension (end of filename) used to detect the XML format.
bool BinaryCompression
Whether ZIP compression is used on binary formatting or not.
_TamlFormatMode Format
The read/write format that should be used.
bool JSONStrict
Whether to write JSON that is strictly compatible with RFC4627 or not.
bool ProgenitorUpdate
Whether to update each type instances file-progenitor or not.
bool WriteDefaults
Whether to write static fields that are at their default or not.
Public Functions
getAutoFormat()
Gets whether the format type is automatically determined by the filename extension or not.
Whether the format type is automatically determined by the filename extension or not.
getAutoFormatBinaryExtension()
Gets the extension (end of filename) used to detect the Binary format.
The extension (end of filename) used to detect the Binary format.
getAutoFormatXmlExtension()
Gets the extension (end of filename) used to detect the XML format.
The extension (end of filename) used to detect the XML format.
getBinaryCompression()
Gets whether ZIP compression is used on binary formatting or not.
Whether ZIP compression is used on binary formatting or not.
getFormat()
Gets the format that Taml should use to read/write.
The format that Taml should use to read/write.
getJSONStrict()
Gets whether to write JSON that is strictly compatible with RFC4627 or not.
whether to write JSON that is strictly compatible with RFC4627 or not.
getProgenitorUpdate()
Gets whether to update each type instances file-progenitor or not.
Whether to update each type instances file-progenitor or not.
getWriteDefaults()
Gets whether to write static fields that are at their default or not.
Whether to write static fields that are at their default or not.
read(string filename)
Read an object from a file using Taml.
Parameters:
filename | The filename to read from. |
(Object) The object read from the file or an empty string if read failed.
setAutoFormat(bool 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. |
No return value.
setAutoFormatBinaryExtension(string 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. |
No return value.
setAutoFormatXmlExtension(string 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. |
No return value.
setBinaryCompression(bool compressed)
Sets whether ZIP compression is used on binary formatting or not.
Parameters:
compressed | Whether compression is on or off. |
No return value.
setFormat(string formatName)
Sets the format that Taml should use to read/write.
Parameters:
format | The format to use: 'xml' or 'binary'. |
No return value.
setJSONStrict(bool strict)
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. |
No return value.
setProgenitorUpdate(bool 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. |
No return value.
setWriteDefaults(bool 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. |
No return value.
write(SimObject obj, string filename)
Writes an object to a file using Taml.
Parameters:
object | The object to write. |
filename | The filename to write to. |
Whether the write was successful or not.