The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
StringKey.cpp
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
14
21
23const std::string& Gaudi::StringKey::__str__() const { return m_str; }
24std::string Gaudi::StringKey::__repr__() const { return toString(); }
25bool Gaudi::StringKey::__eq__( const Gaudi::StringKey& right ) const { return *this == right; }
26bool Gaudi::StringKey::__eq__( std::string_view right ) const { return *this == right; }
27bool Gaudi::StringKey::__neq__( const Gaudi::StringKey& right ) const { return *this != right; }
28bool Gaudi::StringKey::__neq__( std::string_view right ) const { return *this != right; }
29std::ostream& Gaudi::Utils::toStream( const Gaudi::StringKey& key, std::ostream& s ) {
30 return Gaudi::Utils::toStream( key.str(), s );
31}
32StatusCode Gaudi::Parsers::parse( Gaudi::StringKey& result, std::string_view input ) {
33 std::string _result;
34 StatusCode sc = parse( _result, input );
35 result = Gaudi::StringKey( _result );
36 return sc;
37}
38StatusCode Gaudi::Parsers::parse( std::vector<Gaudi::StringKey>& result, std::string_view input ) {
39 result.clear();
40 typedef std::vector<std::string> Strings;
41 Strings _result;
42 StatusCode sc = parse( _result, input );
43 if ( sc.isFailure() ) { return sc; }
44 result.reserve( _result.size() );
45
46 std::copy( _result.begin(), _result.end(), std::back_inserter( result ) );
47
49}
The declaration of major parsing functions used e.g for (re)implementation of new extended properties...
StatusCode parse(DataObjID &dest, std::string_view src)
Definition DataObjID.cpp:58
implementation of various functions for streaming.
Helper class for efficient "key" access for strings.
Definition StringKey.h:66
std::string __repr__() const
the representation of the object
Definition StringKey.cpp:24
std::string m_str
the actual string
Definition StringKey.h:140
std::string toString() const
string representation (for properties)
Definition StringKey.cpp:22
bool __eq__(const StringKey &right) const
equality operator for python
Definition StringKey.cpp:25
const std::string & __str__() const
the representation of the object
Definition StringKey.cpp:23
bool __neq__(const StringKey &right) const
non-equality operator for python
Definition StringKey.cpp:27
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
bool isFailure() const
Definition StatusCode.h:129
constexpr static const auto SUCCESS
Definition StatusCode.h:99
StatusCode parse(GaudiUtils::HashMap< K, V > &result, std::string_view input)
Basic parser for the types of HashMap used in DODBasicMapper.
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition ToStream.h:326
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition ToStream.h:304