IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Lib.CommandThread< InterpreterType > Class Template Reference

Contains stack frames and other command thread data for a single command thread of a command-line interreter. More...

+ Inheritance diagram for IG.Lib.CommandThread< InterpreterType >:
+ Collaboration diagram for IG.Lib.CommandThread< InterpreterType >:

Public Member Functions

 CommandThread (InterpreterType interpreter)
 
- Public Member Functions inherited from IG.Lib.CommandThread< InterpreterType, FrameType, ThreadType >
 CommandThread (InterpreterType interpreter)
 
override
ICommandLineApplicationInterpreter 
GetInterpreterBase ()
 Returns the commans-line interpreter to which the current command thread belongs. More...
 
override CommandStackFrameBase GetStackFrameBase (int level)
 Returns the stack frame of the specified level for the current thread. More...
 
FrameType AddFrame (CodeBlockType blockType)
 Adds a new stack frame. More...
 
FrameType RemoveFrame ()
 Removes the last stack frame. More...
 
- Public Member Functions inherited from IG.Lib.CommandThreadBase
 CommandThreadBase ()
 
void StorePrompt (string prompt)
 Stores a string (prompt) to the end of the list of stored prompts. More...
 
string RestorePrompt ()
 Restores a string (prompt) from the end of the list of stored prompts. More...
 
void PushParameter (object param)
 Stores a new parameter at the end of the parameter store. More...
 
object PopParameter ()
 Removae and returns the last object on the parameter store. More...
 
object GetParameterFromTop (int whichPlaceFromTop=0)
 Returns the stored parameter with the specified index from the top. More...
 
override string ToString ()
 Returns a string containing information about the current command thread. More...
 

Protected Member Functions

override CommandStackFrame
< InterpreterType > 
CreateFrame (CodeBlockType type, int stackLevel)
 Creates a new stack frame. More...
 
- Protected Member Functions inherited from IG.Lib.CommandThreadBase
virtual void SaveNumStoredParameters ()
 Saves the current number of stored parameters on the command thread. More...
 
virtual void RestorePreviousNumStoredParameters (CommandStackFrameBase frame)
 Saves the current number of stored parameters on the command thread. More...
 

Additional Inherited Members

- Public Attributes inherited from IG.Lib.CommandThreadBase
StopWatch1 _timer
 
- Static Protected Member Functions inherited from IG.Lib.CommandThreadBase
static int GetNextIdThread ()
 Returns another ID that is unique for objects of the containing class its and derived classes. More...
 
- Protected Attributes inherited from IG.Lib.CommandThreadBase
int _outputLevel = DefaultOutputLevel
 Default level of output for some of the interpreters' functionality (e.g. asynchronous command execution). More...
 
- Properties inherited from IG.Lib.CommandThread< InterpreterType, FrameType, ThreadType >
InterpreterType Interpreter [get, protected set]
 Returns interpreter that handles command execution on the current command thread. More...
 
List< FrameType > StackFrames [get]
 A list of stack frames existent in the current thread. More...
 
FrameType BaseFrame [get, protected set]
 Base stack frame, created when the thread is initialized and exists until thread is exited. More...
 
FrameType TopFrame [get, protected set]
 Base stack frame, created when the thread is initialized and exists until thread is exited. More...
 
FrameType this[int which] [get]
 
- Properties inherited from IG.Lib.CommandThreadBase
int TopFrameIndex [get, protected set]
 
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...
 
static object LockIdThread [get]
 Lock used for acquiring IDs. More...
 
virtual int Id [get]
 Unique ID for objects of the currnet and derived classes. More...
 
bool WasCommandExecuted [get, set]
 Auxiliary flag that indicates whether the last command launched on the current thread has actually been executed. More...
 
bool WasBlockEnterCommand [get, set]
 Auxiliary flag that indicates whether the last executed command was a block enter command. More...
 
bool WasBlockExitCommand [get, set]
 Auxiliary flag that indicates whether the last executed command was a block exit command. More...
 
List< String > StoredPrompts [get]
 Auxiliary list where calling environment can store prompts used e.g. in interactive mode More...
 
List< object > ParameterStore [get]
 Stored objects. More...
 
int NumStoredParameters [get]
 
bool SuppressInteractive [get, set]
 Indicates that the interactive mode is temporarily represset. More...
 
static int DefaultOutputLevel [get, set]
 
bool IsOutputLevelSet [get, protected set]
 
virtual int OutputLevel [get, set]
 Level of output for some of the interpreter's functionality (e.g. asynchronous command execution). More...
 
StopWatch1 Timer [get]
 Gets the stopwatch used for measuring time of commands. More...
 
- Properties inherited from IG.Lib.IIdentifiable
int Id [get]
 Returns unique ID (in the scope of a given type) of the current object. More...
 
- Properties inherited from IG.Lib.ILockable
object Lock [get]
 

Detailed Description

Contains stack frames and other command thread data for a single command thread of a command-line interreter.

Usually properties, index operators and methods are not thread safe. Variants whose names end with "Locked" implement locking on the CommandThreadBase.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.

Template Parameters
InterpreterTypeType of the interpreter for which this class provides command thread data.

$A Igor Sep15;

Type Constraints
InterpreterType :class 
InterpreterType :ICommandLineApplicationInterpreter 

Constructor & Destructor Documentation

IG.Lib.CommandThread< InterpreterType >.CommandThread ( InterpreterType  interpreter)
inline

Member Function Documentation

override CommandStackFrame<InterpreterType> IG.Lib.CommandThread< InterpreterType >.CreateFrame ( CodeBlockType  type,
int  stackLevel 
)
inlineprotectedvirtual

Creates a new stack frame.

Parameters
typeType of code block for which stack frame is created.
stackLevelLevel of the stack frame.

Implements IG.Lib.CommandThread< InterpreterType, FrameType, ThreadType >.


The documentation for this class was generated from the following file: