1 #ifndef GAUDIKERNEL_STRINGKEY_H
2 #define GAUDIKERNEL_STRINGKEY_H 1
47 const std::string&
str()
const {
return m_str ; }
49 operator const std::string&()
const {
return str() ; }
51 bool empty ()
const {
return m_str.empty() ; }
65 bool operator == (
const std::string& o )
const {
return m_str == o ; }
72 bool operator!=(
const std::string& o )
const {
return !(*
this==o) ; }
119 std::string __str__ ()
const ;
121 std::string __repr__ ()
const ;
123 bool __eq__ (
const StringKey& right )
const ;
125 bool __eq__ (
const std::string& right )
const ;
127 bool __neq__ (
const StringKey& right )
const ;
129 bool __neq__ (
const std::string& right )
const ;
149 template <
unsigned int N>
150 inline bool operator==
152 const char (&key2)[
N] )
155 key1.str().size() ==
N &&
156 std::equal ( key2 , key2 +
N , key1.str().begin() ) ;
163 template <
unsigned int N>
164 inline bool operator!=
166 const char (&key2)[
N] )
167 {
return ! ( key1 == key2 ) ; }
173 inline bool operator==
174 (
const std::string& key1 ,
176 {
return key2 == key1 ; }
182 template <
unsigned int N>
183 inline bool operator==
184 (
const char (&key1 )[
N] ,
186 {
return key2 == key1 ; }
192 inline bool operator!=
193 (
const std::string& key1 ,
195 {
return key2 != key1 ; }
201 template <
unsigned int N>
202 inline bool operator!=
203 (
const char (&key1)[
N] ,
250 inline std::ostream&
operator<<
275 const std::string& input ) ;
287 ( std::vector<Gaudi::StringKey>& result ,
288 const std::string& input ) ;
294 #if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
300 struct hash<
Gaudi::StringKey> {
308 #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