1 #ifndef GAUDIKERNEL_STRINGKEY_H
2 #define GAUDIKERNEL_STRINGKEY_H 1
40 StringKey (
const std::string& key =
"" ) ;
45 const std::string&
str()
const {
return m_str ; }
47 operator const std::string&()
const {
return str() ; }
49 bool empty ()
const {
return m_str.empty() ; }
63 bool operator == (
const std::string& o )
const {
return m_str == o ; }
70 bool operator!=(
const std::string& o )
const {
return !(*
this==o) ; }
117 std::string __str__ ()
const ;
119 std::string __repr__ ()
const ;
121 bool __eq__ (
const StringKey& right )
const ;
123 bool __eq__ (
const std::string& right )
const ;
125 bool __neq__ (
const StringKey& right )
const ;
127 bool __neq__ (
const std::string& right )
const ;
147 template <
unsigned int N>
148 inline bool operator==
150 const char (&key2)[
N] )
153 key1.str().size() ==
N &&
154 std::equal ( key2 , key2 +
N , key1.str().begin() ) ;
161 template <
unsigned int N>
162 inline bool operator!=
164 const char (&key2)[
N] )
165 {
return ! ( key1 == key2 ) ; }
171 inline bool operator==
172 (
const std::string& key1 ,
174 {
return key2 == key1 ; }
180 template <
unsigned int N>
181 inline bool operator==
182 (
const char (&key1 )[
N] ,
184 {
return key2 == key1 ; }
190 inline bool operator!=
191 (
const std::string& key1 ,
193 {
return key2 != key1 ; }
199 template <
unsigned int N>
200 inline bool operator!=
201 (
const char (&key1)[
N] ,
248 inline std::ostream&
operator<<
273 const std::string& input ) ;
285 ( std::vector<Gaudi::StringKey>& result ,
286 const std::string& input ) ;
294 #endif // GAUDIKERNEL_STRINGKEY_H
bool operator==(const Gaudi::StringKey &key1, const char(&key2)[N])
equality operator with C-arrays
bool operator!() const
empty key?
bool operator<=(const Gaudi::Time &t1, const Gaudi::Time &t2)
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
bool operator>=(const Gaudi::Time &t1, const Gaudi::Time &t2)
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
std::size_t m_hash
the hash:
The helper class to represent the efficient "key" for access.
bool empty() const
empty key?
bool operator!=(const std::string &o) const
non-equality string
std::size_t hash_value(const Gaudi::StringKey &key)
hash-function: heeded for boost::hash
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
std::string m_str
the actual string:
This class is used for returning status codes from appropriate routines.
bool operator>(const Gaudi::Time &t1, const Gaudi::Time &t2)
bool operator!=(const StringKey &o) const
non equality Key
This is a number of static methods for bootstrapping the Gaudi framework.
bool operator<(const Gaudi::Time &t1, const Gaudi::Time &t2)
std::size_t __hash__() const
the actual access to the hash
const std::string & str() const
the actual string