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

Additional Inherited Members

- Protected Member Functions inherited from OSM::StringKeyRegistryBase
 StringKeyRegistryBase (StringKeyRegistryBase &&)
 
const char * keyInternal (const char *name) const
 
const char * makeKeyInternal (const char *name, std::size_t len, StringMemory memOpt)
 
StringKeyRegistryBaseoperator= (StringKeyRegistryBase &&)
 
- 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

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.

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-2021 The KDE developers.
Generated on Thu Jul 29 2021 23:03:59 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.