Main   GitHub

Methods | List of all members
SimXMLDocument Class Reference

Inherits SimObject, and SimObject.

Methods

void addComment (string comment)
 
void addComment (string comment)
 
void addData (string text)
 
void addData (string text)
 
void addHeader ()
 
void addHeader ()
 
void addNewElement (string name)
 
void addNewElement (string name)
 
void addText (string text)
 
void addText (string text)
 
string attribute (string attribute)
 
string attribute (string attribute)
 
bool attributeExists (string attribute)
 
bool attributeExists (string attribute)
 
float attributeF32 (string attribute)
 
float attributeF32 (string attribute)
 
int attributeS32 (string attribute)
 
int attributeS32 (string attribute)
 
void clear ()
 
void clear ()
 
void clearError ()
 
void clearError ()
 
string elementValue ()
 
string elementValue ()
 
string firstAttribute ()
 
string firstAttribute ()
 
string getData ()
 
string getData ()
 
string getErrorDesc ()
 
string getErrorDesc ()
 
string getText ()
 
string getText ()
 
string lastAttribute ()
 
string lastAttribute ()
 
int loadFile (string fileName)
 
int loadFile (string fileName)
 
string nextAttribute ()
 
string nextAttribute ()
 
bool nextSiblingElement (string name)
 
bool nextSiblingElement (string name)
 
int parse (string txtXML)
 
int parse (string txtXML)
 
void popElement ()
 
void popElement ()
 
string prevAttribute ()
 
string prevAttribute ()
 
bool pushChildElement (int index)
 
bool pushChildElement (int index)
 
bool pushFirstChildElement (string name)
 
bool pushFirstChildElement (string name)
 
void pushNewElement (string name)
 
void pushNewElement (string name)
 
string readComment (S32 index)
 
string readComment (S32 index)
 
void removeText ()
 
void removeText ()
 
void reset ()
 
void reset ()
 
int saveFile (string fileName)
 
int saveFile (string fileName)
 
void setAttribute (string attributeName, string attributeValue)
 
void setAttribute (string attributeName, string attributeValue)
 
void setObjectAttributes (string attributeValue)
 
void setObjectAttributes (string attributeValue)
 
- Methods inherited from SimObject
void addFieldFilter (fieldName)
 
void addFieldFilter (fieldName)
 
string call (%args)
 
string call (%args)
 
int clone ([bool copyDynamicFields?=false])
 
int clone ([bool copyDynamicFields?=false])
 
void delete ()
 
void delete ()
 
void dump ()
 
void dump ()
 
void dumpClassHierarchy ()
 
void dumpClassHierarchy ()
 
string getClassName ()
 
string getClassName ()
 
string getClassNamespace ()
 
string getClassNamespace ()
 
string getDynamicField (index)
 
string getDynamicField (index)
 
int getDynamicFieldCount ()
 
int getDynamicFieldCount ()
 
string getField (int index)
 
string getField (int index)
 
int getFieldCount ()
 
int getFieldCount ()
 
string getFieldType (fieldName)
 
string getFieldType (fieldName)
 
string getFieldValue (fieldName)
 
string getFieldValue (fieldName)
 
int getGroup ()
 
int getGroup ()
 
int getId ()
 
int getId ()
 
string getInternalName ()
 
string getInternalName ()
 
string getName ()
 
string getName ()
 
string getProgenitorFile ()
 
string getProgenitorFile ()
 
string getSuperClassNamespace ()
 
string getSuperClassNamespace ()
 
int getType ()
 
int getType ()
 
bool isChildOfGroup ()
 
bool isChildOfGroup ()
 
bool isMemberOfClass (string classname)
 
bool isMemberOfClass (string classname)
 
bool isMethod (string method name)
 
bool isMethod (string method name)
 
bool isTimerActive ()
 
bool isTimerActive ()
 
void removeFieldFilter (fieldName)
 
void removeFieldFilter (fieldName)
 
bool save (fileName,[selectedOnly])
 
bool save (fileName,[selectedOnly])
 
int schedule (time, command,< arg1...argN >)
 
int schedule (time, command,< arg1...argN >)
 
void setClassNamespace ()
 
void setClassNamespace ()
 
bool setFieldValue (fieldName, value)
 
bool setFieldValue (fieldName, value)
 
void setInternalName ()
 
void setInternalName ()
 
void setName (newName)
 
void setName (newName)
 
void setProgenitorFile (file)
 
void setProgenitorFile (file)
 
void setSuperClassNamespace ()
 
void setSuperClassNamespace ()
 
bool startTimer (callbackFunction, float timePeriod,[repeat])
 
bool startTimer (callbackFunction, float timePeriod,[repeat])
 
void stopTimer ()
 
void stopTimer ()
 

Fields

SimBase
bool canSaveDynamicFields
 
string internalName
 
SimObjectPtr parentGroup
 
Namespace Linking
string superclass
 
string class
 
- Fields inherited from SimObject
bool canSaveDynamicFields
 
