Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
12 static const char*
const fmt_clid =
"[CLID=";
13 static const char*
const fmt_tech =
"[TECH=%08X]";
14 static const char*
const fmt_oid =
"[OID=%016llX-%016llX]";
15 static const char*
const fmt_oid_old =
"[OID=%08llX-%08llX]";
16 static const int KEY_MASK = (~0
u) << CHAR_BIT;
17 static std::atomic<int> s_numCount { 0 };
25 m_classID(
Guid::null()),
26 m_oid(
OID_t(~0x0LL, ~0x0LL)),
33 m_technology(
copy.m_technology),
35 m_classID(
copy.m_classID),
46 m_classID(
Guid::null()),
47 m_oid(
OID_t(~0x0LL, ~0x0LL)),
58 m_technology (
source.m_technology),
59 m_dbID (std::move (
source.m_dbID)),
60 m_cntID (std::move (
source.m_cntID)),
61 m_classID (std::move (
source.m_classID)),
62 m_oid (std::move (
source.m_oid)),
64 m_auxString (std::move (
source.m_auxString))
113 else if (
m_oid.second >
copy.m_oid.second)
133 int s2 = sprintf(text2, fmt_oid,
m_oid.first,
m_oid.second);
134 std::string
str =
"[DB=";
142 str.append(text1,
s1);
143 str.append(text2,
s2);
150 for (
const char*
p1 =
source.c_str();
p1;
p1 = ::strchr(++
p1,
'[')) {
151 const char*
p2 = ::strchr(
p1,
'=');
152 const char*
p3 = ::strchr(
p1,
']');
153 if (
p2 != 0 &&
p3 != 0) {
154 if (::strncmp(
"[DB=",
p1, 4) == 0) {
156 }
else if (::strncmp(
"[CNT=",
p1, 5) == 0) {
158 }
else if (::strncmp(fmt_oid,
p1, 5) == 0) {
160 if (::strncmp(
"]",
p1 + 22, 1) == 0) {
169 }
else if (::strncmp(fmt_clid,
p1, 6) == 0) {
171 }
else if (::strncmp(fmt_tech,
p1, 6) == 0) {
174 while (*(
p2 + 1) ==
'[' &&
p3 && *(++
p3) != 0 && *
p3 !=
']') {
175 p3 = ::strchr(
p3,
']');
190 std::string
k =
"[DB=";
Guid m_dbID
Database identifier.
const std::string toString() const
Automatic conversion to string representation.
unsigned int m_technology
Technology identifier.
virtual bool less(const Token &pTok) const
Fast token comparison: operator less.
@ u
Enums for curvilinear frames.
This class provides a token that identifies in a unique way objects on the persistent storage.
Guid m_classID
Object global identifier.
std::string m_cntID
Container identifier.
Token & fromString(const std::string &from)
Build from the string representation of a token.
Token & operator=(const Token ©)
No assignment allowed: put prototype to disable bit-wise assignment.
virtual bool equal(const Token &pTok) const
Fast token comparison: operator equals.
std::pair< std::vector< unsigned int >, bool > res
int release()
Release token: Decrease reference count and eventually delete.
OID_t m_oid
Persistent object identifier.
virtual const std::string toString() const
Retrieve the string representation of the token.
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
virtual ~Token()
Standard destructor: release all allocated resources.
std::string m_auxString
Auxiliary string.
Token()
Standard Constructor.
const Guid & fromString(const std::string &s)
Automatic conversion from string representation.
static int numInstances()
expose Token instance counter for debugging
int m_refCount
Reference count.
const Token & setData(Token *pToken) const
Set all the data part of the token.
const Token & set(Token *pToken) const
Set token information.
This file contains the class definition for the Token class (migrated from POOL).
virtual const std::string key() const
Retrieve token key.