This class is an internal helper to export current scope values. It was extracted from class Lox to keep that class clean from this somehow 'cluttered' code.
The current purpose of this class is to write information into an AString buffer. This is used by method Lox::State. In the future, other export formats, like JSON might be implemented here.
Definition at line 32 of file scopedump.inl.
Public Method Index: | |
ScopeDump (ScopeInfo::ThreadDictionary &threadDictionary, const NString noKeyHashKey, NAString &target, int maxKeyLength=10) | |
template<typename T > | |
ALIB_API int | writeStore (ScopeStore< T, true > *store, int indentSpaces) |
template<typename T > | |
ALIB_API int | writeStoreMap (ScopeStore< T, false > *store) |
|
protected |
The maximum length of a key. Adjusts (increases) over life-cycle.
Definition at line 45 of file scopedump.inl.
|
protected |
String to identify global keys.
Definition at line 42 of file scopedump.inl.
|
protected |
The target to write to.
Definition at line 39 of file scopedump.inl.
|
protected |
User-defined threads names.
Definition at line 49 of file scopedump.inl.
|
inline |
Constructor
threadDictionary | User-defined threads names. |
target | Target string to write to. |
noKeyHashKey | String to identify global keys. |
maxKeyLength | The start value for the maximum length of a key. |
Definition at line 65 of file scopedump.inl.
Helper method to write a StringTree's key as scope information.
key | The key used for the StringTree. |
Helper method to write thread information.
threadID | The thread id. |
ALIB_API int writeStore | ( | ScopeStore< T, true > * | store, |
int | indentSpaces ) |
Writes the contents of the ScopeStore used for Scope Domains.
store | The store to use |
indentSpaces | The number of spaces to add at the beginning of each line. |
ALIB_API int writeStoreMap | ( | ScopeStore< T, false > * | store | ) |
Writes hash tables stored in a ScopeStore. Keys are Strings. Value types currently supported are LogData* and int.
store | The store to use. |
|
protected |
Helper method to writeStoreMap.
map | The map to use |
prefix | A prefix string for each line |