#include <iostream>
#include <string>
Go to the source code of this file.
|
class | SG::ObjectWithVersion |
| associate a data object with its VersionedKey The object is held by a ReadHandle to delay its retrieval in case the user is interested only in the versionedKey More...
|
|
class | SG::VersionedKey |
| 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...
|
|
defines a StoreGateSvc key with a version number
Definition in file SGVersionedKey.h.
◆ operator<()
sort according to highest key version
Definition at line 91 of file SGVersionedKey.cxx.
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) ) ) ;
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)...