This class is responsible for scope-related functionality of class Lox.
Public Fields | |
T | globalStore |
StringTree< T > | languageStore = new StringTree<T>() |
Dictionary< Thread, List< T > > | threadInnerStore =new Dictionary<Thread, List<T>>() |
Dictionary< Thread, List< T > > | threadOuterStore =new Dictionary<Thread, List<T>>() |
Public Methods | |
ScopeStore (ScopeInfo scopeInfo, bool cfgSingleThreadValue) | |
void | Clear () |
T | Get () |
void | InitAccess (Scope scope, int pathLevel, Thread thread) |
void | InitWalk (Scope startScope, T localObject) |
T | Remove (T value) |
T | Store (T value) |
T | Walk () |
Protected Fields | |
int | actPathLevel |
Scope | actScope |
StringTree< T >.Cursor | actStringTreeNode |
Thread | actThread |
bool | cfgSingleThreadValue |
AString | languageKey = new AString(128) |
Substring | languageKeySubs = new Substring() |
bool | lazyLanguageNode |
ScopeInfo | scopeInfo |
bool | walking |
T | walkLocalObject |
int | walkNextThreadIdx |
List< T > | walkThreadValues |
Protected Methods | |
T | access (int cmd, T value) |
void | initCursor (bool create) |
|
inline |
|
inlineprotected |
Receives, inserts or removes a value.
cmd | 0= insert, 1= remove, 2= get. |
value | The new value or the one to be removed. |
|
inline |
Clears all data stored, resets all values.
|
inline |
Retrieves the value for the given scope.
|
inline |
|
inlineprotected |
Retrieves and optionally creates an entry in the map that stores language-related scope information. The result is stored in field actStringTreeNode.
create | If true , a non-existing entry is created. |
|
inline |
Initializes a scope 'walk' by storing the given scope information and setting fields of our walk 'state-machine' to proper start values.
startScope | The Scope to start searching for. |
localObject | The 'local object' returned by a walk after Scope.ThreadInner and before Scope.Method |
|
inline |
Removes a value for the given scope.
value | The value to remove (only used for thread-related Scopes). |
|
inline |
Stores a new value for the given scope.
value | The new value to set. |
|
inline |
Searches value in the actual scope. While not found, moves walk state to next outer and continues there.
|
protected |
The next path level of a walk during scope 'Path'
|
protected |
The actual scope of a walk
|
protected |
The actual language related scopes' map node
|
protected |
The actual thread
|
protected |
If true, values stored for thread scopes will be always replaced instead of appended. This is for example true
for Log Data and false
for Scope Domains
T globalStore |
The value to the global scope
Temporary substring for consuming the source key
StringTree<T> languageStore = new StringTree<T>() |
StringTree store for language-related scopes (path,source,method)
|
protected |
Flag used to lazily create the key to language-related scope values
Dictionary<Thread, List<T> > threadInnerStore =new Dictionary<Thread, List<T>>() |
A list of domain paths of Scope.ThreadInner
Dictionary<Thread, List<T> > threadOuterStore =new Dictionary<Thread, List<T>>() |
A list of domain paths of Scope.ThreadOuter
|
protected |
Indicates if currently a scope walk is active
|
protected |
The 'local object' returned by a walk after Scope.ThreadInner and before Scope.Method
|
protected |
The next value of a walk during Scope.ThreadOuter/Inner
|
protected |
The list of values of Scope.ThreadOuter/Inner during a walk