OSM::StringKeyRegistry

Search for usage in LXR

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
 
key (const char *name) const
 
makeKey (const char *name, std::size_t len, StringMemory memOpt)
 
makeKey (const char *name, StringMemory memOpt)
 
StringKeyRegistryoperator= (const StringKeyRegistry &)=delete
 
StringKeyRegistryoperator= (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)
 
StringKeyRegistryBaseoperator= (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 >

Registry of unique string keys.

Template Parameters
TSub-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 >
T OSM::StringKeyRegistry< T >::key ( const char * name) const
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 >
T OSM::StringKeyRegistry< T >::makeKey ( const char * name,
std::size_t len,
StringMemory memOpt )
inline

Definition at line 54 of file stringpool.h.

◆ makeKey() [2/2]

template<typename T >
T OSM::StringKeyRegistry< T >::makeKey ( const char * name,
StringMemory memOpt )
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

KDE's Doxygen guidelines are available online.