string internalName
 
SimObjectPtr parentGroup
 
string superclass
 
string class
 

Methods

void SimXMLDocument::addComment ( string  comment)

Add the given comment as a child of current stack element.

Parameters
commentThe desired comment to add
Returns
No return value.
void SimXMLDocument::addComment ( string  comment)

Add the given comment as a child of current stack element.

Parameters
commentThe desired comment to add
Returns
No return value.
void SimXMLDocument::addData ( string  text)

Add the given text as a child of current stack element.

Parameters
Thedesired text to add
Returns
No return value
void SimXMLDocument::addData ( string  text)

Add the given text as a child of current stack element.

Parameters
Thedesired text to add
Returns
No return value
void SimXMLDocument::addHeader ( )

Add XML header to document.

Returns
No return value.
void SimXMLDocument::addHeader ( )

Add XML header to document.

Returns
No return value.
void SimXMLDocument::addNewElement ( string  name)

Create new element as child of current stack element and push new element on to stack.

Parameters
nameThe anme of the new element
Returns
No return value
void SimXMLDocument::addNewElement ( string  name)

Create new element as child of current stack element and push new element on to stack.

Parameters
nameThe anme of the new element
Returns
No return value
void SimXMLDocument::addText ( string  text)

Add the given text as a child of current stack element.

Parameters
textThe desired text to add
Returns
No return value.
void SimXMLDocument::addText ( string  text)

Add the given text as a child of current stack element.

Parameters
textThe desired text to add
Returns
No return value.
string SimXMLDocument::attribute ( string  attribute)

Get attribute value if it exists.

Parameters
attributeThe desired SimXMLDocument attribute
Returns
Returns the value of the attribute as a string, or an empty string on failure
string SimXMLDocument::attribute ( string  attribute)

Get attribute value if it exists.

Parameters
attributeThe desired SimXMLDocument attribute
Returns
Returns the value of the attribute as a string, or an empty string on failure
bool SimXMLDocument::attributeExists ( string  attribute)

Get true if named attribute exists.

Parameters
attributeThe desired attribute's name
Returns
Returns true if attribute exists and false otherwise
bool SimXMLDocument::attributeExists ( string  attribute)

Get true if named attribute exists.

Parameters
attributeThe desired attribute's name
Returns
Returns true if attribute exists and false otherwise
float SimXMLDocument::attributeF32 ( string  attribute)

Get attribute value if it exists.

Parameters
attributeThe desired SimXMLDocument attribute
Returns
Returns the value of the attribute converted to 32-bit floating-point value from string
float SimXMLDocument::attributeF32 ( string  attribute)

Get attribute value if it exists.

Parameters
attributeThe desired SimXMLDocument attribute
Returns
Returns the value of the attribute converted to 32-bit floating-point value from string
int SimXMLDocument::attributeS32 ( string  attribute)

Get attribute value if it exists.

Parameters
attributeThe desired SimXMLDocument attribute
Returns
Returns the value of the attribute converted to 32-bit integer value from string
int SimXMLDocument::attributeS32 ( string  attribute)

Get attribute value if it exists.

Parameters
attributeThe desired SimXMLDocument attribute
Returns
Returns the value of the attribute converted to 32-bit integer value from string
void SimXMLDocument::clear ( )

Clear contents of XML document.

Returns
No return value
void SimXMLDocument::clear ( )

Clear contents of XML document.

Returns
No return value
void SimXMLDocument::clearError ( )

Clear error description.

Returns
No return value
void SimXMLDocument::clearError ( )

Clear error description.

Returns
No return value
string SimXMLDocument::elementValue ( )

Get element value if it exists.

Returns
A string with the desired value, or empty if not found.
string SimXMLDocument::elementValue ( )

Get element value if it exists.

Returns
A string with the desired value, or empty if not found.
string SimXMLDocument::firstAttribute ( )

Obtain the name of the current element's first attribute.

Returns
A string with the name of the first attribute
string SimXMLDocument::firstAttribute ( )

Obtain the name of the current element's first attribute.

Returns
A string with the name of the first attribute
string SimXMLDocument::getData ( )

Gets the text from the current stack element.

Returns
Returns the desired text or empty string if failed (no text)
string SimXMLDocument::getData ( )

Gets the text from the current stack element.

Returns
Returns the desired text or empty string if failed (no text)
string SimXMLDocument::getErrorDesc ( )

Get current error description.

Returns
Returns a string with the error description
string SimXMLDocument::getErrorDesc ( )

Get current error description.

Returns
Returns a string with the error description
string SimXMLDocument::getText ( )

Gets the text from the current stack element.

Returns
Returns the desired text, or empty string on failure
string SimXMLDocument::getText ( )

Gets the text from the current stack element.

Returns
Returns the desired text, or empty string on failure
string SimXMLDocument::lastAttribute ( )

Obtain the name of the current element's last attribute.

Returns
A string with the name of the last attribute
string SimXMLDocument::lastAttribute ( )

