OSM::StringKeyRegistry
OSM::StringKeyRegistry< T > Class Template Reference
#include <stringpool.h>
Inheritance diagram for OSM::StringKeyRegistry< T >:
Public Member Functions | |
StringKeyRegistry (const StringKeyRegistry &)=delete | |
StringKeyRegistry (StringKeyRegistry &&)=default | |
T | key (const char *name) const |
T | makeKey (const char *name, std::size_t len, StringMemory memOpt) |
T | makeKey (const char *name, StringMemory memOpt) |
StringKeyRegistry & | operator= (const StringKeyRegistry &)=delete |
StringKeyRegistry & | operator= (StringKeyRegistry &&)=default |
Additional Inherited Members | |
Protected Member Functions inherited from OSM::StringKeyRegistryBase | |
StringKeyRegistryBase (StringKeyRegistryBase &&) noexcept | |
const char * | keyInternal (const char *name) const |
const char * | makeKeyInternal (const char *name, std::size_t len, StringMemory memOpt) |
StringKeyRegistryBase & | operator= (StringKeyRegistryBase &&) noexcept |
Protected Attributes inherited from OSM::StringKeyRegistryBase | |
std::vector< char * > | m_pool |
std::vector< const char * > | m_registry |
Detailed Description
template<typename T>
class OSM::StringKeyRegistry< T >
class OSM::StringKeyRegistry< T >
Registry of unique string keys.
- Template Parameters
-
T Sub-classes of StringKey, to have a compile-time check against comparing keys from different pools.
Definition at line 39 of file stringpool.h.
Member Function Documentation
◆ key()
template<typename T >
|
inline |
Looks up an existing key, if that doesn't exist an null key is returned.
Definition at line 62 of file stringpool.h.
◆ makeKey() [1/2]
template<typename T >
|
inline |
Definition at line 54 of file stringpool.h.
◆ makeKey() [2/2]
template<typename T >
|
inline |
Add a new string to the registry if needed, or returns an existing one if already present.
Definition at line 50 of file stringpool.h.
The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.