![]() |
The Gaudi Framework
v36r13 (995e4364)
|
std::string wrapper for static strings where identical values actually share the memory. More...
#include </builds/gaudi/Gaudi/GaudiCoreSvc/src/JobOptionsSvc/PropertyId.h>
Public Member Functions | |
SharedString (std::string_view s={}) | |
Create a new SharedString checking if the value is already in the shared storage otherwise adding it. More... | |
operator std::string () const | |
operator std::string_view () const | |
bool | operator== (std::string_view other) const |
bool | operator== (const SharedString &other) const |
template<typename T > | |
bool | operator== (const T &other) const |
Static Private Member Functions | |
static const std::string * | get (std::string_view s) |
Private Attributes | |
const std::string * | m_s |
Static Private Attributes | |
static std::unordered_set< std::string > | storage |
std::string wrapper for static strings where identical values actually share the memory.
This class is useful when dealing with several duplicated strings so that the actual value is kept in memory only once and all the SharedString instances point to it.
SharedString is automatically comparable and convertible to std::string.
Definition at line 35 of file PropertyId.h.
|
inline |
Create a new SharedString checking if the value is already in the shared storage otherwise adding it.
Definition at line 39 of file PropertyId.h.
|
inlinestaticprivate |
|
inline |
Definition at line 41 of file PropertyId.h.
|
inline |
Definition at line 42 of file PropertyId.h.
|
inline |
Definition at line 45 of file PropertyId.h.
|
inline |
Definition at line 48 of file PropertyId.h.
|
inline |
Definition at line 44 of file PropertyId.h.
|
private |
Definition at line 53 of file PropertyId.h.
|
staticprivate |
Definition at line 60 of file PropertyId.h.