Obtain the name of the current element's last attribute.

Returns
A string with the name of the last attribute
int SimXMLDocument::loadFile ( string  fileName)

Load file from given filename.

Parameters
fileNameThe name of the desired file
Returns
Returns 1 on success and 0 otherwise
int SimXMLDocument::loadFile ( string  fileName)

Load file from given filename.

Parameters
fileNameThe name of the desired file
Returns
Returns 1 on success and 0 otherwise
string SimXMLDocument::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
string SimXMLDocument::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
bool SimXMLDocument::nextSiblingElement ( string  name)

Set top element on stack to next element with given name.

Parameters
nameThe name of the element.
Returns
Returns true on success, false otherwise
bool SimXMLDocument::nextSiblingElement ( string  name)

Set top element on stack to next element with given name.

Parameters
nameThe name of the element.
Returns
Returns true on success, false otherwise
int SimXMLDocument::parse ( string  txtXML)

Create document from XML string.

Parameters
txtXMLThe text of the XML document
Returns
Returns 1 on success
int SimXMLDocument::parse ( string  txtXML)

Create document from XML string.

Parameters
txtXMLThe text of the XML document
Returns
Returns 1 on success
void SimXMLDocument::popElement ( )

Pop last element off of stack.

Returns
No return value
void SimXMLDocument::popElement ( )

Pop last element off of stack.

Returns
No return value
string SimXMLDocument::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
string SimXMLDocument::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
bool SimXMLDocument::pushChildElement ( int  index)

Push the child element at the given index onto stack.

Parameters
indexA nonnegative integer representing the index of the child element
Returns
Returns true on success, and false otherwise
bool SimXMLDocument::pushChildElement ( int  index)

Push the child element at the given index onto stack.

Parameters
indexA nonnegative integer representing the index of the child element
Returns
Returns true on success, and false otherwise
bool SimXMLDocument::pushFirstChildElement ( string  name)

Push first child element with given name onto stack.

Parameters
nameThe name of the child element
Returns
returns true on success, false otherwise.
bool SimXMLDocument::pushFirstChildElement ( string  name)

Push first child element with given name onto stack.

Parameters
nameThe name of the child element
Returns
returns true on success, false otherwise.
void SimXMLDocument::pushNewElement ( string  name)

Create new element as child of current stack element and push new element on to stack.

Parameters
nameThe anme of the new element
Returns
No return value
void SimXMLDocument::pushNewElement ( string  name)

Create new element as child of current stack element and push new element on to stack.

Parameters
nameThe anme of the new element
Returns
No return value
string SimXMLDocument::readComment ( S32  index)

Returns the comment at the specified index.

Parameters
indexThe index of the desired comment as a nonnegative integer value
Returns
The comment as a string
string SimXMLDocument::readComment ( S32  index)

Returns the comment at the specified index.

Parameters
indexThe index of the desired comment as a nonnegative integer value
Returns
The comment as a string
void SimXMLDocument::removeText ( )

Remove any text on the current stack element.

Returns
No return value
void SimXMLDocument::removeText ( )

Remove any text on the current stack element.

Returns
No return value
void SimXMLDocument::reset ( )

Set this to default state at construction.

Returns
No return value
void SimXMLDocument::reset ( )

Set this to default state at construction.

Returns
No return value
int SimXMLDocument::saveFile ( string  fileName)

Save file to given filename.

Parameters
fileNameA string presenting the filename to save the XML document as
Returns
Returns 1 on success, and 0 otherwise
int SimXMLDocument::saveFile ( string  fileName)

Save file to given filename.

Parameters
fileNameA string presenting the filename to save the XML document as
Returns
Returns 1 on success, and 0 otherwise
void SimXMLDocument::setAttribute ( string  attributeName,
string  attributeValue 
)

Set attribute of top stack element to given value.

Parameters
attributeNameThe name of the attribute of the element you wish to set
attributeValueThe value you wish to set the given attribute to
Returns
No return value.
void SimXMLDocument::setAttribute ( string  attributeName,
string  attributeValue 
)

Set attribute of top stack element to given value.

Parameters
attributeNameThe name of the attribute of the element you wish to set
attributeValueThe value you wish to set the given attribute to
Returns
No return value.
void SimXMLDocument::setObjectAttributes ( string  attributeValue)

Set attribute of top stack element to given value.

Parameters
attributeValueThe value you wish to set the given attribute to
Returns
No return value.
void SimXMLDocument::setObjectAttributes ( string  attributeValue)

Set attribute of top stack element to given value.

Parameters
attributeValueThe value you wish to set the given attribute to
Returns
No return value.

Member Data Documentation

bool SimXMLDocument::canSaveDynamicFields
string SimXMLDocument::class

Script SuperClass of object.

string SimXMLDocument::internalName
SimObjectPtr SimXMLDocument::parentGroup

Group hierarchy parent of the object.

string SimXMLDocument::superclass

Script Class of object.



Copyright © 2013 GarageGames, LLC. All Rights Reserved.