IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Stack frame for a block of command-line interpreter commands. More...
Public Member Functions | |
CommandStackFrame (CodeBlockType blockType, CommandThread< InterpreterType > thread, int stackLevel) | |
Constructor. More... | |
override CommandStackFrame < InterpreterType, CommandThread< InterpreterType > > | GetThreadStackFrame (int stackLevel) |
Returns the sibling stack frame at the certain level. More... | |
override CommandStackFrame < InterpreterType, CommandThread< InterpreterType > > | GetParentStackFrame () |
Returns the previous (parent, or one lower level) stack frame of the current stack frame. More... | |
![]() | |
CommandStackFrame (CodeBlockType blockType, ThreadType thread, int stackLevel) | |
Constructor, sets the block type. More... | |
override ICommandLineApplicationInterpreter | GetInterpreterBase () |
Returns the commans-line interpreter to which the current command thread belongs. More... | |
override CommandThreadBase | GetThreadBase () |
Returns the stack frame of the specified level for the current thread. More... | |
![]() | |
CommandStackFrameBase () | |
void | AddBlockEnterCommands (params string[] commands) |
Adds the specified strings to the list of commands that can enter the current kind of the code block. More... | |
void | AddBlockExitCommands (params string[] commands) |
Adds the specified strings to the list of commands that can exit the current kind of the code block. More... | |
void | AddBlockExitCommandsNoLevelEffect (params string[] commands) |
Adds the specified strings to the list of commands that can exit the current kind of the code block, but don't affect the quiet entry/exit level. More... | |
string[] | GetBlockEnterCommands () |
Returns the array of commands that can enter the current kind of code block. More... | |
string[] | GetBlockExitCommands () |
Returns the array of commands that can exit the current kind of code block. More... | |
string[] | GetBlockExitCommandsNoLevelEffect () |
Returns the array of commands that can exit the current kind of code block but have no level effect. More... | |
bool | IsEventualBlockEnterCommand (string commandLine, bool isOnlyCommandName=false) |
Returns true if the specified commandline can eventually represent one of the commands contained in the list of possible block enter commands for the current kind of code block. More... | |
bool | IsEventualBlockExitCommand (string commandLine, bool isOnlyCommandName=false) |
Returns true if the specified commandline can eventually represent one of the commands contained in the list of possible block exit commands for the current kind of code block. More... | |
bool | IsEventualBlockExitCommandNoLevelEffect (string commandLine, bool isOnlyCommandName=false) |
Returns true if the specified commandline can eventually represent one of the commands contained in the list of possible block exit commands that do not affect quiet entry/exit level, for the current kind of code block. More... | |
bool | CheckForBlockEnterOrExitCommand (string commandLine, bool justCheck=false, bool isOnlyCommandName=false) |
Inspects the specified commandline and checks whether it can represent a block enter or a block exit command for the currennt code block. More... | |
bool | IsBlockExitQuietCommand (string commandLine, bool isOnlyCommandName=false) |
Returns true if the specified command should be executed as block exit command, in spite of the fact that commannd execution is currently switched off on the current code block. More... | |
bool | IsVariableDefined (string varName) |
Returns true if the specified variable is defined, false if it is not. More... | |
bool | IsVariableDefinedLocked (string varName) |
Returns true if the specified variable is defined, false if it is not. More... | |
InterpreterVariable | GetVariableDef (string varName) |
Returns variable object (definition) for the variable with specified name. More... | |
string | GetVariableValue (string varName) |
Returns value of the specified variable. More... | |
string | GetVariableValueLocked (string varName) |
Gets the variable within lock on the Lock property and returns it. More... | |
void | SetVariableValue (string varName, string varValue, VariableFlags flags=VariableFlags.Default) |
Sets value of the specified variable. More... | |
void | SetVariableValueLocked (string varName, string varValue, VariableFlags flags=VariableFlags.Default) |
Sets the variable within lock on the property. More... | |
void | RemoveVariable (string varName) |
Removes the specified variable. More... | |
void | RemoveVariableLocked (string varName) |
Removes the specified variable within lock on the property. More... | |
string | ToStringVariableNames () |
string | ToStringVariableValues () |
virtual string | ToString (bool includeThreadInfo=true, bool includeLocalVariables=true, bool includeGlobalVariables=true) |
Returns a string containing information about the current command thread. More... | |
override string | ToString () |
Returns string representation of the current object. More... | |
Properties | |
override InterpreterType | Interpreter [get] |
Returns the commandline interpreter of the crrent stack frame. More... | |
![]() | |
ThreadType | InterpreterThread [get, protected set] |
Interpretation thread that contains the current stack frame. More... | |
abstract InterpreterType | Interpreter [get] |
Returns the commandline interpreter of the crrent stack frame. More... | |
![]() | |
object | Lock [get] |
This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock. More... | |
int | StackLevel [get, protected set] |
List< string > | BlockEnterCommands [get] |
A list of commands that can enter the type of the current code block. More... | |
List< string > | BlockExitCommands [get] |
A list of commands that can exit the type of the current code block. More... | |
List< string > | BlockExitCommandsNoLevelEffect [get] |
A list of commands that can exit the type of the current code block, but willl nnot have effect on the quet wxit/entry level. More... | |
int | QuietBlockEntryLevel [get, protected set] |
Indicates the quiet entry/exit level of the current kind of block when commands are not executed. More... | |
CodeBlockType | BlockType [get, protected set] |
Type of the code block represented by the current stack frame. More... | |
bool | DoExecuteCommands [get, set] |
Whether commands are executed in the current code block. More... | |
bool | WasBranchAlreadyExecuted [get, set] |
Whether a branch has already been executed. More... | |
int | NumExitLevels [get, set] |
int | LoopCount [get, set] |
Whether commands are executed in the current code block. More... | |
bool | SuppressInteractive [get, set] |
Indicates that the interactive mode is temporarily represset. More... | |
string | ConditionExpression [get, set] |
For loopig and branching blocks, this property contains the condition expression of the block, which was a part of the block command (such as While, If, or ElseIf). More... | |
string | BlockCommanddLine [get, set] |
Commandline that started the current block. It may have been saved when the current block of code was entered, in order to be used within the block (e.g. for inspection and debugging) or when the block exits. Typical use is in blocks with deferred evaluation, such as in While block, where commandlines within the block are stored first, and then repeatedly evaluated until the condition from the While block entering command is fulfilled. More... | |
bool | DoSaveCommands [get, set] |
Whether commands are saved to the command store in the current code block. More... | |
List< string > | CommandLines [get] |
string | LastCommandLine [get, set] |
string | ReturnedValue [get, set] |
Value returned from the last executed command. More... | |
string[] | VariableNames [get] |
Gets names of all variables that are defined on the current stack frame. More... | |
string[] | VariableValueStrings [get] |
Gets names of all variables that are defined on the current stack frame. More... | |
InterpreterVariable | this[string variableName] [get, set] |
Gets or sets value of the variable with the specified name. More... | |
Additional Inherited Members | |
![]() | |
bool | IsEventualListedCommand (string commandLine, List< string > commands, bool isOnlyCommandName=false) |
Returns true if the specified commandline can eventually represent one of the commands contained in the specified list of commands. More... | |
![]() | |
int | _quietBlockLevel = 0 |
SortedDictionary< string, InterpreterVariable > | _variables = new SortedDictionary<string, InterpreterVariable>() |
Local variables. More... | |
List< string > | _auxVarNames = null |
Stack frame for a block of command-line interpreter commands.
Usually properties, index operators and methods are not thread safe. Variants whose names end with "Locked" implement locking on the CommandStackFrameBase.Lock property and are thus thread safe. It is not likely that locking is needed because the object will typically be used within a single thread.
InterpreterType | Type of the interpreter for which this class provides stack frames. |
$A Igor Sep15;
InterpreterType | : | class | |
InterpreterType | : | ICommandLineApplicationInterpreter |
|
inline |
Constructor.
blockType | Type of the command block represented by the current stack frame. |
thread | Command thread data that contains the current stack frame. |
stackLevel | Stack level of the current frame. |
|
inlinevirtual |
Returns the sibling stack frame at the certain level.
stackLevel | Stack level for which the sibling frame is returned. |
Implements IG.Lib.CommandStackFrame< InterpreterType, ThreadType >.
|
inlinevirtual |
Returns the previous (parent, or one lower level) stack frame of the current stack frame.
Implements IG.Lib.CommandStackFrame< InterpreterType, ThreadType >.
|
get |
Returns the commandline interpreter of the crrent stack frame.