71 "Doubly defined resource \"{}\" in category \"{}\".", category, name )
154 #if ALIB_CHARACTERS_WIDE
158 return Get( category, nName
ALIB_DBG(, dbgAssert ) );
163 #if ALIB_DEBUG_RESOURCES
191 std::vector<std::tuple<NString, NString, String, integer>>
DbgGetList();
254 if ( resourceCategory.IsNotNull() )
368 template<
typename TRequires= T>
389 template<
typename TRequires= T>
393 template<
typename TRequires= T>
416 template<
typename TRequires= T>
420 #if ALIB_CHARACTERS_WIDE
421 template<
typename TRequires= T>
455 auto& pf= pool->Get( category, resourceName
ALIB_DBG(,
false) );
544 void Set(
const T& sample) {
588 #if ALIB_CHARACTERS_WIDE
650template<
typename TEnum>
674 auto** lastP = records.getPointerToLast();
675 while( (input= pool.
Get( category, nameNr.
Reset( name).
_(nr)
ALIB_DBG(,
false))).IsNotNull()
683 element->record.Parse();
689 lastP= &element->next;
696 for(
int i= 0 ; i < 35 ; ++i ) {
698 if( pool.
Get( category, nameNr.
Reset( name).
_( nr)
ALIB_DBG(,
false)).IsNotNull() ) {
700 "Detected a \"gap\" in numbering of enum records for type <{}>: "
701 "From index {} to {}.\n Resource: {}/{}",
702 &
typeid(TEnum), nr - i - 1, nr - 1, category, name )
722template<
typename TEnum>
726 "No specialization for ResourcedTraits<TEnum> given. Method not applicable." );
731 innerDelim, outerDelim );
#define ALIB_ERROR(domain,...)
#define ALIB_POP_ALLOWANCE
#define ALIB_ALLOW_NULL_POINTER_PASSING
#define ALIB_ASSERT_ERROR(cond, domain,...)
ResourceHolder(SPResourcePool &pool, const NCString &resourceCategory)
const String & GetResource(const NString &name)
SPResourcePool & GetResourcePoolSP()
const String & TryResource(const NString &name)
NCString ResourceCategory
SPResourcePool resourcePool
Shared pointer to the resource pool.
void BootstrapResource(const NString &name, const String &data)
void Set(SPResourcePool &pool, const NCString &resourceCategory=nullptr)
ResourceHolder(const NCString &resourceCategory=nullptr)
SharedPtr< resources::ResourcePool, MonoAllocator > SPResourcePool
ResourcePool & GetResourcePool()
virtual bool BootstrapAddOrReplace(const NString &category, const NString &name, const String &data)=0
virtual std::vector< std::pair< NString, integer > > DbgGetCategories()
void Bootstrap(const NString &category, const NString &name, const String &data)
const String & Get(const NString &category, const String &name, bool dbgAssert)
virtual ~ResourcePool()=default
Virtual destructor.
virtual const String & Get(const NString &category, const NString &name, bool dbgAssert)=0
virtual void BootstrapBulk(const nchar *category,...)=0
virtual std::vector< std::tuple< NString, NString, String, integer > > DbgGetList()
static T & GetSingleton()
TAString & _(const TAppendable &src)
constexpr bool IsNotNull() const
void Bootstrap(camp::Camp &camp, const NString &name, character innerDelim=',', character outerDelim=',')
void setEnumRecord(const std::type_info &rtti, integer elementValue, const void *record)
TMonoAllocator< lang::HeapAllocator > GLOBAL_ALLOCATOR
strings::TString< nchar > NString
Type alias in namespace alib.
constexpr NString NULL_NSTRING
A nulled string of the narrow character type.
resources::ResourcePool ResourcePool
Type alias in namespace alib.
strings::TCString< nchar > NCString
Type alias in namespace alib.
resources::ResourcedType< T > ResourcedType
Type alias in namespace alib.
constexpr const String EMPTY_STRING
An empty string of the default character type.
lang::integer integer
Type alias in namespace alib.
containers::SharedPtr< T, TAllocator > SharedPtr
Type alias in namespace alib.
strings::TString< character > String
Type alias in namespace alib.
characters::nchar nchar
Type alias in namespace alib.
resources::ResourceInfo ResourceInfo
Type alias in namespace alib.
NLocalString< 256 > NString256
Type alias name for #"TLocalString;TLocalString<nchar,256>".
NLocalString< 128 > NString128
Type alias name for #"TLocalString;TLocalString<nchar,128>".
characters::character character
Type alias in namespace alib.
NLocalString< 64 > NString64
Type alias name for #"TLocalString;TLocalString<nchar,64>".
static void Get(String &result, bool isLastField=false)
static void assertEndOfInput()
static void Initialize(const String &input, character innerDelim, character outerDelim, const NString &resourceCategory, const NString &resourceName)
A node of the forward list that contains the custom record data.
ResourceInfo(const T &sample)
NString Category
The resource category within Pool.
ResourcePool * Pool
The resource pool.
void Set(const T &sample)
ResourceInfo() noexcept=default
Defaulted constructor leaving the fields uninitialized.
NString Name
The resource category within Pool.
const String & Get(const String &name, bool dbgAssert)
void Set(resources::ResourcePool *pool, NString category, NString name)
const String & Get(const NString &name, bool dbgAssert)
static constexpr NString Category()
static constexpr NString Name()
static constexpr ResourcePool * Pool()
static const String & Get()
static const String & Get(const String &resourceName, bool dbgAssert)
static const String & TypeNamePostfix()
static const String & Get(const NString &name, bool dbgAssert)
static const String & TypeNamePrefix()