Static helper-struct used to access resources of types that dispose of a specialization of the type trait ResourcedTraits.
T | A type equipped with resource information by a specialization of ResourcedTraits. |
Definition at line 276 of file resources.inl.
Public Static Method Index: | |
template<typename TRequires = T> requires alib::resources::HasResources<TRequires> | |
static const String & | Get () |
template<typename TRequires = T> requires alib::resources::HasResources<TRequires> | |
static const String & | Get (const NString &name, bool dbgAssert) |
template<typename TRequires = T> requires alib::resources::HasResources<TRequires> | |
static const String & | Get (const String &resourceName, bool dbgAssert) |
static const String & | TypeNamePostfix () |
static const String & | TypeNamePrefix () |
|
inlinestatic |
Static method that receives a resource string for a type which has a specialization of ResourcedTraits defined.
TRequires | Not to be specified. Used by the compiler to select the availability of this method. |
Definition at line 286 of file resources.inl.
|
static |
Variant of the parameterless version Get that ignores the resource name given for a type with a specialization of ResourcedTraits, but instead uses the name provided.
TRequires | Not to be specified. Used by the compiler to select the availability of this method. |
name | The resource name to use, given as string of narrow character width. |
dbgAssert | This parameter is available (and to be passed) only in debug mode. If true , an error is raised if the resource was not found. Use macro ALIB_DBG with calls to this method. |
|
static |
Variant of method alib::resources::ResourcedType::Get(const NString& " bool)" that accepts a character string of standard character width instead of a narrow type.
true
.TRequires | Not to be specified. Used by the compiler to select the availability of this method. |
resourceName | The resource name to use, given as a string of standard character width. |
dbgAssert | This parameter is available (and to be passed) only in debug mode. If true , an error is raised if the resource was not found. |
|
inlinestatic |
Same as TypeNamePrefix but for the postfix string of a types name. Consequently, extends the resource string's name searched by character '>'
.
Definition at line 384 of file resources.inl.
|
inlinestatic |
Together with sibling method TypeNamePostfix, this method may be used to receive the first portion of a type's human-readable name.
The method tries to standardize resourcing names of C++ types along with the resource string that is defined with the type trait ResourcedTraits for a type.
The prefix is tried to be retrieved by extending the resource name returned by the method ResourcedTraits::Name by character '<'
.
ALib uses this method internally, for example with specializations AppendableTraits<TEnum,TChar,TAllocator> AppendableTraits<TBitwiseEnum,TChar,TAllocator> used to write element names of enum types.
If either ResourcedTraits is not specialized for TEnum, or a resource named "name>" is not found, an empty string is returned.
Definition at line 365 of file resources.inl.