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
117 std::size_t
operator()(
const std::pair<bool, threads::ThreadID>& src)
const {
118 return src.first ? std::size_t( src.second * 282312799l )
119 : std::size_t( src.second * 573292817l ) ^ std::size_t(-1);
154#if !ALIB_SINGLE_THREADED
243extern template struct ScopeStoreHelper<NString , true>;
244extern template class ScopeStore <NString , true>;
246extern template struct ScopeStoreHelper<PrefixLogable* , true>;
247extern template class ScopeStore <PrefixLogable* , true>;
250extern template struct ScopeStoreHelper<SSMap<int>*,
false>;
251extern template class ScopeStore <SSMap<int>*,
false>;
253extern template struct ScopeStoreHelper<SSMap<Box>*,
false>;
254extern template class ScopeStore <SSMap<Box>*,
false>;
#define ALIB_ASSERT(cond, domain)
threads::ThreadID actThreadID
Actual thread ID.
std::conditional_t< TStackedThreadValues, StdVectorMA< T >, T > TThreadMapValue
Scope actScope
The actual scope of a walk.
TLanguageStore languageStore
StringTree to store data for language-related scopes (path,source,method).
containers::StringTree< MonoAllocator, T, StringTreeNamesAlloc< character > > TLanguageStore
T globalStore
The value of the global scope.
void initCursor(bool create)
ScopeStore(ScopeInfo &scopeInfo, MonoAllocator &monoAllocator)
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.
void InitWalk(Scope startScope, const T localObject)
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.
@ 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::TMonoAllocator< lang::HeapAllocator > MonoAllocator
strings::TString< nchar > NString
Type alias in namespace alib.
monomem::TPoolAllocator< MonoAllocator > PoolAllocator
containers::HashMap< TAllocator, TKey, TMapped, THash, TEqual, THashCaching, TRecycling > HashMap
Type alias in namespace alib.
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