ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
resources.hpp
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header file is part of sub-namespace #alib::lang::resources of module \alib_basecamp of
4/// the \aliblong.
5///
6/// \emoji :copyright: 2013-2024 A-Worx GmbH, Germany.
7/// Published under \ref mainpage_license "Boost Software License".
8//==================================================================================================
9#ifndef HPP_ALIB_LANG_RESOURCES_RESOURCES
10#define HPP_ALIB_LANG_RESOURCES_RESOURCES 1
11#pragma once
14
15#if !defined(ALIB_RESOURCES_OMIT_DEFAULTS)
16# define ALIB_RESOURCES_OMIT_DEFAULTS 0
17#endif
18
19#if ALIB_DEBUG_RESOURCES
20# include <vector>
21#endif
22
23
24
25namespace alib { namespace lang::resources {
26
27//==================================================================================================
28/// This purely abstract class provides an interface to store and retrieve "resourced" string data
29/// which are organized in a two-level key hierarchy named <em>"resource category"</em>
30/// and <em>"resource name"</em>. The latter are of narrow string-type.
31///
32/// \see
33/// For detailed documentation on when and how this interface is used, please consult chapter
34/// \ref alib_basecamp_resources "3. Namespace alib::lang::resources" of the Programmer's Manual of
35/// module \alib_basecamp.
36///
37/// \see
38/// Two built-in implementations of this pure abstract interface are provided with
39/// \alib{lang::resources;LocalResourcePool} and \alib{config;ConfigResourcePool}.
40/// Please consult their reference documentation for further details.
41///
42//==================================================================================================
44{
45 public:
46
47 /// Virtual destructor.
48 virtual ~ResourcePool() = default;
49
50
51 //==============================================================================================
52 /// Used to store a resource string.
53 ///
54 /// In the context of \alibmods, which usually are the only areas where instances of this
55 /// type are available (used), this method must only invoked during the process of
56 /// \ref alib_manual_bootstrapping "bootstrapping" \alib (and corresponding custom modules).
57 ///
58 /// \attention
59 /// The life-cycle of the given string's buffers, have to survive this resource instance.
60 /// Usually the strings passed here are constant C++ string literals, residing an the data
61 /// segment of an executable
62 ///
63 /// \note
64 /// Usually, method #Bootstrap should be preferred, which asserts in debug-compilations,
65 /// if a resource already existed. The use of this method is for special cases, for example
66 /// to replace (patch) resources of dependent modules.
67 ///
68 /// @param category Category string of the resource to add.
69 /// @param name Name string of the resource.
70 /// @param data The resource data.
71 /// @return \c true if the resource did exist and was replaced, \c false if it was an insertion.
72 //==============================================================================================
73 virtual
74 bool BootstrapAddOrReplace(const NString& category, const NString& name, const String& data)= 0;
75
76 //==============================================================================================
77 /// Simple inline method that invokes virtual method #BootstrapAddOrReplace.
78 /// In debug-compilations, it is asserted that a resource with the given key did not exist
79 /// already.
80 ///
81 /// The use of this method is preferred over a direct invocation of #BootstrapAddOrReplace.
82 ///
83 /// @param category Category string of the resource to add.
84 /// @param name Name string of the resource.
85 /// @param data The resource data.
86 //==============================================================================================
87 inline
88 void Bootstrap( const NString& category, const NString& name, const String& data )
89 {
90 #if ALIB_DEBUG
91 bool result=
92 #endif
93 BootstrapAddOrReplace(category, name, data);
94
95 ALIB_ASSERT_ERROR( result, "RESOURCES",
96 NString256( "Doubly defined resource \"" ) << name
97 << "\" in category: " << category )
98 }
99
100 //==============================================================================================
101 /// Same as #Bootstrap but accepts an array of name/value pairs to be filled into
102 /// the given parameter \p{category}.
103 ///
104 /// \attention
105 /// <b>The given list has to be finished with a final \c nullptr argument for the next
106 /// name!</b>
107 ///
108 /// In the context of \alibmods, which usually are the only areas where instances of this
109 /// type are available (used), this method must only invoked during the process of
110 /// \ref alib_manual_bootstrapping "bootstrapping" \alib (and corresponding custom modules).
111 ///
112 /// \attention
113 /// The life-cycle of the given string's buffers, have to survive this resource instance.
114 /// Usually the strings passed here are constant C++ string literals, residing an the data
115 /// segment of an executable
116 ///
117 /// \note
118 /// The use of variadic C-style arguments <c>"..."</c> in general is \b not recommended
119 /// to be used.
120 /// We still do it here, because this method is usually used with implementations
121 /// of \alib{lang;Camp::bootstrap} to load static default values.
122 /// This approach saves a lot of otherwise needed single invocations (reduces code size) and
123 /// allows a clean code for the init methods.<br>
124 /// For technical reasons, parameter \p{category } is declared as type <c>const nchar*</c>.
125 ///
126 ///
127 /// @param category The category of the resources given.
128 /// @param ... A list of pairs of <b>const nchar*</b> and <b>const character*</b>
129 /// keys and data, including a terminating \c nullptr value.
130 //==============================================================================================
131 virtual
132 void BootstrapBulk( const nchar* category, ... ) = 0;
133
134#if DOXYGEN
135 //==============================================================================================
136 /// Returns a resource.
137 /// On failure (resource not found), a \e nulled string is returned.
138 ///
139 /// \note
140 /// Usually resource pools are associated with \alib{lang;Camp} objects and resources should be
141 /// loaded using its "shortcut methods" \alib{lang::Camp;TryResource}
142 /// and \alib{lang::Camp;GetResource}.
143 /// If used directly, argument \p{dbgAssert} has to be enclosed in macro \ref ALIB_DBG
144 /// (including the separting comma).
145 ///
146 /// @param category Category string of the resource.
147 /// @param name Name string of the resource
148 /// @param dbgAssert This parameter is available (and to be passed) only in debug mode.
149 /// If \c true, an assertion is raised if the resource was not found.
150 /// @return The resource string, respectively a \e nulled string on failure.
151 //==============================================================================================
152 virtual
153 const String& Get( const NString& category, const NString& name, bool dbgAssert ) = 0;
154#else
155 virtual
156 const String& Get( const NString& category, const NString& name ALIB_DBG(,bool dbgAssert))= 0;
157#endif
158
159#if DOXYGEN
160 //==============================================================================================
161 /// Convenience inlined method that accepts parameter name as \alib{characters;character}
162 /// instead of \alib{characters;nchar} based string-type. The rationale for this is that often,
163 /// resource name keys are read from other resourced strings and need conversion if used.
164 /// This avoids external conversion before invoking this method.
165 ///
166 /// This method is available only when \alib is compiled with type \alib{characters;character}
167 /// not being equivalent to \alib{characters;nchar}.
168 ///
169 /// After string conversion simply returns result of virtual method
170 /// #Get(const NString&, const NString&, bool).
171 ///
172 /// @param category Category string of the resource.
173 /// @param name Name string of the resource
174 /// @param dbgAssert This parameter is available (and to be passed) only in debug mode.
175 /// If \c true, an assertion is raised if the resource was not found.
176 /// @return The resource string, respectively a \e nulled string on failure.
177 //==============================================================================================
178 const String& Get( const NString& category, const String& name, bool dbgAssert );
179#else
180 #if ALIB_CHARACTERS_WIDE
181 const String& Get( const NString& category, const String& name ALIB_DBG(,bool dbgAssert) )
182 {
183 NString128 nName( name );
184 return Get( category, nName ALIB_DBG(, dbgAssert ) );
185 }
186 #endif
187#endif
188
189 #if ALIB_DEBUG_RESOURCES
190 //==========================================================================================
191 /// Returns a vector of tuples for each resourced element. Each tuple contains:
192 /// 0. The category name
193 /// 1. The resource name
194 /// 2. The resource value
195 /// 3. The number of requests for the resource performed by a using data.
196 ///
197 /// While being useful to generaly inspect the resources, a high number of requests
198 /// might indicate a performance penality for a using software. Such can usually be
199 /// mitigated in a very simple fashion by "caching" a resource string in a local
200 /// or global/static string variable.
201 ///
202 /// \par Availability
203 /// Available only if compiler symbol \ref ALIB_DEBUG_RESOURCES is set.
204 ///
205 /// \attention
206 /// This method is implemented only with the default pool instance of type
207 /// \alib{lang::resources;LocalResourcePool} is used. Otherwise, an \alib warning is raised
208 /// and an empty vector is returned.
209 ///
210 /// \see
211 /// Methods #DbgGetCategories and #DbgDump.
212 ///
213 /// @return The externalized resource string.
214 //==========================================================================================
216 virtual
217 std::vector<std::tuple<NString, NString, String, integer>>
218 DbgGetList();
219
220 //==========================================================================================
221 /// Implements abstract method \alib{lang::resources;ResourcePool::DbgGetCategories}.
222 ///
223 /// \par Availability
224 /// Available only if compiler symbol \ref ALIB_DEBUG_RESOURCES is set.
225 ///
226 /// \attention
227 /// This method is implemented only with the default pool instance of type
228 /// \alib{lang::resources;LocalResourcePool} is used. Otherwise, an \alib warning is raised and
229 /// an empty vector is returned.
230 ///
231 /// \see
232 /// Methods #DbgGetList and #DbgDump.
233 ///
234 /// @return The externalized resource string.
235 //==========================================================================================
237 virtual
238 std::vector<std::pair<NString, integer>>
240
241 #if ALIB_CAMP
242 //======================================================================================
243 /// Writes the list of resources obtainable with #DbgGetList to an \b %AString.
244 ///
245 /// \par Availability
246 /// Available only if compiler symbol \ref ALIB_DEBUG_RESOURCES is set and furthermore
247 /// if module \alib_basecamp is included in the \alibdist.
248 ///
249 /// \see
250 /// Methods #DbgGetList and #DbgGetCategories.
251 ///
252 /// @param list The list of resources, obtained with #DbgGetList.
253 /// @param catFilter Comma-separated list of names of categories to print.
254 /// Defaults to nulled string, which includes all caegories.
255 /// @param format The format of a line.
256 /// Defaults to <b>"({3:}) {1}={2!TAB20!ESC<!Q}\\n"</b>.
257 /// @return The dump of all resources.
258 //======================================================================================
260 static
261 AString DbgDump( std::vector<std::tuple<NString, NString, String, integer>>& list,
262 const NString& catFilter = nullptr,
263 const String& format = A_CHAR("({3:}) {1}={2!TAB20!ESC<!Q}\n") );
264 #endif //ALIB_CAMP
265 #endif
266}; // class ResourcePool
267
268//==================================================================================================
269/// Simple TMP struct that associates resource information to given type \p{T} .
270///
271/// Extends <c>std::false_type</c> by default to indicate that it is not specialized for a specific
272/// type. Specializations need to extend <c>std::true_type</c> instead.
273///
274/// \see
275/// - Helper macros \ref ALIB_RESOURCED and ALIB_RESOURCED_IN_MODULE that specialize this struct.
276/// - Helper-type \alib{lang::resources;ResourcedType}.
277/// - Manual chapter \ref alib_basecamp_resources_t_resourced "3.5. Indirect Resource Access" of the
278/// Programmer's Manual of this module.
279///
280/// @tparam T The type to define resource information for.
281//==================================================================================================
282template<typename T>
283struct T_Resourced : public std::false_type
284{
285 /// Returns a pointer to the resource pool associated with \p{T}.
286 /// @return The resource pool of \p{T}.
287 static constexpr ResourcePool* Pool() { return nullptr; }
288
289 /// Returns a resource category associated with \p{T}.
290 /// @return The resource category.
291 static constexpr NString Category() { return NULL_NSTRING; }
292
293 /// Returns a resource name associated with \p{T}.
294 /// @return The resource category.
295 static constexpr NString Name() { return NULL_NSTRING; }
296};
297
298//==================================================================================================
299/// Static helper-struct used to access resources of types that dispose about a specialization of
300/// type-traits struct \alib{lang::resources;T_Resourced}.
301///
302/// @see
303/// - Type-traits struct \alib{lang::resources;T_Resourced}
304/// - Manual chapter \ref alib_basecamp_resources_t_resourced_resourced of the Programmer's Manual of this
305/// module.
306///
307/// @tparam T A type equipped with resource information by a specialization of
308/// \alib{lang::resources;T_Resourced}.
309//==================================================================================================
310template<typename T>
312{
313 #if DOXYGEN
314 /// Static methodthat receives a resource string for a type which has a specialization
315 /// of \alib{lang::resources;T_Resourced} defined.
316 ///
317 /// @tparam TEnableIf Not to be specified. Used by the compiler to select the availability
318 /// of this method.
319 /// @return The externalized resource string.
320 template<typename TEnableIf= T>
321 static inline
322 const String& Get();
323 #else
324 template<typename TEnableIf= T>
325 static
327 Get()
328 {
330 T_Resourced<T>::Name () ALIB_DBG(, true) );
331 }
332 #endif
333
334
335 #if DOXYGEN
336 /// Variant of parameterless version \alib{lang::resources::ResourcedType;Get();Get} that ignores the
337 /// resource name given for a type with \alib{lang::resources;T_Resourced}, but instead uses the given
338 /// name.
339 ///
340 /// @tparam TEnableIf Not to be specified. Used by the compiler to select the availability
341 /// of this method.
342 /// @param name The resource name to use, given as string of narrow character width.
343 /// @param dbgAssert This parameter is available (and to be passed) only in debug mode.
344 /// If \c true, an assertion is raised if the resource was not found.
345 /// @return The externalized resource string.
346 template<typename TEnableIf= T>
347 static inline
348 const String& Get( const NString& name, bool dbgAssert );
349 #else
350 template<typename TEnableIf= T>
351 static
353 Get( const NString& name ALIB_DBG(, bool dbgAssert) )
354 {
355 return T_Resourced<T>::Pool()->Get( T_Resourced<T>::Category(), name ALIB_DBG(, dbgAssert) );
356 }
357 #endif
358
359
360 #if ALIB_CHARACTERS_WIDE && DOXYGEN
361 /// Variant of method \alib{lang::resources::ResourcedType;Get(const NString&; bool)} that
362 /// accepts a character string of standard character width instead of a narrow type.
363 ///
364 /// \par Availability
365 /// Available only if \ref ALIB_CHARACTERS_WIDE evaluates to \c true.
366 ///
367 /// @tparam TEnableIf Not to be specified. Used by the compiler to select the availability
368 /// of this method.
369 /// @param name The resource name to use, given as string of standard character width.
370 /// @param dbgAssert This parameter is available (and to be passed) only in debug mode.
371 /// If \c true, an assertion is raised if the resource was not found.
372 /// @return The externalized resource string.
373 template<typename TEnableIf= T>
374 static inline
375 const String& Get( const String& name, bool dbgAssert );
376 #endif
377 #if ALIB_CHARACTERS_WIDE && !DOXYGEN
378 template<typename TEnableIf= T>
379 static
381 Get( const String& resourceName ALIB_DBG(, bool dbgAssert) )
382 {
384 resourceName ALIB_DBG(, dbgAssert) );
385 }
386 #endif
387
388 /// Together with sibling method #TypeNamePostfix, this method may be used to receive the
389 /// first portion of a type's human-readable name.
390 ///
391 /// The method tries to standardize resourcing names of C++ types along with the resource string
392 /// that is defined with type-traits struct \alib{lang::resources;T_Resourced} for a type.
393 ///
394 /// The prefix is tried to be retrieved by extending the resource name returned by method
395 /// \alib{lang::resources;T_Resourced::Name} by character <c>'<'</c>.
396 ///
397 /// \alib uses this method internally, for example with specializations
398 /// \alib{strings::APPENDABLES;T_Append<TEnum,TChar,TAllocator>;T_Append<TEnum,TChar,TAllocator>}
399 /// \alib{strings::APPENDABLES;T_Append<TEnumBitwise,TChar,TAllocator>;T_Append<TEnumBitwise,TChar,TAllocator>}
400 /// used to write element names of enum types.
401 ///
402 /// If either \alib{lang::resources;T_Resourced} is \e not specialized for \p{TEnum}, or a resource
403 /// named \"\p{name}<b>></b>\" is not found, an empty string is returned.<br>
404 ///
405 /// @return The prefix string.
406 static
408 {
409 if constexpr( T_Resourced<T>::value )
410 {
411 NString256 resourceName( T_Resourced<T>::Name() );
412 resourceName << "<";
413 auto& pf= T_Resourced<T>::Pool()->Get( T_Resourced<T>::Category(), resourceName
414 ALIB_DBG(, false) );
415 if( pf.IsNotNull() )
416 return pf;
417 }
418
419 return EMPTY_STRING;
420 }
421
422 /// Same as #TypeNamePrefix but for the postfix string of a types name. Consequently, extends the
423 /// resource string's name searched by character character <c>'>'</c>.
424 ///
425 /// @return The postfix string.
426 static
428 {
430 if constexpr( T_Resourced<T>::value )
431 {
432 NString256 resourceName( T_Resourced<T>::Name() );
433 resourceName << ">";
434 auto& pf= T_Resourced<T>::Pool()->Get( T_Resourced<T>::Category(), resourceName
435 ALIB_DBG(, false) );
436 if( pf.IsNotNull() )
437 return pf;
438 }
440
441 return EMPTY_STRING;
442 }
443
444}; // struct ResourcedType
445
446/// Utility type that may be used to store resourcing information.
447///
448/// Besides constructor #ResourceInfo(ResourcePool*, NString, NString) and corresponding #Set method,
449/// templated alternatives exist, which are applicable if \alib{lang::resources;T_Resourced}
450/// is specialized for the template type.
452{
453 /// The resource pool.
455
456 /// The resource category within #Pool.
458
459 /// The resource category within #Pool.
461
462 /// Defaulted constructor leaving the fields uninitialized.
463 ResourceInfo() noexcept = default;
464
465 /// Constructor setting the fields of this object as given.
466 ///
467 /// @param pool The resource pool.
468 /// @param category The resource category.
469 /// @param name The resource name.
470 template<typename T>
471 ResourceInfo( resources::ResourcePool* pool, NString category, NString name )
472 : Pool (pool )
473 , Category(category)
474 , Name (name )
475 {}
476
477 /// Templated constructor which sets the fields of this object according to the values provided
478 /// with a specialization of \alib{lang::resources;T_Resourced} for type \p{T}.
479 ///
480 /// @tparam T Type that disposes about a specialization of \b T_Resourced. Deduced by the
481 /// compiler
482 /// @param sample A sample instance of type \p{T}. Exclusively used to have the compiler
483 /// deduce type \p{T} (otherwise ignored).
484 template<typename T>
485 ResourceInfo(const T& sample)
486 {
487 Set( sample );
488 }
489
490 /// Sets the fields of this object as given.
491 ///
492 /// @param pool The resource pool.
493 /// @param category The resource category.
494 /// @param name The resource name.
495 void Set( resources::ResourcePool* pool, NString category, NString name )
496 {
497 Pool = pool;
498 Category = category;
499 Name = name;
500 }
501
502 #if DOXYGEN
503 /// Sets the fields of this object according to the values provided with a specialization of
504 /// \alib{lang::resources;T_Resourced} for type \p{T}.
505 ///
506 /// @tparam T Type that disposes about a specialization of \b T_Resourced. Deduced by the
507 /// compiler
508 /// @param sample A sample instance of type \p{T}. Exclusively used to have the compiler
509 /// deduce type \p{T} (otherwise ignored).
510 template<typename T>
511 void Set(const T& sample);
512 #else
513 template<typename T>
515 Set(const T& )
516 {
520 }
521 #endif
522
523 /// Receives the resource string according to this info object.
524 ///
525 /// @return The externalized resource string.
526 inline
527 const String& Get()
528 {
529 return Pool->Get( Category, Name ALIB_DBG(, true) );
530 }
531
532
533 #if DOXYGEN
534 /// Variant of parameterless version #Get() that ignores field #Name and instead uses given
535 /// argument \p{name} .
536 ///
537 /// @param name The resource name to use, given as string of narrow character width.
538 /// @param dbgAssert This parameter is available (and to be passed) only in debug mode.
539 /// If \c true, an assertion is raised if the resource was not found.
540 /// @return The externalized resource string.
541 inline
542 const String& Get( const NString& name, bool dbgAssert );
543 #else
544 const String& Get( const NString& name ALIB_DBG(, bool dbgAssert) )
545 {
546 return Pool->Get( Category, name ALIB_DBG(, dbgAssert) );
547 }
548 #endif
549
550
551 #if ALIB_CHARACTERS_WIDE && DOXYGEN
552 /// Variant of mehtod Get(const NString&, bool) that accepts a character string of standard
553 /// character width instead of a narrow type.
554 ///
555 /// \par Availability
556 /// Available only if \ref ALIB_CHARACTERS_WIDE evaluates to \c true.
557 ///
558 /// @param name The resource name to use, given as string of standard character width.
559 /// @param dbgAssert This parameter is available (and to be passed) only in debug mode.
560 /// If \c true, an assertion is raised if the resource was not found.
561 /// @return The externalized resource string.
562 inline
563 const String& Get( const String& name, bool dbgAssert );
564 #endif
565 #if ALIB_CHARACTERS_WIDE && !DOXYGEN
566 const String& Get( const String& name ALIB_DBG(, bool dbgAssert) )
567 {
568 return Pool->Get( Category, name ALIB_DBG(, dbgAssert) );
569 }
570 #endif
571}; // ResourceInfo
572
573
574} // namespace alib[::lang::resources]
575
576/// Type alias in namespace \b alib.
578
579/// Type alias in namespace \b alib.
580template<typename T>
582
583/// Type alias in namespace \b alib.
584template<typename T>
586
587/// Type alias in namespace \b alib.
589
590} // namespace [alib]
591
592// #################################################################################################
593// T_Resourced Macro
594// #################################################################################################
595#define ALIB_RESOURCED( T, ResPool, ResCategory, ResName ) \
596namespace alib::lang::resources { \
597template<> struct T_Resourced<T> : public std::true_type \
598{ \
599 static ResourcePool* Pool() { return ResPool; } \
600 static constexpr NString Category() { return ResCategory; } \
601 static constexpr NString Name() { return ResName; } \
602};}
603
604#if ALIB_CAMP
605# define ALIB_RESOURCED_IN_MODULE( T, Camp, ResName ) \
606 ALIB_RESOURCED( T, &Camp.GetResourcePool(), Camp.ResourceCategory, ResName )
607#endif
608
609
610#endif // HPP_ALIB_LANG_RESOURCES_RESOURCES
611
const String & Get(const NString &category, const String &name, bool dbgAssert)
void Bootstrap(const NString &category, const NString &name, const String &data)
Definition resources.hpp:88
virtual ALIB_API std::vector< std::tuple< NString, NString, String, integer > > DbgGetList()
virtual ~ResourcePool()=default
Virtual destructor.
virtual void BootstrapBulk(const nchar *category,...)=0
static ALIB_API AString DbgDump(std::vector< std::tuple< NString, NString, String, integer > > &list, const NString &catFilter=nullptr, const String &format=A_CHAR("({3:}) {1}={2!TAB20!ESC<!Q}\n"))
virtual const String & Get(const NString &category, const NString &name, bool dbgAssert)=0
virtual ALIB_API std::vector< std::pair< NString, integer > > DbgGetCategories()
virtual bool BootstrapAddOrReplace(const NString &category, const NString &name, const String &data)=0
#define A_CHAR(STR)
#define ATMP_VOID_IF(Cond)
Definition tmp.hpp:47
#define ALIB_WARNINGS_RESTORE
Definition alib.hpp:849
#define ALIB_API
Definition alib.hpp:639
#define ALIB_WARNINGS_ALLOW_NULL_POINTER_PASSING
Definition alib.hpp:757
#define ALIB_ASSERT_ERROR(cond,...)
Definition alib.hpp:1271
#define ALIB_DBG(...)
Definition alib.hpp:390
#define ATMP_T_IF(T, Cond)
Definition tmp.hpp:49
@ Get
Denotes to search data.
Definition alib.cpp:69
constexpr NString NULL_NSTRING
A nulled string of the narrow character type.
Definition string.hpp:2558
constexpr const String EMPTY_STRING
An empty string of the default character type.
Definition string.hpp:2529
NLocalString< 256 > NString256
Type alias name for TLocalString<nchar,256>.
characters::nchar nchar
Type alias in namespace alib.
const String & Get(const NString &name, bool dbgAssert)
resources::ResourcePool * Pool
The resource pool.
ResourceInfo() noexcept=default
Defaulted constructor leaving the fields uninitialized.
void Set(resources::ResourcePool *pool, NString category, NString name)
NString Category
The resource category within Pool.
NString Name
The resource category within Pool.
static const String & Get(const NString &name, bool dbgAssert)
static const String & TypeNamePrefix()
static const String & TypeNamePostfix()
static constexpr ResourcePool * Pool()
static constexpr NString Category()
static constexpr NString Name()