ALib C++ Framework
by
Library Version: 2605 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
resources_debug.cpp
1#if ALIB_DEBUG_RESOURCES && ALIB_FORMAT
2
4namespace alib::resources {
5
7AString DbgDump( std::vector<std::tuple<NString, NString, String, integer>>& list,
8 const NString& catFilter, const String& format ) {
9 AString result;
10 NString actCategory( nullptr );
12 auto& formatter= Formatter::DEFAULT;
13 for( auto& it : list ) {
14 if( catFilter.IsNotEmpty() ) {
15 TokenizerN cats( catFilter, ',');
16 bool found= false;
17 while( cats.HasNext() )
18 found|= cats.Next().Trim().Equals<CHK, lang::Case::Ignore>(std::get<0>(it) );
19 if( !found )
20 continue;
21 }
22
23 if( actCategory != std::get<0>(it) ) {
24 actCategory= std::get<0>(it);
25 result << NEW_LINE
26 << '[' << actCategory << ']' << NEW_LINE;
27 }
28
29 formatter->Format( result, format, std::get<0>(it), std::get<1>(it),
30 std::get<2>(it), std::get<3>(it) );
31 }
32
33 return result;
34}
35} // namespace [alib::resources]
36# include "ALib.Lang.CIMethods.H"
37#endif // ALIB_DEBUG_RESOURCES
#define ALIB_LOCK_RECURSIVE_WITH(lock)
static threads::RecursiveLock DEFAULT_LOCK
static SPFormatter DEFAULT
constexpr bool IsNotEmpty() const
Definition string.hpp:353
bool Equals(const TString< TChar > &rhs) const
Definition string.hpp:515
TSubstring & Trim(const TCString< TChar > &whiteSpaces=CStringConstantsTraits< TChar >::DefaultWhitespaces())
TSubstring< TChar > & Next(lang::Whitespaces trimming=lang::Whitespaces::Trim, TChar newDelim='\0')
Definition tokenizer.cpp:4
AString DbgDump(std::vector< std::tuple< NString, NString, String, integer > > &list, const NString &catFilter, const String &format)
strings::TString< nchar > NString
Type alias in namespace #"%alib".
Definition string.hpp:2174
constexpr CString NEW_LINE
A zero-terminated string containing the new-line character sequence.
Definition cstring.hpp:536
strings::TString< character > String
Type alias in namespace #"%alib".
Definition string.hpp:2165
strings::TAString< character, lang::HeapAllocator > AString
Type alias in namespace #"%alib".
strings::util::TTokenizer< nchar > TokenizerN
Type alias in namespace #"%alib".
See sibling type #"NC".
Definition chk_nc.hpp:30