10# if !defined(HPP_ALIB_ALOX)
14# define HPP_ALIB_LOX_PROPPERINCLUDE
15# if !defined (HPP_ALOX_DETAIL_SCOPE)
18# if !defined (HPP_ALOX_DETAIL_SCOPEINFO)
22# undef HPP_ALIB_LOX_PROPPERINCLUDE
24# if !defined (HPP_ALIB_STRINGS_FORMAT)
33namespace alib {
namespace lox {
namespace detail {
50template<
typename T>
void write(
const T& val,
NAString& target )
55template<
typename T>
void write( T* val,
NAString& target )
58 if( std::is_same<T, Box*>::value )
70 target.
_(*
static_cast<Box*
>(val));
80 integer methodEnd= fileNameEnd >= 0 ? key.
IndexOf(
'#', fileNameEnd + 1) : -1;
84 else if ( fileNameEnd >= 0 )
targetBuffer.
_<
false>(
"FileName [" );
96 if ( fileNameEnd >= 0 )
120 for (
auto& it : map )
126 if ( it.first.template Equals<false>(
noKey ) )
127 keyString.
_<
false>(
"<global>" );
129 keyString.
_<
false>(
'"' )._( it.first ).
_(
'"' );
149 bool firstEntry=
true;
150 if ( store->globalStore && store->globalStore->size() > 0)
152 cnt+=
static_cast<int>( store->globalStore->size() );
159 for (
auto thread= store->threadStore.begin() ; thread != store->threadStore.end() ; ++thread )
161 if ( thread->first.first==
false )
165 cnt+=
static_cast<int>( thread->second->size() );
175 for( iterator.Initialize( store->languageStore) ; iterator.IsValid() ; iterator.Next() )
179 cnt+=
static_cast<int>( iterator.Node().Value()->size() );
187 for (
auto thread= store->threadStore.begin() ; thread != store->threadStore.end() ; ++thread )
189 if ( thread->first.first ==
true )
193 cnt+=
static_cast<int>( thread->second->size() );
216 for (
auto thread= store->threadStore.begin() ; thread != store->threadStore.end() ; ++thread )
217 if( thread->first.first ==
false )
218 for (
auto& it : thread->second )
224 ._<false>(
"Scope::ThreadOuter " );
235 for( iterator.Initialize( store->languageStore ); iterator.IsValid() ; iterator.Next() )
249 for (
auto thread= store->threadStore.begin() ; thread != store->threadStore.end() ; ++thread )
250 if( thread->first.first ==
true )
251 for (
auto& it : thread->second )
257 ._<false>(
"Scope::ThreadInner " );
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)
ALIB_API NAString & storeThreadToScope(ThreadID threadID)
ScopeInfo::ThreadDictionary & threadDict
ALIB_API integer writeStoreMapHelper(std::map< NString, T > &map, const NString &prefix)
static ALIB_API bool IsNull(T value)
static ALIB_API T NullValue()
Iterator Find(const KeyType &key)
TRecursiveIterator< false > RecursiveIterator
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.
constexpr CString NewLine()
lang::integer integer
Type alias in namespace alib.