Go to the documentation of this file.
16 #include <string_view>
17 #include <unordered_set>
35 operator std::string_view()
const {
return *
m_s; }
37 bool operator==( std::string_view other )
const {
return *
m_s == other; }
49 if (
s.empty() ) {
return {}; }
73 if (
auto pos =
s.find(
'.' ); pos != std::string_view::npos ) {
74 m_chunks.emplace_back(
s.substr( 0, pos ) );
75 s.remove_prefix( pos + 1 );
friend bool operator==(const PropertyId &lhs, const PropertyId &rhs)
PropertyId(const std::string &s)
bool operator==(std::string_view other) const
PropertyId(std::string_view s)
static std::unordered_set< std::string > storage
bool operator==(const SharedString &other) const
AttribStringParser::Iterator begin(const AttribStringParser &parser)
static const std::string * get(std::string_view s)
std::size_t operator()(Gaudi::Details::PropertyId const &s) const noexcept
SharedString(std::string_view s={})
Create a new SharedString checking if the value is already in the shared storage otherwise adding it.
std::size_t hash() const noexcept
std::vector< SharedString > m_chunks
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
bool operator==(const T &other) const
Helper to record a property identifier as a sequence of SharedString instances.
std::string wrapper for static strings where identical values actually share the memory.
bool operator==(const PropertyId &lhs, const PropertyId &rhs)