#include <SimXMLDocument_ScriptBinding.h>
Inherits SimObject.
|
void | addComment (string comment) |
|
void | addData (string text) |
|
void | addHeader () |
|
void | addNewElement (string name) |
|
void | addText (string text) |
|
String | attribute (string attribute) |
|
Boolean | attributeExists (string attribute) |
|
Float | attributeF32 (string attribute) |
|
Integer | attributeS32 (string attribute) |
|
void | clear () |
|
void | clearError () |
|
String | elementValue () |
|
String | firstAttribute () |
|
String | getData () |
|
String | getErrorDesc () |
|
String | getText () |
|
String | lastAttribute () |
|
Integer | loadFile (string fileName) |
|
String | nextAttribute () |
|
Boolean | nextSiblingElement (string name) |
|
Integer | parse (string txtXML) |
|
void | popElement () |
|
String | prevAttribute () |
|
Boolean | pushChildElement (int index) |
|
Boolean | pushFirstChildElement (string name) |
|
void | pushNewElement (string name) |
|
String | readComment (S32 index) |
|
void | removeText () |
|
void | reset () |
|
Integer | saveFile (string fileName) |
|
void | setAttribute (string attributeName, string attributeValue) |
|
void | setObjectAttributes (string attributeValue) |
|
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) |
|
◆ addComment()
void addComment |
( |
string |
comment | ) |
|
Add the given comment as a child of current stack element.
- Parameters
-
comment | The desired comment to add |
- Returns
- No return value.
◆ addData()
void addData |
( |
string |
text | ) |
|
Add the given text as a child of current stack element.
- Parameters
-
- Returns
- No return value
◆ addHeader()
Add XML header to document.
- Returns
- No return value.
◆ addNewElement()
void addNewElement |
( |
string |
name | ) |
|
Create new element as child of current stack element and push new element on to stack.
- Parameters
-
name | The anme of the new element |
- Returns
- No return value
◆ addText()
void addText |
( |
string |
text | ) |
|
Add the given text as a child of current stack element.
- Parameters
-
text | The desired text to add |
- Returns
- No return value.
◆ attribute()
String attribute |
( |
string |
attribute | ) |
|
Get attribute value if it exists.
- Parameters
-
- Returns
- Returns the value of the attribute as a string, or an empty string on failure
◆ attributeExists()
Boolean attributeExists |
( |
string |
attribute | ) |
|
Get true if named attribute exists.
- Parameters
-
attribute | The desired attribute's name |
- Returns
- Returns true if attribute exists and false otherwise
◆ attributeF32()
Float attributeF32 |
( |
string |
attribute | ) |
|
Get attribute value if it exists.
- Parameters
-
- Returns
- Returns the value of the attribute converted to 32-bit floating-point value from string
◆ attributeS32()
Integer attributeS32 |
( |
string |
attribute | ) |
|
Get attribute value if it exists.
- Parameters
-
- Returns
- Returns the value of the attribute converted to 32-bit integer value from string
◆ clear()
Clear contents of XML document.
- Returns
- No return value
◆ clearError()
Clear error description.
- Returns
- No return value
◆ elementValue()
Get element value if it exists.
- Returns
- A string with the desired value, or empty if not found.
◆ firstAttribute()
Obtain the name of the current element's first attribute.
- Returns
- A string with the name of the first attribute
◆ getData()
Gets the text from the current stack element.
- Returns
- Returns the desired text or empty string if failed (no text)
◆ getErrorDesc()
Get current error description.
- Returns
- Returns a string with the error description
◆ getText()
Gets the text from the current stack element.
- Returns
- Returns the desired text, or empty string on failure
◆ lastAttribute()
Obtain the name of the current element's last attribute.
- Returns
- A string with the name of the last attribute
◆ loadFile()
Integer loadFile |
( |
string |
fileName | ) |
|
Load file from given filename.
- Parameters
-
fileName | The name of the desired file |
- Returns
- Returns 1 on success and 0 otherwise
◆ nextAttribute()
Get the name of the next attribute for the current element after a call to firstAttribute().
- Returns
- A string with the name of the next attribute
◆ nextSiblingElement()
Boolean nextSiblingElement |
( |
string |
name | ) |
|
Set top element on stack to next element with given name.
- Parameters
-
name | The name of the element. |
- Returns
- Returns true on success, false otherwise
◆ parse()
Create document from XML string.
- Parameters
-
txtXML | The text of the XML document |
- Returns
- Returns 1 on success
◆ popElement()
Pop last element off of stack.
- Returns
- No return value
◆ prevAttribute()
Get the name of the previous attribute for the current element after a call to lastAttribute().
- Returns
- A string with the name of the previous attribute
◆ pushChildElement()
Boolean pushChildElement |
( |
int |
index | ) |
|
Push the child element at the given index onto stack.
- Parameters
-
index | A nonnegative integer representing the index of the child element |
- Returns
- Returns true on success, and false otherwise
◆ pushFirstChildElement()
Boolean pushFirstChildElement |
( |
string |
name | ) |
|
Push first child element with given name onto stack.
- Parameters
-
name | The name of the child element |
- Returns
- returns true on success, false otherwise.
◆ pushNewElement()
void pushNewElement |
( |
string |
name | ) |
|
Create new element as child of current stack element and push new element on to stack.
- Parameters
-
name | The anme of the new element |
- Returns
- No return value
◆ readComment()
String readComment |
( |
S32 |
index | ) |
|
Returns the comment at the specified index.
- Parameters
-
index | The index of the desired comment as a nonnegative integer value |
- Returns
- The comment as a string
◆ removeText()
Remove any text on the current stack element.
- Returns
- No return value
◆ reset()
Set this to default state at construction.
- Returns
- No return value
◆ saveFile()
Integer saveFile |
( |
string |
fileName | ) |
|
Save file to given filename.
- Parameters
-
fileName | A string presenting the filename to save the XML document as |
- Returns
- Returns 1 on success, and 0 otherwise
◆ setAttribute()
void setAttribute |
( |
string |
attributeName, |
|
|
string |
attributeValue |
|
) |
| |
Set attribute of top stack element to given value.
- Parameters
-
attributeName | The name of the attribute of the element you wish to set |
attributeValue | The value you wish to set the given attribute to |
- Returns
- No return value.
◆ setObjectAttributes()
void setObjectAttributes |
( |
string |
attributeValue | ) |
|
Set attribute of top stack element to given value.
- Parameters
-
attributeValue | The value you wish to set the given attribute to |
- Returns
- No return value.