Extensions to the scripting engine in the global namespace (root namespace).
More...
|
class | StopWatch |
| A high precision stop watch to measure elapsed time. More...
|
|
class | XmlNode |
| Reference type that describes a node in an Xml tree structure (DOM). More...
|
|
|
double | rand (double min=0, double max=1) |
| Random number generator. More...
|
|
int | system (const string &command) |
| System command execution (experimental). More...
|
|
int | system (const string &command, string &output) |
| System command execution with output capture (experimental). More...
|
|
XmlNode * | XmlParseFile (const string &file) |
| Parse an Xml file and build the corresponding DOM tree structure (returns null if failed).
|
|
XmlNode * | XmlParse (const string &str) |
| Parse a string containing Xml and build the corresponding DOM tree structure (returns null if failed).
|
|
bool | XmlWriteFile (const XmlNode &in xml, const string &file) |
| Write an Xml DOM into a file. Returns false upon failure.
|
|
bool | XmlWrite (const XmlNode &in xml, string &str) |
| Write an Xml DOM into a string. Returns false upon failure.
|
|
◆ XmlNodeType
Type of Xml Node.
Enumerator |
---|
kXmlElement | Element node.
|
kXmlComment | Comment node.
|
kXmlText | text node
|
◆ rand()
double GlobalNamespace::rand |
( |
double |
min = 0 , |
|
|
double |
max = 1 |
|
) |
| |
Generates a random number between min and max.
◆ system() [1/2]
int GlobalNamespace::system |
( |
const string & |
command | ) |
|
Executes "command" using the system shell and waits for the command to finish. returns the result of the command.
◆ system() [2/2]
int GlobalNamespace::system |
( |
const string & |
command, |
|
|
string & |
output |
|
) |
| |
Executes "command" using the system shell and returns the output as a string. Example:
will return the list of directories as displayed by the "dir" command on Windows (you can use "ls" on Mac instead).