CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Public Attributes

ora::Guid Struct Reference

#include <Guid.h>

List of all members.

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().

                       {
  uuid_t me_;
  ::uuid_generate_time(me_);
  unsigned int*  tmp = reinterpret_cast<unsigned int*>(me_);
  Data1 = *tmp;
  Data2 = *reinterpret_cast<unsigned short*>(me_+4);
  Data3 = *reinterpret_cast<unsigned short*>(me_+6);
  for (int i = 0; i < 8; ++i){
    Data4[i]=me_[i+8];
  }
}
std::string ora::Guid::null ( ) [static]

Definition at line 11 of file Guid.cc.

References guid_null.

Referenced by cond::writeTokenContainerFragment().

                       {
  return guid_null;
}
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().

                                  {

  char text[GUID_STRING_SIZE];
  ::snprintf(text, GUID_STRING_SIZE, fmt_Guid,
             Data1, Data2, Data3,
             Data4[0], Data4[1], Data4[2], Data4[3],
             Data4[4], Data4[5], Data4[6], Data4[7]);
  return text;
}

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.