19 std::equal_to<NString> ,
25template<
typename T,
bool TStackedThreadValues>
39template<
typename T,
bool TStackedThreadValues>
63template<
typename T >
struct ScopeStoreHelper<T, true>
65 T
doWalk ( ScopeStore<T, true>& self );
66 T
doAccess( ScopeStore<T, true>& self,
int cmd, T value );
80template<
typename T,
bool TStackedThreadValues>
108#if !ALIB_SINGLE_THREADED
118 std::size_t
operator()(
const std::pair<bool, threads::ThreadID>& src)
const
120 return src.first ? std::size_t( src.second * 282312799l )
121 : std::size_t( src.second * 573292817l ) ^ std::size_t(-1);
156#if !ALIB_SINGLE_THREADED
203 return access( 0, value );
215 return access( 2,
nullptr );
252extern template struct ScopeStoreHelper<NString , true>;
253extern template class ScopeStore <NString , true>;
255extern template struct ScopeStoreHelper<PrefixLogable* , true>;
256extern template class ScopeStore <PrefixLogable* , true>;
259extern template struct ScopeStoreHelper<SSMap<int>*,
false>;
260extern template class ScopeStore <SSMap<int>*,
false>;
262extern template struct ScopeStoreHelper<SSMap<Box>*,
false>;
263extern template class ScopeStore <SSMap<Box>*,
false>;
threads::ThreadID actThreadID
Actual thread ID.
Scope actScope
The actual scope of a walk.
TLanguageStore languageStore
StringTree to store data for language-related scopes (path,source,method).
T globalStore
The value of the global scope.
void initCursor(bool create)
ALIB_DLL ScopeStore(ScopeInfo &scopeInfo, MonoAllocator &monoAllocator)
containers::StringTree< MonoAllocator, T, StringTreeNamesAlloc< character > > TLanguageStore
bool lazyLanguageNode
Flag used to lazily create the key to language-related scope values.
HashMap< MonoAllocator, ThreadMapKey, TThreadMapValue, BoolThreadIDHash > threadStore
T access(int cmd, T value)
std::pair< bool, threads::ThreadID > ThreadMapKey
Key type for the thread store.
TLanguageStore::Cursor actStringTreeNode
The actual language related scope's map node.
int walkNextThreadIdx
The next value of a walk during Scope::ThreadInner/Outer.
T walkLocalObject
The 'local object' returned by a walk after Scope::ThreadInner and before Scope::Method.
ALIB_DLL ~ScopeStore()
Destructor.
std::conditional_t< TStackedThreadValues, StdVectorMono< T >, T > TThreadMapValue
ALIB_DLL void InitWalk(Scope startScope, const T localObject)
ALIB_DLL void InitAccess(Scope scope, int pathLevel, threads::ThreadID threadID)
bool walking
Indicates if currently a scope walk is active.
int actPathLevel
The path level when using access methods.
ScopeInfo & scopeInfo
ScopeInfo of 'our' lox.
TThreadMapValue * walkThreadValues
The list of values of Scope::ThreadOuter/Inner during a walk.
#define ALIB_ASSERT(cond, domain)
@ Enabled
Caching is enabled.
HashMap< PoolAllocator, NString, T, std::hash< NString >, std::equal_to< NString >, lang::Caching::Enabled, Recycling::None > SSMap
Shortcut to the ScopeStore's hashmap.
integer ThreadID
The ALib thread identifier type.
monomem::TPoolAllocator< MonoAllocator > PoolAllocator
strings::TString< nchar > NString
Type alias in namespace alib.
containers::HashMap< TAllocator, TKey, TMapped, THash, TEqual, THashCaching, TRecycling > HashMap
Type alias in namespace alib.
monomem::TMonoAllocator< lang::HeapAllocator > MonoAllocator
containers::StringTreeNamesAlloc< TChar > StringTreeNamesAlloc
Type alias in namespace alib.
T doWalk(ScopeStore< T, TStackedThreadValues > &self)
T doAccess(ScopeStore< T, TStackedThreadValues > &self, int cmd, T value)
Hash functor for std::pair<bool,ThreadID>.
std::size_t operator()(const std::pair< bool, threads::ThreadID > &src) const