 |
ATLAS Offline Software
|
Go to the documentation of this file.
12 static constexpr
Guid clid_null(
"00000000-0000-0000-0000-000000000000");
21 char* envv =
getenv(
"POOL_GUID_TIME");
23 envv =
getenv(
"POOL_GUID_RANDOM");
37 ::uuid_generate_time(me_);
43 unsigned int *
d1 = (
unsigned int*)me_;
44 unsigned short *
d2 = (
unsigned short*)(me_ + 4);
45 unsigned short *d3 = (
unsigned short*)(me_ + 6);
49 for (
unsigned int i = 0;
i < 8;
i++) {
50 guid.m_data4[
i] = me_[
i + 8];
56 if (
sv.size() != 36) {
61 if (
sv[8] !=
'-' ||
sv[13] !=
'-' ||
sv[18] !=
'-' ||
sv[23] !=
'-') {
66 for (
size_t i = 0;
i < 36; ++
i) {
68 if (
i == 8 ||
i == 13 ||
i == 18 ||
i == 23) {
74 if (!((
c >=
'0' &&
c <=
'9') || (
c >=
'a' &&
c <=
'f') || (
c >=
'A' &&
c <=
'F'))) {
bool operator==(const Guid &) const =default
constexpr Guid()
Standard constructor.
static GuidGenMethod initGuidGenMethod()
Checks for POOL_GUID_TIME or POOL_GUID_RANDOM env variables.
static constexpr int stringSize()
constexpr Guid::string to_fixed_string(bool uppercase=true) const
std::ostream & operator<<(std::ostream &os, const Guid &rhs)
static void create(Guid &guid, GuidGenMethod method=GuidGenDefault)
Create a new Guid default method is currently Random, can be changed by param, API or environment.
static const Guid & null() noexcept
NULL-Guid: static class method.
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
std::string getenv(const std::string &variableName)
get an environment variable
static const GuidGenMethod m_guidGenMethod
This file contains the class definition for the Guid class (migrated from POOL).
static bool isGuid(std::string_view) noexcept