11# define HPP_ALIB_LOX_PROPPERINCLUDE
15# undef HPP_ALIB_LOX_PROPPERINCLUDE
22namespace alib {
namespace lox {
namespace detail {
39template<
typename T>
void write(
const T& val,
NAString& target )
44template<
typename T>
void write( T* val,
NAString& target )
47 if( std::is_same<T, Box*>::value )
59 target.
_(*
static_cast<Box*
>(val));
69 integer methodEnd= fileNameEnd >= 0 ? key.
IndexOf(
'#', fileNameEnd + 1) : -1;
85 if ( fileNameEnd >= 0 )
109 for (
auto& it : map )
115 if ( it.first.template Equals<NC>(
noKey ) )
116 keyString.
_<
NC>(
"<global>" );
118 keyString._<
NC>(
'"' )._( it.first )._(
'"' );
138 bool firstEntry=
true;
139 if ( store->globalStore && store->globalStore->Size() > 0)
141 cnt+=
static_cast<int>( store->globalStore->Size() );
148 for (
auto thread= store->threadStore.begin() ; thread != store->threadStore.end() ; ++thread )
150 if ( thread->first.first==
false )
154 cnt+=
static_cast<int>( thread->second->Size() );
164 for( iterator.Initialize( store->languageStore) ; iterator.IsValid() ; iterator.Next() )
166 if( *iterator.Node() ==
nullptr )
168 cnt+=
static_cast<int>( (*iterator.Node())->Size() );
176 for (
auto thread= store->threadStore.begin() ; thread != store->threadStore.end() ; ++thread )
178 if ( thread->first.first ==
true )
182 cnt+=
static_cast<int>( thread->second->Size() );
195 if ( store->globalStore !=
nullptr )
205 for (
auto thread= store->threadStore.begin() ; thread != store->threadStore.end() ; ++thread )
206 if( thread->first.first ==
false )
207 for (
auto& it : thread->second )
213 ._<NC>(
"Scope::ThreadOuter " );
224 for( iterator.Initialize( store->languageStore ); iterator.IsValid() ; iterator.Next() )
226 if( *iterator.Node() ==
nullptr )
238 for (
auto thread= store->threadStore.begin() ; thread != store->threadStore.end() ; ++thread )
239 if( thread->first.first ==
true )
240 for (
auto& it : thread->second )
246 ._<NC>(
"Scope::ThreadInner " );
Iterator Find(const KeyType &key)
TRecursiveIterator< false > RecursiveIterator
static ALIB_API void ReplaceToReadable(AString &target, integer startIdx)
ALIB_API int writeStoreMap(ScopeStore< T, false > *store)
ALIB_API int writeStore(ScopeStore< T, true > *store, int indentSpaces)
ALIB_API NAString & storeKeyToScope(String key)
integer maximumKeyLength
The maximum length of a key. Adjusts (increases) over life-cycle.
ALIB_API integer writeStoreMapHelper(SSMap< T > &map, const NString &prefix)
const NString noKey
String to identify global keys.
ALIB_API NAString & storeThreadToScope(ThreadID threadID)
ScopeInfo::ThreadDictionary & threadDict
User-defined threads names.
NAString & targetBuffer
The target to write to.
TAString & ReplaceSubstring(const TString< TChar > &src, integer regionStart, integer regionLength)
TAString & InsertChars(TChar c, integer qty)
TAString & _(const TString< TChar > &src, integer regionStart, integer regionLength=MAX_LEN)
integer IndexOf(TChar needle, integer startIdx=0) const
constexpr integer Length() const
@ On
Switch it on, switched on, etc.
@ Left
Chooses left alignment.
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.
lang::integer integer
Type alias in namespace alib.