The Gaudi Framework
master (37c0b60a)
|
#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/StringKey.h>
Public Member Functions | |
StringKey (const char *key="") | |
constructor from plain C-string, perform hashing More... | |
StringKey (std::string key) | |
constructor from std::string, perform hashing More... | |
const std::string & | str () const |
the actual string More... | |
operator const std::string & () const | |
implicit cast to std::string More... | |
bool | empty () const |
empty key? More... | |
bool | operator! () const |
empty key? More... | |
std::size_t | __hash__ () const |
the actual access to the hash More... | |
const std::string & | __str__ () const |
the representation of the object More... | |
std::string | __repr__ () const |
the representation of the object More... | |
bool | __eq__ (const StringKey &right) const |
equality operator for python More... | |
bool | __eq__ (std::string_view right) const |
equality operators for python More... | |
bool | __neq__ (const StringKey &right) const |
non-equality operator for python More... | |
bool | __neq__ (const std::string_view right) const |
non-equality operator for python More... | |
std::string | toString () const |
string representation (for properties) More... | |
Private Attributes | |
std::string | m_str |
the actual string: More... | |
std::size_t | m_hash |
the hash: More... | |
Friends | |
bool | operator== (const StringKey &lhs, const StringKey &rhs) |
equality Key for efficiency reason compare the hash-values first More... | |
bool | operator== (const StringKey &lhs, const std::string &rhs) |
equality, without hashing string rely on the native string equality More... | |
bool | operator== (const std::string &lhs, const StringKey &rhs) |
bool | operator== (const StringKey &lhs, std::string_view rhs) |
bool | operator== (std::string_view lhs, const StringKey &rhs) |
bool | operator!= (const StringKey &lhs, const StringKey &rhs) |
non equality Key More... | |
bool | operator!= (const StringKey &lhs, std::string_view rhs) |
non-equality string More... | |
bool | operator!= (const StringKey &lhs, const std::string &rhs) |
bool | operator!= (std::string_view lhs, const StringKey &rhs) |
bool | operator!= (const std::string &lhs, const StringKey &rhs) |
bool | operator< (const StringKey &lhs, const StringKey &rhs) |
less key It can be used as a key for std::map, e.g. More... | |
bool | operator> (const StringKey &lhs, const StringKey &rhs) |
greater key More... | |
bool | operator<= (const StringKey &lhs, const StringKey &rhs) |
less or equal key More... | |
bool | operator>= (const StringKey &lhs, const StringKey &rhs) |
greater or equal key More... | |
The helper class to represent the efficient "key" for access. Essentially it is a bit modified version ("boost-free") of the original class stringKey by Gerhard Raven, which is heavily used now in HLT
Definition at line 44 of file StringKey.h.
|
inline |
Gaudi::StringKey::StringKey | ( | std::string | key | ) |
constructor from std::string, perform hashing
Definition at line 29 of file StringKey.cpp.
bool Gaudi::StringKey::__eq__ | ( | const StringKey & | right | ) | const |
bool Gaudi::StringKey::__eq__ | ( | std::string_view | right | ) | const |
|
inline |
the actual access to the hash
Definition at line 135 of file StringKey.h.
bool Gaudi::StringKey::__neq__ | ( | const std::string_view | right | ) | const |
bool Gaudi::StringKey::__neq__ | ( | const StringKey & | right | ) | const |
std::string Gaudi::StringKey::__repr__ | ( | ) | const |
const std::string & Gaudi::StringKey::__str__ | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
std::string Gaudi::StringKey::toString | ( | ) | const |
|
friend |
Definition at line 88 of file StringKey.h.
|
friend |
Definition at line 86 of file StringKey.h.
Definition at line 87 of file StringKey.h.
less key It can be used as a key for std::map, e.g.
std::map<StringKey,double>
Note that with such maps one can gain if using prehashed key:
Definition at line 113 of file StringKey.h.
|
friend |
Definition at line 76 of file StringKey.h.
|
friend |
equality, without hashing string rely on the native string equality
Definition at line 75 of file StringKey.h.
equality Key for efficiency reason compare the hash-values first
Definition at line 69 of file StringKey.h.
|
friend |
Definition at line 77 of file StringKey.h.
|
friend |
Definition at line 78 of file StringKey.h.
|
private |
the hash:
Definition at line 160 of file StringKey.h.
|
private |
the actual string:
Definition at line 158 of file StringKey.h.