Utility type that may be used to store resourcing information.
Besides constructor ResourceInfo(ResourcePool*, NString, NString) and corresponding Set method, templated alternatives exist, which are applicable if ResourcedTraits is specialized for the template type.
Definition at line 489 of file resources.inl.
Public Field Index: | |
| NString | Category |
| The resource category within Pool. | |
| NString | Name |
| The resource category within Pool. | |
| ResourcePool * | Pool |
| The resource pool. | |
Public Method Index: | |
| ResourceInfo () noexcept=default | |
| Defaulted constructor leaving the fields uninitialized. | |
| template<typename T> | |
| ResourceInfo (const T &sample) | |
| template<typename T> | |
| ResourceInfo (resources::ResourcePool *pool, NString category, NString name) | |
| const String & | Get () |
| const String & | Get (const NString &name, bool dbgAssert) |
| const String & | Get (const String &name, bool dbgAssert) |
| template<typename T> | |
| void | Set (const T &sample) |
| void | Set (resources::ResourcePool *pool, NString category, NString name) |
| NString alib::resources::ResourceInfo::Category |
The resource category within Pool.
Definition at line 495 of file resources.inl.
| NString alib::resources::ResourceInfo::Name |
The resource category within Pool.
Definition at line 498 of file resources.inl.
| ResourcePool* alib::resources::ResourceInfo::Pool |
The resource pool.
Definition at line 492 of file resources.inl.
|
inline |
Constructor setting the fields of this object as given.
| pool | The resource pool. |
| category | The resource category. |
| name | The resource name. |
Definition at line 509 of file resources.inl.
|
inline |
Templated constructor which sets the fields of this object according to the values provided with a specialization of ResourcedTraits for type T.
| T | Type that disposes of a specialization of ResourcedTraits. Deduced by the compiler |
| sample | A sample instance of type T. Exclusively used to have the compiler deduce type T (otherwise ignored). |
Definition at line 522 of file resources.inl.
|
inline |
Receives the resource string according to this info object.
Definition at line 553 of file resources.inl.
Variant of parameterless version Get() that ignores field Name and instead uses given argument name .
| 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. |
Variant of mehtod Get(const NString&, bool) that accepts a character string of standard character width instead of a narrow type.
true.| name | The resource name to use, given as 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. |
|
inline |
Sets the fields of this object according to the values provided with a specialization of ResourcedTraits for type T.
| T | Type that disposes of a specialization of ResourcedTraits. Deduced by the compiler |
| sample | A sample instance of type T. Exclusively used to have the compiler deduce type T (otherwise ignored). |
Definition at line 544 of file resources.inl.
|
inline |
Sets the fields of this object as given.
| pool | The resource pool. |
| category | The resource category. |
| name | The resource name. |
Definition at line 529 of file resources.inl.