|
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)),
98 else if (
m_oid.second >
copy.m_oid.second)
118 int s2 = sprintf(text2, fmt_oid,
m_oid.first,
m_oid.second);
119 std::string
str =
"[DB=";
127 str.append(text1,
s1);
128 str.append(text2,
s2);
135 for (
const char*
p1 =
source.c_str();
p1;
p1 = ::strchr(++
p1,
'[')) {
136 const char*
p2 = ::strchr(
p1,
'=');
137 const char*
p3 = ::strchr(
p1,
']');
138 if (
p2 != 0 &&
p3 != 0) {
139 if (::strncmp(
"[DB=",
p1, 4) == 0) {
141 }
else if (::strncmp(
"[CNT=",
p1, 5) == 0) {
143 }
else if (::strncmp(fmt_oid,
p1, 5) == 0) {
145 if (::strncmp(
"]",
p1 + 22, 1) == 0) {
154 }
else if (::strncmp(fmt_clid,
p1, 6) == 0) {
156 }
else if (::strncmp(fmt_tech,
p1, 6) == 0) {
159 while (*(
p2 + 1) ==
'[' &&
p3 && *(++
p3) != 0 && *
p3 !=
']') {
160 p3 = ::strchr(
p3,
']');
175 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.