Torque2D Reference
|
#include <stringStack.h>
Public Types | |
enum | { MaxStackDepth = 1024, MaxArgs = 20, ReturnBufferSpace = 512 } |
Public Member Functions | |
void | validateBufferSize (U32 size) |
void | validateArgBufferSize (U32 size) |
StringStack () | |
void | setIntValue (U32 i) |
Set the top of the stack to be an integer value. More... | |
void | setFloatValue (F64 v) |
Set the top of the stack to be a float value. More... | |
char * | getReturnBuffer (U32 size) |
char * | getArgBuffer (U32 size) |
void | clearFunctionOffset () |
Clear the function offset. More... | |
void | setStringValue (const char *s) |
Set a string value on the top of the stack. More... | |
StringTableEntry | getSTValue () |
U32 | getIntValue () |
Get an integer representation of the top of the stack. More... | |
F64 | getFloatValue () |
Get a float representation of the top of the stack. More... | |
const char * | getStringValue () |
void | advance () |
void | advanceChar (char c) |
void | push () |
Push the stack, placing a zero-length string on the top. More... | |
void | setLen (U32 newlen) |
void | rewind () |
Pop the start stack. More... | |
void | rewindTerminate () |
U32 | compare () |
void | pushFrame () |
void | popFrame () |
void | getArgcArgv (StringTableEntry name, U32 *argc, const char ***in_argv, bool popStackFrame=false) |
Get the arguments for a function call from the stack. More... | |
Public Attributes | |
char * | mBuffer |
U32 | mBufferSize |
const char * | mArgV [MaxArgs] |
U32 | mFrameOffsets [MaxStackDepth] |
U32 | mStartOffsets [MaxStackDepth] |
U32 | mNumFrames |
U32 | mArgc |
U32 | mStart |
U32 | mLen |
U32 | mStartStackSize |
U32 | mFunctionOffset |
U32 | mArgBufferSize |
char * | mArgBuffer |
Core stack for interpreter operations.
This class provides some powerful semantics for working with strings, and is used heavily by the console interpreter.
|
inline |
|
inline |
Advance the start stack, placing a zero length string on the top.
|
inline |
Advance the start stack, placing a single character, null-terminated strong on the top.
|
inline |
Clear the function offset.
|
inline |
Compare 1st and 2nd items on stack, consuming them in the process, and returning true if they matched, false if they didn't.
|
inline |
Return a buffer we can use for arguments.
This updates the function offset.
void getArgcArgv | ( | StringTableEntry | name, |
U32 * | argc, | ||
const char *** | in_argv, | ||
bool | popStackFrame = false |
||
) |
Get the arguments for a function call from the stack.
|
inline |
Get a float representation of the top of the stack.
|
inline |
Get an integer representation of the top of the stack.
|
inline |
Return a temporary buffer we can use to return data.
|
inline |
Get a string representation of the top of the stack.
|
inline |
Get the top of the stack, as a StringTableEntry.
|
inline |
|
inline |
Push the stack, placing a zero-length string on the top.
|
inline |
|
inline |
Pop the start stack.
|
inline |
|
inline |
Set the top of the stack to be a float value.
|
inline |
Set the top of the stack to be an integer value.
|
inline |
|
inline |
Set a string value on the top of the stack.
|
inline |
|
inline |
char* mArgBuffer |
U32 mArgBufferSize |
U32 mArgc |
const char* mArgV[MaxArgs] |
char* mBuffer |
U32 mBufferSize |
U32 mFrameOffsets[MaxStackDepth] |
U32 mFunctionOffset |
U32 mLen |
U32 mNumFrames |
U32 mStart |
U32 mStartOffsets[MaxStackDepth] |
U32 mStartStackSize |