a StoreGateSvc key with a version number. Notice that StoreGate does not order multiple instances of an object with a given key by version number. A generic retrieve will always return the first version recorded. For example, if object ("MyKey",1) is recorded _before__ ("MyKey", 2) a sg.retrieve(pObj,"MyKey") will return ("MyKey",1). StoreGateSvc provides retrieveAllVersions and retrieveHighestVersion, which offer a better-defined behaviour.
More...
#include <SGVersionedKey.h>
|
static bool | isVersionedKey (const char *) |
| quickly determine whether a string has the right format to be a VK More...
|
|
static bool | isVersionedKey (const std::string &) |
| quickly determine whether a string has the right format to be a VK More...
|
|
static bool | isAuto (const std::string &) |
| quickly determine whether a string has the right format to be a VK with auto-generated version # More...
|
|
a StoreGateSvc key with a version number. Notice that StoreGate does not order multiple instances of an object with a given key by version number. A generic retrieve will always return the first version recorded. For example, if object ("MyKey",1) is recorded _before__ ("MyKey", 2) a sg.retrieve(pObj,"MyKey") will return ("MyKey",1). StoreGateSvc provides retrieveAllVersions and retrieveHighestVersion, which offer a better-defined behaviour.
- Author
- pcala.nosp@m.fiur.nosp@m.a@lbl.nosp@m..gov - ATLAS Collaboration
- Id
- SGVersionedKey.h,v 1.4 2008-07-10 15:51:04 dquarrie Exp
Definition at line 31 of file SGVersionedKey.h.
◆ VersionedKey() [1/7]
VersionedKey::VersionedKey |
( |
const char * |
key, |
|
|
unsigned char |
version |
|
) |
| |
◆ VersionedKey() [2/7]
VersionedKey::VersionedKey |
( |
const std::string & |
key, |
|
|
unsigned char |
version |
|
) |
| |
◆ VersionedKey() [3/7]
VersionedKey::VersionedKey |
( |
const char * |
vkey | ) |
|
|
explicit |
make a VersionedKey from vkey string.
If vkey has the VersionedKey format (;NN;key), it is simply copied, otherwise it is taken to be the real key, and default version is assigned
Definition at line 41 of file SGVersionedKey.cxx.
42 copyVK(std::string(versionedKey));
◆ VersionedKey() [4/7]
VersionedKey::VersionedKey |
( |
const std::string & |
vkey | ) |
|
|
explicit |
make a VersionedKey from vkey string.
If vkey has the VersionedKey format (;NN;key), it is simply copied, otherwise it is taken to be the real key, and default version is assigned
Definition at line 38 of file SGVersionedKey.cxx.
◆ VersionedKey() [5/7]
◆ VersionedKey() [6/7]
◆ ~VersionedKey()
VersionedKey::~VersionedKey |
( |
| ) |
|
◆ VersionedKey() [7/7]
SG::VersionedKey::VersionedKey |
( |
| ) |
|
|
inlineprivate |
default constructor (invalid state, do not use)
Definition at line 90 of file SGVersionedKey.h.
◆ autoV()
static unsigned char SG::VersionedKey::autoV |
( |
| ) |
|
|
inlinestaticprivate |
◆ autoVS()
static const char* SG::VersionedKey::autoVS |
( |
| ) |
|
|
inlinestaticprivate |
◆ copyVK()
void VersionedKey::copyVK |
( |
const std::string & |
inKey | ) |
|
|
private |
◆ decode()
void VersionedKey::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).
Definition at line 45 of file SGVersionedKey.cxx.
◆ defaultV()
static unsigned char SG::VersionedKey::defaultV |
( |
| ) |
|
|
inlinestaticprivate |
◆ defaultVS()
static const char* SG::VersionedKey::defaultVS |
( |
| ) |
|
|
inlinestaticprivate |
◆ encode()
void VersionedKey::encode |
( |
const std::string & |
inKey, |
|
|
unsigned char |
version |
|
) |
| |
|
private |
◆ formatString()
static const char* SG::VersionedKey::formatString |
( |
| ) |
|
|
inlinestaticprivate |
◆ isAuto() [1/2]
bool SG::VersionedKey::isAuto |
( |
| ) |
const |
|
inline |
◆ isAuto() [2/2]
bool VersionedKey::isAuto |
( |
const std::string & |
vkey | ) |
|
|
static |
quickly determine whether a string has the right format to be a VK with auto-generated version #
Definition at line 28 of file SGVersionedKey.cxx.
◆ isVersionedKey() [1/2]
bool VersionedKey::isVersionedKey |
( |
const char * |
vkey | ) |
|
|
static |
quickly determine whether a string has the right format to be a VK
Definition at line 18 of file SGVersionedKey.cxx.
◆ isVersionedKey() [2/2]
bool VersionedKey::isVersionedKey |
( |
const std::string & |
vkey | ) |
|
|
static |
quickly determine whether a string has the right format to be a VK
Definition at line 23 of file SGVersionedKey.cxx.
◆ key()
const std::string & VersionedKey::key |
( |
| ) |
const |
◆ operator std::string()
SG::VersionedKey::operator std::string |
( |
| ) |
const |
|
inline |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ rawVersionKey()
const std::string& SG::VersionedKey::rawVersionKey |
( |
| ) |
const |
|
inline |
- Returns
- access underlying encoded m_versionKey C string
Definition at line 76 of file SGVersionedKey.h.
◆ sameKey() [1/3]
bool VersionedKey::sameKey |
( |
const char * |
baseKey | ) |
const |
compare base keys
Definition at line 86 of file SGVersionedKey.cxx.
87 return (this->
key() == std::string(baseKey));
◆ sameKey() [2/3]
bool VersionedKey::sameKey |
( |
const std::string & |
baseKey | ) |
const |
◆ sameKey() [3/3]
◆ separator()
static char SG::VersionedKey::separator |
( |
| ) |
|
|
inlinestaticprivate |
◆ version()
unsigned char VersionedKey::version |
( |
| ) |
const |
◆ versionFormatString()
static const char* SG::VersionedKey::versionFormatString |
( |
| ) |
|
|
inlinestaticprivate |
◆ ::SGImplSvc
◆ ::StoreGateSvc
◆ ObjectWithVersion
◆ m_baseKey
std::string SG::VersionedKey::m_baseKey |
|
private |
◆ m_versionKey
std::string SG::VersionedKey::m_versionKey |
|
private |
the encoded version/key.
Mutable so that ownership can be transferred in the copy constructor
Definition at line 106 of file SGVersionedKey.h.
The documentation for this class was generated from the following files: