42 copyVK(std::string(versionedKey));
47 version = (
unsigned char)atoi(
m_versionKey.substr(1,2).c_str());
68 return (
unsigned char) std::stoul(
m_versionKey.substr(1,2),
nullptr, 0);
77 return (this->
key() == vkey.
key());
82 return (this->
key() == baseKey);
87 return (this->
key() == std::string(baseKey));
93 unsigned char lhsVersion(0);
94 lhs.
decode(lhskey, lhsVersion);
95 unsigned char rhsVersion(0);
97 rhs.
decode(rhskey, rhsVersion);
98 int keyCompare(strcmp(lhskey.c_str(), rhskey.c_str()));
99 return ( ( keyCompare < 0) ||
100 ( (keyCompare == 0) && (lhsVersion < rhsVersion) ) ) ;
bool operator<(const DataVector< T > &a, const DataVector< T > &b)
Vector ordering relation.
defines a StoreGateSvc key with a version number
a StoreGateSvc key with a version number.
bool sameKey(const VersionedKey &vkey) const
compare base keys
VersionedKey(const char *key, unsigned char version)
version must be [0,98], 0 is the default version
unsigned char version() const
static bool isVersionedKey(const char *)
quickly determine whether a string has the right format to be a VK
void copyVK(const std::string &inKey)
static const char * autoVS()
VersionedKey()
default constructor (invalid state, do not use)
void encode(const std::string &inKey, unsigned char version)
static const char * versionFormatString()
void decode(std::string &outKey, unsigned char &version) const
sets outKey to point to base key, and version to encoded version (0 is taken to mean default version)...
std::string m_versionKey
the encoded version/key.
const std::string & key() const