8#ifndef HPP_ALOX_DETAIL_SCOPE
9#define HPP_ALOX_DETAIL_SCOPE 1
11#if !defined(HPP_ALIB_LOX_PROPPERINCLUDE)
12# error "ALib sources with ending '.inl' must not be included from outside."
15#if !defined (HPP_ALOX_DETAIL_DOMAIN)
19#if !defined(HPP_ALIB_MONOMEM_STRINGTREE)
23#if !defined (HPP_ALIB_MONOMEM_HASHMAP)
27#if !defined (_GLIBCXX_MAP) && !defined(_MAP_)
31namespace alib {
namespace lox {
namespace detail {
75template<
typename T,
bool TStackedThreadValues>
91template<
typename T,
bool TStackedThreadValues>
109#if !defined(ALIB_DOX)
134template<
typename T,
bool TStackedThreadValues>
137 #if !defined(ALIB_DOX)
178 std::size_t
operator()(
const std::pair<bool, threads::ThreadID>& src)
const
180 return src.first ? std::size_t( src.second * 282312799l )
181 : std::size_t( src.second * 573292817l ) ^ std::size_t(-1);
284 return access( 0, value );
295 return access( 1, value );
350#if !defined(ALIB_DOX)
351#if !defined(_MSC_VER)
390template<>
inline bool ScopeStoreType<NString > ::IsNull (
NString value ) {
return value.
IsNull(); }
391template<>
inline NString ScopeStoreType<NString > ::NullValue () {
return NullNString(); }
392template<>
inline bool ScopeStoreType<PrefixLogable* > ::AreEqual ( PrefixLogable* first, PrefixLogable* second ) {
return static_cast<Box*
>(first)->Call<FEquals>(*second); }
393template<>
inline bool ScopeStoreType<PrefixLogable* > ::IsNull ( PrefixLogable* value ) {
return value ==
nullptr; }
394template<>
inline PrefixLogable* ScopeStoreType<PrefixLogable* > ::NullValue () {
return nullptr; }
395template<>
inline bool ScopeStoreType<std::map<NString, int>*> ::AreEqual ( std::map<NString, int>* first, std::map<NString, int>* second ) {
return first == second; }
396template<>
inline bool ScopeStoreType<std::map<NString, int>*> ::IsNull ( std::map<NString, int>* value ) {
return value ==
nullptr; }
397template<>
inline std::map<NString, int>* ScopeStoreType<std::map<NString, int>*> ::NullValue () {
return nullptr; }
398template<>
inline bool ScopeStoreType<std::map<NString, Box>*> ::AreEqual ( std::map<NString, Box>* first, std::map<NString, Box>* second ) {
return first == second; }
399template<>
inline bool ScopeStoreType<std::map<NString, Box>*> ::IsNull ( std::map<NString, Box>* value ) {
return value ==
nullptr; }
400template<>
inline std::map<NString, Box>* ScopeStoreType<std::map<NString, Box>*> ::NullValue () {
return nullptr; }
static ALIB_API bool IsNull(T value)
static ALIB_API T NullValue()
static ALIB_API bool AreEqual(T first, T second)
void initCursor(bool create)
ALIB_API void InitWalk(Scope startScope, const T localObject)
T access(int cmd, T value)
ATMP_IF_T_F(TStackedThreadValues, std::vector< T ALIB_COMMA StdContMA< T > >, T) ThreadMapValueT
ALIB_API void InitAccess(Scope scope, int pathLevel, threads::ThreadID threadID)
LanguageStoreT languageStore
ThreadMapValueT * walkThreadValues
threads::ThreadID actThreadID
HashMap< ThreadMapKey, ThreadMapValueT, BoolThreadIDHash > threadStore
LanguageStoreT::Cursor actStringTreeNode
std::pair< bool, threads::ThreadID > ThreadMapKey
ALIB_API ScopeStore(ScopeInfo &scopeInfo, monomem::MonoAllocator *monoAllocator)
constexpr bool IsNull() const
bool Equals(const TString< TChar > &rhs) const
#define ATMP_IF_T_F( Cond, T, F)
#define ALIB_ASSERT(cond)
strings::TString< nchar > NString
Type alias in namespace alib.
constexpr NString NullNString()
boxing::Box Box
Type alias in namespace alib.
T doWalk(ScopeStore< T, TStackedThreadValues > &self)
T doAccess(ScopeStore< T, TStackedThreadValues > &self, int cmd, T value)
std::size_t operator()(const std::pair< bool, threads::ThreadID > &src) const