31 ERSerializable::MinimumRecognitionLength= 0;
39 while(*tail !=
nullptr)
43 (*tail)->next=
nullptr;
45 return &(*tail)->message;
58 if( tryRecord ==
nullptr )
60 std::vector<std::pair<integer,const void*>> recordList;
62 if( record.first.RTTI == message->
Type.
TypeID() )
63 recordList.push_back( std::pair<integer,const void*>(record.first.Element, record.second) );
64 if( recordList.size() == 0)
66 ALIB_ERROR(
"EXCEPT",
"No enum records defined for exception enumeration type {!Q<>}.",
71 std::sort( recordList.begin(), recordList.end(),
72 [] (std::pair<integer,const void*>& a, std::pair<integer,const void*>& b )
74 return a.first < b.first;
80 formatter.
Format( recordListDump,
81 "Enum record {} not found for exception enumeration type {}.\n"
82 "The following records have been found:\n",
86 for(
auto& pair : recordList )
87 formatter.
Format( recordListDump,
" {:2}: {}\n",
97 message->emplace( message->begin(),
98 enumRecord.DescriptionOrItsResourceName );
100 message->emplace( message->begin(),
102 enumRecord.DescriptionOrItsResourceName
110 auto* result= **
this;
111 while( result->next !=
nullptr )
112 result= result->next;
114 return result->message;
121 while( entry->next !=
nullptr )
133 Enum* result= &entry->message.Type;
134 while( (entry= entry->next) !=
nullptr )
135 if( entry->message.Type.Integral() >= 0 )
136 result= &entry->message.Type;
153 for (
auto entry=
begin(); entry !=
end(); ++entry )
155 text.
Add(
A_CHAR(
"{}{}: {!Q<>}"), (entry->Type.Integral() >= 0 ?
'E' :
'I'), entryNo, entry->Type );
166 tknzr.
Set( buf,
'\n' );
171 text.
Add( entry->CI );
const String & GetResource(const NString &name)
ALIB_API Message & Back() const
ALIB_API int Size() const
ALIB_API const Enum & Type() const
ALIB_API Message * allocMessageLink()
ALIB_API void finalizeMessage(Message *message, bool hasRecord, ResourcePool *pool, const NString &category)
ALIB_API AString & Format(AString &target) const
virtual const String & Get(const NString &category, const NString &name, bool dbgAssert)=0
AllocatorType & GetAllocator() noexcept
void DbgDisableBufferReplacementWarning()
TLocalString< TChar, 8 > TrimChars
ALIB_API TSubstring< TChar > & Next(lang::Whitespaces trimming=lang::Whitespaces::Trim, TChar newDelim='\0')
void Set(const TString< TChar > &src, TChar delimiter, bool skipEmptyTokens=false)
#define ALIB_BOXING_VTABLE_DEFINE(TMapped, Identifier)
#define ALIB_LOCK_RECURSIVE_WITH(lock)
HashMap< MonoAllocator, EnumRecordKey, const void *, EnumRecordKey::Hash, EnumRecordKey::EqualTo > & getInternalRecordMap()
lang::basecamp::BaseCamp BASECAMP
The singleton instance of ALib Camp class BaseCamp.
const TRecord & GetRecord()
const TRecord * TryRecord()
const std::type_info & TypeID() const
String EnumElementName
The name of the enum element.
static ALIB_API void Get(String &result, bool isLastField=false)
String DescriptionOrItsResourceName
ExceptionEntry * next
A pointer to the next message.