![]() |
ATLAS Offline Software
|
a StoreGateSvc key with a version number. More...
#include <SGVersionedKey.h>
Public Member Functions | |
| VersionedKey (const char *key, unsigned char version) | |
| version must be [0,98], 0 is the default version | |
| VersionedKey (const std::string &key, unsigned char version) | |
| version must be [0,98], 0 is the default version | |
| VersionedKey (const char *vkey) | |
| make a VersionedKey from vkey string. | |
| VersionedKey (const std::string &vkey) | |
| make a VersionedKey from vkey string. | |
| VersionedKey (const VersionedKey &rhs)=default | |
| VersionedKey (VersionedKey &&rhs)=default | |
| VersionedKey & | operator= (const VersionedKey &rhs)=default |
| VersionedKey & | operator= (VersionedKey &&rhs)=default |
| ~VersionedKey () | |
| 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). | |
| operator std::string () const | |
| unsigned char | version () const |
| const std::string & | key () const |
| const std::string & | rawVersionKey () const |
| bool | sameKey (const VersionedKey &vkey) const |
| compare base keys | |
| bool | sameKey (const std::string &baseKey) const |
| compare base keys | |
| bool | sameKey (const char *baseKey) const |
| compare base keys | |
| bool | isAuto () const |
Static Public Member Functions | |
| static bool | isVersionedKey (const char *) |
| quickly determine whether a string has the right format to be a VK | |
| static bool | isVersionedKey (const std::string &) |
| quickly determine whether a string has the right format to be a VK | |
| static bool | isAuto (const std::string &) |
| quickly determine whether a string has the right format to be a VK with auto-generated version # | |
Private Member Functions | |
| VersionedKey () | |
| default constructor (invalid state, do not use) | |
| void | encode (const std::string &inKey, unsigned char version) |
| void | copyVK (const std::string &inKey) |
Static Private Member Functions | |
| static char | separator () |
| static const char * | versionFormatString () |
| static const char * | formatString () |
| static unsigned char | autoV () |
| static unsigned char | defaultV () |
| static const char * | autoVS () |
| static const char * | defaultVS () |
Private Attributes | |
| std::string | m_versionKey |
| the encoded version/key. | |
| std::string | m_baseKey |
Friends | |
| class | ::StoreGateSvc |
| class | ::SGImplSvc |
| template<class U> | |
| class | ObjectWithVersion |
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.
Definition at line 31 of file SGVersionedKey.h.
| VersionedKey::VersionedKey | ( | const char * | key, |
| unsigned char | version ) |
version must be [0,98], 0 is the default version
Definition at line 32 of file SGVersionedKey.cxx.
| VersionedKey::VersionedKey | ( | const std::string & | key, |
| unsigned char | version ) |
version must be [0,98], 0 is the default version
Definition at line 35 of file SGVersionedKey.cxx.
|
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.
|
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.
|
default |
|
default |
| VersionedKey::~VersionedKey | ( | ) |
Definition at line 15 of file SGVersionedKey.cxx.
|
inlineprivate |
default constructor (invalid state, do not use)
Definition at line 90 of file SGVersionedKey.h.
|
inlinestaticprivate |
Definition at line 99 of file SGVersionedKey.h.
|
inlinestaticprivate |
Definition at line 101 of file SGVersionedKey.h.
|
private |
Definition at line 59 of file SGVersionedKey.cxx.
| 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.
|
inlinestaticprivate |
Definition at line 100 of file SGVersionedKey.h.
|
inlinestaticprivate |
Definition at line 102 of file SGVersionedKey.h.
|
private |
Definition at line 51 of file SGVersionedKey.cxx.
|
inlinestaticprivate |
Definition at line 97 of file SGVersionedKey.h.
|
inline |
Definition at line 85 of file SGVersionedKey.h.
|
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.
|
static |
quickly determine whether a string has the right format to be a VK
Definition at line 18 of file SGVersionedKey.cxx.
|
static |
quickly determine whether a string has the right format to be a VK
Definition at line 23 of file SGVersionedKey.cxx.
| const std::string & VersionedKey::key | ( | ) | const |
|
inline |
Definition at line 70 of file SGVersionedKey.h.
|
default |
|
default |
|
inline |
Definition at line 76 of file SGVersionedKey.h.
| bool VersionedKey::sameKey | ( | const char * | baseKey | ) | const |
compare base keys
Definition at line 86 of file SGVersionedKey.cxx.
| bool VersionedKey::sameKey | ( | const std::string & | baseKey | ) | const |
compare base keys
Definition at line 81 of file SGVersionedKey.cxx.
| bool VersionedKey::sameKey | ( | const VersionedKey & | vkey | ) | const |
compare base keys
Definition at line 76 of file SGVersionedKey.cxx.
|
inlinestaticprivate |
Definition at line 95 of file SGVersionedKey.h.
| unsigned char VersionedKey::version | ( | ) | const |
Definition at line 67 of file SGVersionedKey.cxx.
|
inlinestaticprivate |
Definition at line 96 of file SGVersionedKey.h.
|
friend |
Definition at line 33 of file SGVersionedKey.h.
|
friend |
Definition at line 32 of file SGVersionedKey.h.
|
friend |
Definition at line 88 of file SGVersionedKey.h.
|
private |
Definition at line 107 of file SGVersionedKey.h.
|
private |
the encoded version/key.
Mutable so that ownership can be transferred in the copy constructor
Definition at line 106 of file SGVersionedKey.h.