The Gaudi Framework
master (37c0b60a)
|
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 36 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 40 of file PropertyId.h.
|
inlinestaticprivate |
|
inline |
Definition at line 42 of file PropertyId.h.
|
inline |
Definition at line 43 of file PropertyId.h.
|
inline |
Definition at line 46 of file PropertyId.h.
|
inline |
Definition at line 49 of file PropertyId.h.
|
inline |
Definition at line 45 of file PropertyId.h.
|
private |
Definition at line 54 of file PropertyId.h.
|
staticprivate |
Definition at line 61 of file PropertyId.h.