ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
ResourcedType< T > Struct Template Reference

Description:

template<typename T>
struct alib::lang::resources::ResourcedType< T >

Static helper struct used to access resources of types that dispose about a specialization of type-traits struct T_Resourced .

See also
Template Parameters
TA type equipped with resource information by a specialization of T_Resourced .

Definition at line 324 of file resources.hpp.

#include <resources.hpp>

Public Static Method Index:

template<typename TEnableIf = T>
static const StringGet ()
 
template<typename TEnableIf = T>
static const StringGet (const NString &name, bool dbgAssert)
 
static const StringTypeNamePostfix ()
 
static const StringTypeNamePrefix ()
 

Method Details:

◆ Get() [1/2]

template<typename T >
template<typename TEnableIf = T>
static const String & Get ( )
inlinestatic

Static methodthat receives a resource string for a type which has a specialization of T_Resourced defined.

Template Parameters
TEnableIfNot to be specified. Used by the compiler to select the availability of this method.
Returns
The externalized resource string.

◆ Get() [2/2]

template<typename T >
template<typename TEnableIf = T>
static const String & Get ( const NString & name,
bool dbgAssert )
inlinestatic

Variant of parameterless version Get that ignores the resource name given for a type with T_Resourced , but instead uses the given name.

Template Parameters
TEnableIfNot to be specified. Used by the compiler to select the availability of this method.
Parameters
nameThe resource name to use, given as string of narrow character width.
dbgAssertThis parameter is available only in debug mode. If true, an assertion is raised if the resource was not found.
Returns
The externalized resource string.

◆ TypeNamePostfix()

template<typename T >
static const String & TypeNamePostfix ( )
inlinestatic

Same as TypeNamePrefix but for the postfix string of a types name. Consequently, extends the resource string's name searched by character character '>'.

Returns
The postfix string.

Definition at line 450 of file resources.hpp.

Here is the call graph for this function:

◆ TypeNamePrefix()

template<typename T >
static const String & TypeNamePrefix ( )
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 type-traits struct T_Resourced for a type.

The prefix is tried to be retrieved by extending the resource name returned by method T_Resourced::Name by character '<'.

ALib uses this method internally, for example with specializations T_Append<TEnum,TChar> T_Append<TEnumBitwise,TChar> used to write element names of enum types.

If either T_Resourced is not specialized for TEnum , or a resource named "name >" is not found, an empty string is returned.

Returns
The prefix string.

Definition at line 428 of file resources.hpp.

Here is the call graph for this function:

The documentation for this struct was generated from the following file: