Con Namespace Reference
Detailed Description
This namespace contains the core of the console functionality.
Introduction
The console is a key part of Torque's architecture. It allows direct run-time control of many aspects of the engine.
|
Console Consumers |
The console distributes its output through Torque by using consumers. Every time a new line is printed to the console, all the ConsumerCallbacks registered using addConsumer are called, in order.
- Note:
- The GuiConsole control, which provides the on-screen in-game console, uses a different technique to render the console. It calls getLockLog() to lock the Vector of on-screen console entries, then it renders them as needed. While the Vector is locked, the console will not change the Vector. When the GuiConsole control is done with the console entries, it calls unlockLog() to tell the console that it is again safe to modify the Vector.
- See also:
- TelnetConsole
TelnetDebugger
WinConsole
MacCarbConsole
StdConsole
ConsoleLogger
|
typedef JournaledSignal< void(RawData)> | ConsoleInputEvent |
void | addConsumer (ConsumerCallback cb) |
void | removeConsumer (ConsumerCallback cb) |
ConsoleInputEvent | smConsoleInput |
| Called from the native consoles to provide lines of console input to process.
|
Control Functions |
The console must be initialized and shutdown appropriately during the lifetime of the app. These functions are used to manage this behavior.
- Note:
- Torque deals with this aspect of console management, so you don't need to call these functions in normal usage of the engine.
|
void | init () |
| Initializes the console.
|
void | shutdown () |
| Shuts down the console.
|
bool | isActive () |
| Is the console active at this time?
|
Miscellaneous |
void | stripColorChars (char *line) |
| Remove color marking information from a string.
|
bool | expandScriptFilename (char *filename, U32 size, const char *src) |
| Convert from a relative script path to an absolute script path.
|
bool | expandGameScriptFilename (char *filename, U32 size, const char *src) |
bool | expandToolScriptFilename (char *filename, U32 size, const char *src) |
bool | collapseScriptFilename (char *filename, U32 size, const char *src) |
bool | isCurrentScriptToolScript () |
StringTableEntry | getModNameFromPath (const char *path) |
bool | isFunction (const char *fn) |
| Returns true if fn is a global scripting function.
|
U32 | tabComplete (char *inputBuffer, U32 cursorPos, U32 maxResultLength, bool forwardTab) |
| This is the basis for tab completion in the console.
|
Variable Management |
bool | addVariable (const char *name, S32 type, void *pointer) |
| Add a console variable that references the value of a variable in C++ code.
|
bool | removeVariable (const char *name) |
| Remove a console variable.
|
void | setLocalVariable (const char *name, const char *value) |
| Assign a string value to a locally scoped console variable.
|
const char * | getLocalVariable (const char *name) |
| Retrieve the string value to a locally scoped console variable.
|
Global Variable Accessors |
Assign a string value to a global console variable - Parameters:
-
| name | Global console variable name to set |
| value | String value to assign to this variable. |
|
void | setVariable (const char *name, const char *value) |
const char * | getVariable (const char *name) |
| Retrieve the string value of a global console variable.
|
void | setBoolVariable (const char *name, bool var) |
| Same as setVariable(), but for bools.
|
bool | getBoolVariable (const char *name, bool def=false) |
| Same as getVariable(), but for bools.
|
void | setIntVariable (const char *name, S32 var) |
| Same as setVariable(), but for ints.
|
S32 | getIntVariable (const char *name, S32 def=0) |
| Same as getVariable(), but for ints.
|
void | setFloatVariable (const char *name, F32 var) |
| Same as setVariable(), but for floats.
|
F32 | getFloatVariable (const char *name, F32 def=.0f) |
| Same as getVariable(), but for floats.
|
Global Function Registration |
void | addCommand (const char *name, StringCallback cb, const char *usage, S32 minArgs, S32 maxArgs, bool toolOnly=false) |
| Register a C++ function with the console making it a global function callable from the scripting engine.
|
void | addCommand (const char *name, IntCallback cb, const char *usage, S32 minArgs, S32 maxArg, bool toolOnly=false) |
|
|
void | addCommand (const char *name, FloatCallback cb, const char *usage, S32 minArgs, S32 maxArgs, bool toolOnly=false) |
|
|
void | addCommand (const char *name, VoidCallback cb, const char *usage, S32 minArgs, S32 maxArgs, bool toolOnly=false) |
|
|
void | addCommand (const char *name, BoolCallback cb, const char *usage, S32 minArgs, S32 maxArgs, bool toolOnly=false) |
|
|
Namespace Function Registration |
void | addCommand (const char *nameSpace, const char *name, StringCallback cb, const char *usage, S32 minArgs, S32 maxArgs, bool toolOnly=false) |
| Register a C++ function with the console making it callable as a method of the given namespace from the scripting engine.
|
void | addCommand (const char *nameSpace, const char *name, IntCallback cb, const char *usage, S32 minArgs, S32 maxArgs, bool toolOnly=false) |
|
|
void | addCommand (const char *nameSpace, const char *name, FloatCallback cb, const char *usage, S32 minArgs, S32 maxArgs, bool toolOnly=false) |
|
|
void | addCommand (const char *nameSpace, const char *name, VoidCallback cb, const char *usage, S32 minArgs, S32 maxArgs, bool toolOnly=false) |
|
|
void | addCommand (const char *nameSpace, const char *name, BoolCallback cb, const char *usage, S32 minArgs, S32 maxArgs, bool toolOnly=false) |
|
|
Special Purpose Registration |
These are special-purpose functions that exist to allow commands to be grouped, so that when we generate console docs, they can be more meaningfully presented.
Click here for more information about console docs and grouping.
|
void | markCommandGroup (const char *nsName, const char *name, const char *usage=NULL) |
void | beginCommandGroup (const char *nsName, const char *name, const char *usage) |
void | endCommandGroup (const char *nsName, const char *name) |
void | noteScriptCallback (const char *className, const char *funcName, const char *usage) |
void | addOverload (const char *nsName, const char *name, const char *altUsage) |
Console Output |
These functions process the formatted string and pass it to all the ConsumerCallbacks that are currently registered. The console log file and the console window callbacks are installed by default.
- See also:
- addConsumer()
removeConsumer()
|
void | printf (const char *_format,...) |
void | warnf (const char *_format,...) |
void | errorf (const char *_format,...) |
void | warnf (ConsoleLogEntry::Type type, const char *_format,...) |
void | errorf (ConsoleLogEntry::Type type, const char *_format,...) |
Console Execution |
These are functions relating to the execution of script code.
|
const char * | execute (S32 argc, const char *argv[]) |
| Call a script function from C/C++ code.
|
const char * | executef (ARG) |
const char * | executef (ARG, ARG) |
const char * | executef (ARG, ARG, ARG) |
const char * | executef (ARG, ARG, ARG, ARG) |
const char * | executef (ARG, ARG, ARG, ARG, ARG) |
const char * | executef (ARG, ARG, ARG, ARG, ARG, ARG) |
const char * | executef (ARG, ARG, ARG, ARG, ARG, ARG, ARG) |
const char * | executef (ARG, ARG, ARG, ARG, ARG, ARG, ARG, ARG) |
const char * | executef (ARG, ARG, ARG, ARG, ARG, ARG, ARG, ARG, ARG) |
const char * | executef (ARG, ARG, ARG, ARG, ARG, ARG, ARG, ARG, ARG, ARG) |
const char * | execute (SimObject *object, S32 argc, const char *argv[]) |
| Call a Torque Script member function of a SimObject from C/C++ code.
|
const char * | executef (SimObject *, ARG) |
const char * | executef (SimObject *, ARG, ARG) |
const char * | executef (SimObject *, ARG, ARG, ARG) |
const char * | executef (SimObject *, ARG, ARG, ARG, ARG) |
const char * | executef (SimObject *, ARG, ARG, ARG, ARG, ARG) |
const char * | executef (SimObject *, ARG, ARG, ARG, ARG, ARG, ARG) |
const char * | executef (SimObject *, ARG, ARG, ARG, ARG, ARG, ARG, ARG) |
const char * | executef (SimObject *, ARG, ARG, ARG, ARG, ARG, ARG, ARG, ARG) |
const char * | executef (SimObject *, ARG, ARG, ARG, ARG, ARG, ARG, ARG, ARG, ARG) |
const char * | executef (SimObject *, ARG, ARG, ARG, ARG, ARG, ARG, ARG, ARG, ARG, ARG) |
const char * | evaluate (const char *string, bool echo=false, const char *fileName=NULL) |
| Evaluate an arbitrary chunk of code.
|
const char * | evaluatef (const char *string,...) |
| Evaluate an arbitrary line of script.
|
Console Function Implementation Helpers |
The functions Con::getIntArg, Con::getFloatArg and Con::getArgBuffer(size) are used to allocate on the console stack string variables that will be passed into the next console
|
char * | getReturnBuffer (U32 bufferSize) |
char * | getReturnBuffer (const char *stringToCopy) |
char * | getArgBuffer (U32 bufferSize) |
char * | getFloatArg (F64 arg) |
char * | getIntArg (S32 arg) |
Namespaces |
Namespace * | lookupNamespace (const char *nsName) |
bool | linkNamespaces (const char *parentName, const char *childName) |
bool | unlinkNamespaces (const char *parentName, const char *childName) |
bool | classLinkNamespaces (Namespace *parent, Namespace *child) |
Logging |
void | getLockLog (ConsoleLogEntry *&log, U32 &size) |
void | unlockLog (void) |
void | setLogMode (S32 mode) |
Dynamic Type System |
void | setData (S32 type, void *dptr, S32 index, S32 argc, const char **argv, const EnumTable *tbl=NULL, BitSet32 flag=0) |
const char * | getData (S32 type, void *dptr, S32 index, const EnumTable *tbl=NULL, BitSet32 flag=0) |
Enumerations |
enum | Constants {
DSOVersion = 43,
MaxLineLength = 512,
MaxDataTypes = 256
} |
| Various configuration constants. More...
|
Functions |
bool | isMainThread () |
| Returns true when called from the main thread, false otherwise.
|
void | setScriptPathExpando (const char *expando, const char *path, bool toolsOnly=false) |
void | removeScriptPathExpando (const char *expando) |
bool | isScriptPathExpando (const char *expando) |
Typedef Documentation
Enumeration Type Documentation
Various configuration constants.
- Enumerator:
-
DSOVersion |
07/31/07 - THB - 42->43 - Patch from Andreas Kirsch: Added opcode to support nested new declarations.
If you make any changes to the way the scripting language works (such as DSO format changes, adding/removing op-codes) that would break compatibility, then you should increment this.
If you make a really major change, increment it to the next multiple of ten.
12/29/04 - BJG - 33->34 Removed some opcodes, part of namespace upgrade. 12/30/04 - BJG - 34->35 Reordered some things, further general shuffling. 11/03/05 - BJG - 35->36 Integrated new debugger code. |
MaxLineLength |
Maximum length of a line of console input. |
MaxDataTypes |
Maximum number of registered data types. |
Function Documentation
Initializes the console.
This performs the following steps:
- Calls Namespace::init() to initialize the scripting namespace hierarchy.
- Calls ConsoleConstructor::setup() to initialize globally defined console methods and functions.
- Registers some basic global script variables.
- Calls AbstractClassRep::init() to initialize Torque's class database.
- Registers some basic global script functions that couldn't usefully be defined anywhere else.
Shuts down the console.
This performs the following steps:
Is the console active at this time?
void Con::stripColorChars |
( |
char * |
line |
) |
|
Remove color marking information from a string.
- Note:
- It does this in-place, so be careful! It may potentially blast data if you're not careful. When in doubt, make a copy of the string first.
bool Con::expandScriptFilename |
( |
char * |
filename, |
|
|
U32 |
size, |
|
|
const char * |
src | |
|
) |
| | |
Convert from a relative script path to an absolute script path.
This is used in (among other places) the exec() script function, which takes a parameter indicating a script file and executes it. Script paths can be one of:
- Absolute: fps/foo/bar.cs Paths of this sort are passed through.
- Mod-relative: ~/foo/bar.cs Paths of this sort have their replaced with the name of the current mod.
- File-relative: ./baz/blip.cs Paths of this sort are calculated relative to the path of the current scripting file.
- Note:
- This function determines paths relative to the currently executing CodeBlock. Calling it outside of script execution will result in it directly copying src to filename, since it won't know to what the path is relative!
- Parameters:
-
| filename | Pointer to string buffer to fill with absolute path. |
| size | Size of buffer pointed to by filename. |
| src | Original, possibly relative script path. |
bool Con::expandGameScriptFilename |
( |
char * |
filename, |
|
|
U32 |
size, |
|
|
const char * |
src | |
|
) |
| | |
bool Con::expandToolScriptFilename |
( |
char * |
filename, |
|
|
U32 |
size, |
|
|
const char * |
src | |
|
) |
| | |
bool Con::collapseScriptFilename |
( |
char * |
filename, |
|
|
U32 |
size, |
|
|
const char * |
src | |
|
) |
| | |
bool Con::isCurrentScriptToolScript |
( |
|
) |
|
bool Con::isFunction |
( |
const char * |
fn |
) |
|
Returns true if fn is a global scripting function.
This looks in the global namespace. It also checks to see if fn is in the StringTable; if not, it returns false.
U32 Con::tabComplete |
( |
char * |
inputBuffer, |
|
|
U32 |
cursorPos, |
|
|
U32 |
maxResultLength, |
|
|
bool |
forwardTab | |
|
) |
| | |
This is the basis for tab completion in the console.
- Note:
- This is an internally used function. You probably don't care much about how this works.
This function does some basic parsing to try to ascertain the namespace in which we are attempting to do tab completion, then bumps control off to the appropriate tabComplete function, either in SimObject or Namespace.
- Parameters:
-
| inputBuffer | Pointer to buffer containing starting data, or last result. |
| cursorPos | Location of cursor in this buffer. This is used to indicate what part of the string should be kept and what part should be advanced to the next match if any. |
| maxResultLength | Maximum amount of result data to put into inputBuffer. This is capped by MaxCompletionBufferSize. |
| forwardTab | Should we go forward to next match or backwards to previous match? True indicates forward. |
bool Con::addVariable |
( |
const char * |
name, |
|
|
S32 |
type, |
|
|
void * |
pointer | |
|
) |
| | |
Add a console variable that references the value of a variable in C++ code.
If a value is assigned to the console variable the C++ variable is updated, and vice-versa.
- Parameters:
-
| name | Global console variable name to create |
| type | The type of the C++ variable; see the ConsoleDynamicTypes enum for a complete list. |
| pointer | Pointer to the variable. |
- See also:
- ConsoleDynamicTypes
bool Con::removeVariable |
( |
const char * |
name |
) |
|
Remove a console variable.
- Parameters:
-
| name | Global console variable name to remove |
- Returns:
- true if variable existed before removal.
void Con::setLocalVariable |
( |
const char * |
name, |
|
|
const char * |
value | |
|
) |
| | |
Assign a string value to a locally scoped console variable.
- Note:
- The context of the variable is determined by gEvalState; that is, by the currently executing code.
- Parameters:
-
| name | Local console variable name to set |
| value | String value to assign to name |
const char* Con::getLocalVariable |
( |
const char * |
name |
) |
|
Retrieve the string value to a locally scoped console variable.
- Note:
- The context of the variable is determined by gEvalState; that is, by the currently executing code.
- Parameters:
-
| name | Local console variable name to get |
void Con::setVariable |
( |
const char * |
name, |
|
|
const char * |
value | |
|
) |
| | |
const char* Con::getVariable |
( |
const char * |
name |
) |
|
Retrieve the string value of a global console variable.
- Parameters:
-
| name | Global Console variable name to query |
- Returns:
- The string value of the variable or "" if the variable does not exist.
void Con::setBoolVariable |
( |
const char * |
name, |
|
|
bool |
var | |
|
) |
| | |
bool Con::getBoolVariable |
( |
const char * |
name, |
|
|
bool |
def = false | |
|
) |
| | |
Same as getVariable(), but for bools.
- Parameters:
-
| name | Name of the variable. |
| def | Default value to supply if no matching variable is found. |
void Con::setIntVariable |
( |
const char * |
name, |
|
|
S32 |
var | |
|
) |
| | |
S32 Con::getIntVariable |
( |
const char * |
name, |
|
|
S32 |
def = 0 | |
|
) |
| | |
Same as getVariable(), but for ints.
- Parameters:
-
| name | Name of the variable. |
| def | Default value to supply if no matching variable is found. |
void Con::setFloatVariable |
( |
const char * |
name, |
|
|
F32 |
var | |
|
) |
| | |
F32 Con::getFloatVariable |
( |
const char * |
name, |
|
|
F32 |
def = .0f | |
|
) |
| | |
Same as getVariable(), but for floats.
- Parameters:
-
| name | Name of the variable. |
| def | Default value to supply if no matching variable is found. |
Register a C++ function with the console making it a global function callable from the scripting engine.
- Parameters:
-
| name | Name of the new function. |
| cb | Pointer to the function implementing the scripting call; a console callback function returning a specific type value. |
| usage | Documentation for this function. Console Auto-Documentation |
| minArgs | Minimum number of arguments this function accepts |
| maxArgs | Maximum number of arguments this function accepts |
void Con::addCommand |
( |
const char * |
name, |
|
|
IntCallback |
cb, |
|
|
const char * |
usage, |
|
|
S32 |
minArgs, |
|
|
S32 |
maxArg, |
|
|
bool |
toolOnly = false | |
|
) |
| | |
void Con::addCommand |
( |
const char * |
nameSpace, |
|
|
const char * |
name, |
|
|
StringCallback |
cb, |
|
|
const char * |
usage, |
|
|
S32 |
minArgs, |
|
|
S32 |
maxArgs, |
|
|
bool |
toolOnly = false | |
|
) |
| | |
Register a C++ function with the console making it callable as a method of the given namespace from the scripting engine.
- Parameters:
-
| nameSpace | Name of the namespace to associate the new function with; this is usually the name of a class. |
| name | Name of the new function. |
| cb | Pointer to the function implementing the scripting call; a console callback function returning a specific type value. |
| usage | Documentation for this function. Console Auto-Documentation |
| minArgs | Minimum number of arguments this function accepts |
| maxArgs | Maximum number of arguments this function accepts |
void Con::addCommand |
( |
const char * |
nameSpace, |
|
|
const char * |
name, |
|
|
IntCallback |
cb, |
|
|
const char * |
usage, |
|
|
S32 |
minArgs, |
|
|
S32 |
maxArgs, |
|
|
bool |
toolOnly = false | |
|
) |
| | |
void Con::addCommand |
( |
const char * |
nameSpace, |
|
|
const char * |
name, |
|
|
FloatCallback |
cb, |
|
|
const char * |
usage, |
|
|
S32 |
minArgs, |
|
|
S32 |
maxArgs, |
|
|
bool |
toolOnly = false | |
|
) |
| | |
void Con::addCommand |
( |
const char * |
nameSpace, |
|
|
const char * |
name, |
|
|
VoidCallback |
cb, |
|
|
const char * |
usage, |
|
|
S32 |
minArgs, |
|
|
S32 |
maxArgs, |
|
|
bool |
toolOnly = false | |
|
) |
| | |
void Con::addCommand |
( |
const char * |
nameSpace, |
|
|
const char * |
name, |
|
|
BoolCallback |
cb, |
|
|
const char * |
usage, |
|
|
S32 |
minArgs, |
|
|
S32 |
maxArgs, |
|
|
bool |
toolOnly = false | |
|
) |
| | |
void Con::markCommandGroup |
( |
const char * |
nsName, |
|
|
const char * |
name, |
|
|
const char * |
usage = NULL | |
|
) |
| | |
void Con::beginCommandGroup |
( |
const char * |
nsName, |
|
|
const char * |
name, |
|
|
const char * |
usage | |
|
) |
| | |
void Con::endCommandGroup |
( |
const char * |
nsName, |
|
|
const char * |
name | |
|
) |
| | |
void Con::noteScriptCallback |
( |
const char * |
className, |
|
|
const char * |
funcName, |
|
|
const char * |
usage | |
|
) |
| | |
void Con::addOverload |
( |
const char * |
nsName, |
|
|
const char * |
name, |
|
|
const char * |
altUsage | |
|
) |
| | |
void Con::printf |
( |
const char * |
_format, |
|
|
|
... | |
|
) |
| | |
- Parameters:
-
| _format | A stdlib printf style formatted out put string |
| ... | Variables to be written |
void Con::warnf |
( |
const char * |
_format, |
|
|
|
... | |
|
) |
| | |
- Note:
- The console window colors warning text as LIGHT GRAY.
- Parameters:
-
| _format | A stdlib printf style formatted out put string |
| ... | Variables to be written |
void Con::errorf |
( |
const char * |
_format, |
|
|
|
... | |
|
) |
| | |
- Note:
- The console window colors warning text as RED.
- Parameters:
-
| _format | A stdlib printf style formatted out put string |
| ... | Variables to be written |
- Note:
- The console window colors warning text as LIGHT GRAY.
- Parameters:
-
| type | Allows you to associate the warning message with an internal module. |
| _format | A stdlib printf style formatted out put string |
| ... | Variables to be written |
- See also:
- Con::warnf()
- Note:
- The console window colors warning text as RED.
- Parameters:
-
| type | Allows you to associate the warning message with an internal module. |
| _format | A stdlib printf style formatted out put string |
| ... | Variables to be written |
- See also:
- Con::errorf()
bool Con::isMainThread |
( |
|
) |
|
Returns true when called from the main thread, false otherwise.
const char* Con::execute |
( |
S32 |
argc, |
|
|
const char * |
argv[] | |
|
) |
| | |
Call a script function from C/C++ code.
- Parameters:
-
| argc | Number of elements in the argv parameter |
| argv | A character string array containing the name of the function to call followed by the arguments to that function. |
const char* Con::executef |
( |
ARG |
|
) |
|
const char* Con::executef |
( |
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::executef |
( |
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::executef |
( |
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::executef |
( |
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::executef |
( |
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::executef |
( |
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::executef |
( |
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::executef |
( |
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::executef |
( |
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::execute |
( |
SimObject * |
object, |
|
|
S32 |
argc, |
|
|
const char * |
argv[] | |
|
) |
| | |
Call a Torque Script member function of a SimObject from C/C++ code.
- Parameters:
-
| object | Object on which to execute the method call. |
| argc | Number of elements in the argv parameter (must be >2, see argv) |
| argv | A character string array containing the name of the member function to call followed by an empty parameter (gets filled with object ID) followed by arguments to that function. |
const char* Con::executef |
( |
SimObject * |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::executef |
( |
SimObject * |
, |
|
|
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::executef |
( |
SimObject * |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::executef |
( |
SimObject * |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::executef |
( |
SimObject * |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::executef |
( |
SimObject * |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::executef |
( |
SimObject * |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::executef |
( |
SimObject * |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::executef |
( |
SimObject * |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::executef |
( |
SimObject * |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
, |
|
|
ARG |
| |
|
) |
| | |
const char* Con::evaluate |
( |
const char * |
string, |
|
|
bool |
echo = false , |
|
|
const char * |
fileName = NULL | |
|
) |
| | |
Evaluate an arbitrary chunk of code.
- Parameters:
-
| string | Buffer containing code to execute. |
| echo | Should we echo the string to the console? |
| fileName | Indicate what file this code is coming from; used in error reporting and such. |
const char* Con::evaluatef |
( |
const char * |
string, |
|
|
|
... | |
|
) |
| | |
Evaluate an arbitrary line of script.
This wraps dVsprintf(), so you can substitute parameters into the code being executed.
char* Con::getReturnBuffer |
( |
U32 |
bufferSize |
) |
|
char* Con::getReturnBuffer |
( |
const char * |
stringToCopy |
) |
|
char* Con::getArgBuffer |
( |
U32 |
bufferSize |
) |
|
char* Con::getFloatArg |
( |
F64 |
arg |
) |
|
char* Con::getIntArg |
( |
S32 |
arg |
) |
|
Namespace* Con::lookupNamespace |
( |
const char * |
nsName |
) |
|
bool Con::linkNamespaces |
( |
const char * |
parentName, |
|
|
const char * |
childName | |
|
) |
| | |
bool Con::unlinkNamespaces |
( |
const char * |
parentName, |
|
|
const char * |
childName | |
|
) |
| | |
void Con::setScriptPathExpando |
( |
const char * |
expando, |
|
|
const char * |
path, |
|
|
bool |
toolsOnly = false | |
|
) |
| | |
void Con::removeScriptPathExpando |
( |
const char * |
expando |
) |
|
bool Con::isScriptPathExpando |
( |
const char * |
expando |
) |
|
Variable Documentation
Called from the native consoles to provide lines of console input to process.
This will schedule it for execution ASAP.
|