8#ifndef HPP_ALIB_LOX_DETAIL_SCOPE
9#define HPP_ALIB_LOX_DETAIL_SCOPE 1
11#if !defined(HPP_ALIB_LOX_PROPPERINCLUDE)
12# error "ALib sources with ending '.inl' must not be included from outside."
20namespace alib {
namespace lox {
namespace detail {
32 std::equal_to<NString> ,
38template<
typename T,
bool TStackedThreadValues>
52template<
typename T,
bool TStackedThreadValues>
93template<
typename T,
bool TStackedThreadValues>
131 std::size_t
operator()(
const std::pair<bool, threads::ThreadID>& src)
const
133 return src.first ? std::size_t( src.second * 282312799l )
134 : std::size_t( src.second * 573292817l ) ^ std::size_t(-1);
224 return access( 0, value );
240 return access( 2,
nullptr );
289extern template class ScopeStore <NString , true>;
292extern template class ScopeStore <PrefixLogable* , true>;
296extern template class ScopeStore <SSMap<int>*,
false>;
299extern template class ScopeStore <SSMap<Box>*,
false>;
void initCursor(bool create)
TLanguageStore::Cursor actStringTreeNode
The actual language related scope's map node.
ALIB_API void InitWalk(Scope startScope, const T localObject)
T access(int cmd, T value)
bool lazyLanguageNode
Flag used to lazily create the key to language-related scope values.
ALIB_API void InitAccess(Scope scope, int pathLevel, threads::ThreadID threadID)
TThreadMapValue * walkThreadValues
The list of values of Scope::ThreadOuter/Inner during a walk.
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.
TLanguageStore languageStore
StringTree to store data for language-related scopes (path,source,method).
int actPathLevel
The path level when using access methods.
bool walking
Indicates if currently a scope walk is active.
threads::ThreadID actThreadID
Actual thread ID.
Scope actScope
The actual scope of a walk.
ATMP_IF_T_F(TStackedThreadValues, StdVectorMono< T >, T) TThreadMapValue
std::pair< bool, threads::ThreadID > ThreadMapKey
Key type for the thread store.
ALIB_API ScopeStore(ScopeInfo &scopeInfo, MonoAllocator &monoAllocator)
ScopeInfo & scopeInfo
ScopeInfo of 'our' lox.
HashMap< MonoAllocator, ThreadMapKey, TThreadMapValue, BoolThreadIDHash > threadStore
T globalStore
The value of the global scope.
ALIB_API ~ScopeStore()
Destructor.
#define ATMP_IF_T_F( Cond, T, F)
#define ALIB_ASSERT(cond)
@ Enabled
Caching is enabled.
integer ThreadID
The ALib thread identifier type.
std::vector< T, SCAMono< T > > StdVectorMono
Type alias in namespace alib.
strings::TString< nchar > NString
Type alias in namespace alib.
monomem::TMonoAllocator< lang::HeapAllocator > MonoAllocator
monomem::TPoolAllocator< MonoAllocator, ALIB_MONOMEM_POOLALLOCATOR_DEFAULT_ALIGNMENT > PoolAllocator
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