![]() |
|
Console
[Core]
The basis of the TorqueScript system and command execution. More...
Classes | |
class | ScriptGroup |
Essentially a SimGroup, but with onAdd and onRemove script callbacks. More... | |
class | ScriptObject |
A script-level OOP object which allows binding of a class, superClass and arguments along with declaration of methods. More... | |
class | SimGroup |
A collection of SimObjects that are owned by the group. More... | |
class | SimObject |
Base class for almost all objects involved in the simulation. More... | |
class | SimSet |
A collection of SimObjects. More... | |
Modules | |
Logging | |
Functions for logging messages, warnings, and errors to the console. | |
Debugging | |
Functionality to help spot program errors. | |
Scripting | |
Functions for working with script code. | |
Packages | |
Functions relating to the control of packages. | |
Messaging | |
Script classes and functions used for passing messages and events between classes. | |
Functions | |
void | cls () |
Clears the console output. | |
void | debugEnumInstances (string className, string functionName) |
Call the given function for each instance of the given class. | |
bool | dumpEngineDocs (string outputFile) |
Dumps the engine scripting documentation to the specified file overwriting any existing content. | |
SimXMLDocument | exportEngineAPIToXML () |
Create a XML document containing a dump of the entire exported engine API. | |
string | getCategoryOfClass (string className) |
Returns the category of the given class. | |
string | getDescriptionOfClass (string className) |
Returns the description string for the named class. | |
bool | isClass (string identifier) |
Returns true if the passed identifier is the name of a declared class. | |
bool | isMemberOfClass (string className, string superClassName) |
Returns true if the class is derived from the super class. | |
bool | isValidObjectName (string name) |
Return true if the given name makes for a valid object name. | |
SimObject | loadObject (string filename) |
Loads a serialized object from a file. | |
bool | saveObject (SimObject object, string filename) |
Serialize the object to a file. | |
void | unitTest_runTests ([searchString[, bool skipInteractive]]) |
Run unit tests, or just the tests that prefix match against the searchString. | |
Variables | |
string | $instantGroup |
The group that objects will be added to when they are created. | |
bool | $Con::alwaysUseDebugOutput |
Determines whether to send output to the platform's "debug" system. | |
bool | $Con::logBufferEnabled |
If true, the log buffer will be enabled. | |
int | $Con::objectCopyFailures |
If greater than zero then it counts the number of object creation failures based on a missing copy object and does not report an error.. | |
int | $Con::printLevel |
This is deprecated. | |
bool | $Con::useTimestamp |
If true a timestamp is prepended to every console message. | |
bool | $Con::warnUndefinedVariables |
If true, a warning will be displayed in the console whenever a undefined variable is used in script. |
Detailed Description
The basis of the TorqueScript system and command execution.
Function Documentation
void cls | ( | ) |
Clears the console output.
void debugEnumInstances | ( | string | className, | |
string | functionName | |||
) |
Call the given function for each instance of the given class.
- Parameters:
-
className Name of the class for which to enumerate instances. functionName Name of function to call and pass each instance of the given class.
- Note:
- This function is only available in debug builds and primarily meant as an aid in debugging.
bool dumpEngineDocs | ( | string | outputFile | ) |
Dumps the engine scripting documentation to the specified file overwriting any existing content.
- Parameters:
-
outputFile The relative or absolute output file path and name.
- Returns:
- Returns true if successful.
SimXMLDocument exportEngineAPIToXML | ( | ) |
Create a XML document containing a dump of the entire exported engine API.
- Returns:
- A SimXMLDocument containing a dump of the engine's export information or NULL if the operation failed.
string getCategoryOfClass | ( | string | className | ) |
Returns the category of the given class.
- Parameters:
-
className The name of the class.
string getDescriptionOfClass | ( | string | className | ) |
Returns the description string for the named class.
- Parameters:
-
className The name of the class.
- Returns:
- The class description in string format.
bool isClass | ( | string | identifier | ) |
Returns true if the passed identifier is the name of a declared class.
bool isMemberOfClass | ( | string | className, | |
string | superClassName | |||
) |
Returns true if the class is derived from the super class.
If either class doesn't exist this returns false.
- Parameters:
-
className The class name. superClassName The super class to look for.
bool isValidObjectName | ( | string | name | ) |
Return true if the given name makes for a valid object name.
- Parameters:
-
name Name of object
- Returns:
- True if name is allowed, false if denied (usually because it starts with a number, _, or invalid character
SimObject loadObject | ( | string | filename | ) |
Loads a serialized object from a file.
- Parameters:
-
Name and path to text file containing the object
bool saveObject | ( | SimObject | object, | |
string | filename | |||
) |
Serialize the object to a file.
- Parameters:
-
object The object to serialize. filename The file name and path.
void unitTest_runTests | ( | [searchString[, bool skipInteractive] ] | ) |
Run unit tests, or just the tests that prefix match against the searchString.
Variable Documentation
string $instantGroup |
The group that objects will be added to when they are created.
bool $Con::alwaysUseDebugOutput |
Determines whether to send output to the platform's "debug" system.
- Note:
- This is disabled in shipping builds.
bool $Con::logBufferEnabled |
If true, the log buffer will be enabled.
int $Con::objectCopyFailures |
If greater than zero then it counts the number of object creation failures based on a missing copy object and does not report an error..
int $Con::printLevel |
This is deprecated.
It is no longer in use and does nothing.
bool $Con::useTimestamp |
If true a timestamp is prepended to every console message.
bool $Con::warnUndefinedVariables |
If true, a warning will be displayed in the console whenever a undefined variable is used in script.