![]() |
ATLAS Offline Software
|
#include <StringPool.h>
Public Types | |
| typedef uint32_t | sgkey_t |
| Type of the integer keys. More... | |
| typedef unsigned int | sgaux_t |
| Type of auxiliary data. More... | |
Public Member Functions | |
| StringPool () | |
| Constructor. More... | |
| ~StringPool () | |
| Destructor. More... | |
| StringPool (const StringPool &other) | |
| Copy/move constructors. More... | |
| StringPool (StringPool &&other) | |
| Move constructor. More... | |
| StringPool & | operator= (const StringPool &other) |
| Assignment/move operators. More... | |
| StringPool & | operator= (StringPool &&other) |
| Move operator. More... | |
| sgkey_t | stringToKey (const std::string &str, sgaux_t aux=0) |
| Find the key for a string. More... | |
| const std::string * | keyToString (sgkey_t key) const |
| Find the string corresponding to a given key. More... | |
| const std::string * | keyToString (sgkey_t key, sgaux_t &aux) const |
| Find the string corresponding to a given key. More... | |
| bool | registerKey (sgkey_t key, const std::string &str, sgaux_t aux=0) |
| Remember an additional mapping from key to string. More... | |
| size_t | size () const |
| Number of registered mappings. More... | |
| void | dump () const |
| Debugging dump. More... | |
| void | clear () |
| Empty the pool. More... | |
| bool | merge (const StringPool &other) |
| Merge another pool into this one. More... | |
Static Public Attributes | |
| static const int | sgkey_t_nbits = 30 |
| Number of bits we'll use in the keys. More... | |
| static const sgkey_t | sgkey_t_max |
Private Attributes | |
| std::unique_ptr< StringPoolImpl > | m_impl |
Definition at line 34 of file StringPool.h.
| typedef unsigned int SG::StringPool::sgaux_t |
Type of auxiliary data.
Definition at line 41 of file StringPool.h.
| typedef uint32_t SG::StringPool::sgkey_t |
Type of the integer keys.
Definition at line 38 of file StringPool.h.
| SG::StringPool::StringPool | ( | ) |
Constructor.
Definition at line 176 of file StringPool.cxx.
| SG::StringPool::~StringPool | ( | ) |
| SG::StringPool::StringPool | ( | const StringPool & | other | ) |
Copy/move constructors.
Copy constructor.
other Object from which to copy.
Definition at line 186 of file StringPool.cxx.
| SG::StringPool::StringPool | ( | StringPool && | other | ) |
| void SG::StringPool::clear | ( | ) |
| void SG::StringPool::dump | ( | ) | const |
Find the string corresponding to a given key.
| key | The key to look up. |
stringToKey() or registerKey(). Definition at line 288 of file StringPool.cxx.
Find the string corresponding to a given key.
| key | The key to look up. |
| aux[out] | Auxiliary data associated with the key. |
stringToKey() or registerKey(). Definition at line 303 of file StringPool.cxx.
| bool SG::StringPool::merge | ( | const StringPool & | other | ) |
Merge another pool into this one.
| other | The other pool to merge into this one. |
In case of collisions, the colliding entries are skipped, and false is returned. If no collisions, then true is returned.
Definition at line 365 of file StringPool.cxx.
| StringPool & SG::StringPool::operator= | ( | const StringPool & | other | ) |
Assignment/move operators.
Assignment operator.
other Object from which to copy.
Definition at line 209 of file StringPool.cxx.
| StringPool & SG::StringPool::operator= | ( | StringPool && | other | ) |
Remember an additional mapping from key to string.
| key | The key to enter. |
| str | The string to enter. |
| aux | Auxiliary data to include along with the string. |
key already corresponds to a different string.This registers an additional mapping from a key to a string; it can be found later through lookup() on the string.
Definition at line 321 of file StringPool.cxx.
| size_t SG::StringPool::size | ( | ) | const |
Number of registered mappings.
Definition at line 334 of file StringPool.cxx.
| StringPool::sgkey_t SG::StringPool::stringToKey | ( | const std::string & | str, |
| sgaux_t | aux = 0 |
||
| ) |
Find the key for a string.
| str | The string to look up. |
| aux | Auxiliary data to include along with the string. |
Definition at line 250 of file StringPool.cxx.
|
private |
Definition at line 137 of file StringPool.h.
Definition at line 46 of file StringPool.h.
|
static |
Number of bits we'll use in the keys.
Leave a few spare bits in case we want to overload them for flags later.
Definition at line 45 of file StringPool.h.
1.8.18