CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes
ora::Guid Struct Reference

#include <Guid.h>

Public Member Functions

void fromTime ()
 
std::string toString () const
 

Static Public Member Functions

static std::string null ()
 

Public Attributes

unsigned int Data1
 
unsigned short Data2
 
unsigned short Data3
 
unsigned char Data4 [8]
 

Detailed Description

Definition at line 10 of file Guid.h.

Member Function Documentation

void ora::Guid::fromTime ( )

Definition at line 15 of file Guid.cc.

References i, and tmp.

Referenced by ora::guidFromTime().

15  {
16  uuid_t me_;
17  ::uuid_generate_time(me_);
18  unsigned int* tmp = reinterpret_cast<unsigned int*>(me_);
19  Data1 = *tmp;
20  Data2 = *reinterpret_cast<unsigned short*>(me_+4);
21  Data3 = *reinterpret_cast<unsigned short*>(me_+6);
22  for (int i = 0; i < 8; ++i){
23  Data4[i]=me_[i+8];
24  }
25 }
int i
Definition: DBlmapReader.cc:9
unsigned char Data4[8]
Definition: Guid.h:15
unsigned int Data1
Definition: Guid.h:12
unsigned short Data3
Definition: Guid.h:14
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
unsigned short Data2
Definition: Guid.h:13
std::string ora::Guid::null ( )
static

Definition at line 11 of file Guid.cc.

References guid_null.

Referenced by cond::writeTokenContainerFragment().

11  {
12  return guid_null;
13 }
static const char * guid_null
Definition: Guid.cc:9
std::string ora::Guid::toString ( ) const

Definition at line 27 of file Guid.cc.

References fmt_Guid, GUID_STRING_SIZE, and runonSM::text.

Referenced by ora::guidFromTime(), and cond::writeTokenContainerFragment().

27  {
28 
29  char text[GUID_STRING_SIZE];
30  ::snprintf(text, GUID_STRING_SIZE, fmt_Guid,
31  Data1, Data2, Data3,
32  Data4[0], Data4[1], Data4[2], Data4[3],
33  Data4[4], Data4[5], Data4[6], Data4[7]);
34  return text;
35 }
#define GUID_STRING_SIZE
Definition: Guid.h:4
unsigned char Data4[8]
Definition: Guid.h:15
static const char * fmt_Guid
Definition: Guid.cc:8
unsigned int Data1
Definition: Guid.h:12
tuple text
Definition: runonSM.py:42
unsigned short Data3
Definition: Guid.h:14
unsigned short Data2
Definition: Guid.h:13

Member Data Documentation

unsigned int ora::Guid::Data1

Definition at line 12 of file Guid.h.

unsigned short ora::Guid::Data2

Definition at line 13 of file Guid.h.

unsigned short ora::Guid::Data3

Definition at line 14 of file Guid.h.

unsigned char ora::Guid::Data4[8]

Definition at line 15 of file Guid.h.