Classes | Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes

ACE_Utils::UUID Class Reference

#include <UUID.h>

Collaboration diagram for ACE_Utils::UUID:
Collaboration graph
[legend]

List of all members.

Classes

struct  data
 Data Members for Class Attributes. More...

Public Types

enum  { BINARY_SIZE = 16 }
 

The size of a binary UUID.

More...

Public Member Functions

 UUID (void)
 Constructor.
 UUID (const ACE_CString &uuidString)
 Constructs a UUID from a string representation.
 UUID (const UUID &right)
 ~UUID (void)
ACE_UINT32 time_low (void) const
void time_low (ACE_UINT32)
ACE_UINT16 time_mid (void) const
void time_mid (ACE_UINT16)
ACE_UINT16 time_hi_and_version (void) const
void time_hi_and_version (ACE_UINT16)
u_char clock_seq_hi_and_reserved (void) const
void clock_seq_hi_and_reserved (u_char)
u_char clock_seq_low (void) const
void clock_seq_low (u_char)
UUID_Nodenode (void)
const UUID_Nodenode (void) const
void node (const UUID_Node &node)
ACE_CStringthr_id (void)
void thr_id (char *)
ACE_CStringpid (void)
void pid (char *)
const ACE_CStringto_string (void) const
 Returns a string representation of the UUID.
void from_string (const ACE_CString &uuid_string)
 Set the value using a string.
bool operator== (const UUID &right) const
 Equality Operations.
bool operator!= (const UUID &right) const
unsigned long hash (void) const
 Compute a hash value for the UUID.
const UUIDoperator= (const UUID &rhs)
 Assign an existing UUID to this UUID.

Static Public Attributes

static const UUID NIL_UUID
 NIL UUID.

Private Member Functions

void init (void)
 Initialize the UUID.
void from_string_i (const ACE_CString &uuid_string)

Private Attributes

struct ACE_Utils::UUID::data uuid_
 Data Members for Class Attributes.
ACE_CString thr_id_
ACE_CString pid_
ACE_Auto_Ptr< ACE_CStringas_string_

Detailed Description

Definition at line 84 of file UUID.h.


Member Enumeration Documentation

anonymous enum

The size of a binary UUID.

Enumerator:
BINARY_SIZE 

Definition at line 88 of file UUID.h.

{ BINARY_SIZE = 16 };


Constructor & Destructor Documentation

ACE_Utils::UUID::UUID ( void   ) 

Constructor.

Definition at line 22 of file UUID.inl.

  {
    this->init ();
  }

ACE_Utils::UUID::UUID ( const ACE_CString uuidString  ) 

Constructs a UUID from a string representation.

ACE_Utils::UUID::UUID ( const UUID right  ) 

Definition at line 28 of file UUID.inl.

    : thr_id_ (right.thr_id_),
      pid_ (right.pid_)
  {
    ACE_OS::memcpy (&this->uuid_, &right.uuid_, BINARY_SIZE);
  }

ACE_Utils::UUID::~UUID ( void   ) 

Definition at line 36 of file UUID.inl.

  {

  }


Member Function Documentation

u_char ACE_Utils::UUID::clock_seq_hi_and_reserved ( void   )  const

Definition at line 91 of file UUID.inl.

  {
    return this->uuid_.clock_seq_hi_and_reserved_;
  }

void ACE_Utils::UUID::clock_seq_hi_and_reserved ( u_char  clock_seq_hi_and_reserved  ) 

Definition at line 97 of file UUID.inl.

  {
    this->uuid_.clock_seq_hi_and_reserved_ = clock_seq_hi_and_reserved;
  }

u_char ACE_Utils::UUID::clock_seq_low ( void   )  const

Definition at line 103 of file UUID.inl.

  {
    return this->uuid_.clock_seq_low_;
  }

void ACE_Utils::UUID::clock_seq_low ( u_char  clock_seq_low  ) 

Definition at line 109 of file UUID.inl.

  {
    this->uuid_.clock_seq_low_ = clock_seq_low;
  }

void ACE_Utils::UUID::from_string ( const ACE_CString uuid_string  ) 

Set the value using a string.

Definition at line 159 of file UUID.inl.

  {
    this->from_string_i (uuidString);
  }

void ACE_Utils::UUID::from_string_i ( const ACE_CString uuid_string  )  [private]

Helper method to convert from a string UUID.

Parameters:
[in] uuid_string String version of UUID.
unsigned long ACE_Utils::UUID::hash ( void   )  const

Compute a hash value for the UUID.

Definition at line 48 of file UUID.inl.

  {
    return ACE::hash_pjw (reinterpret_cast <const char *> (&this->uuid_),
                          UUID::BINARY_SIZE);
  }

void ACE_Utils::UUID::init ( void   )  [private]

Initialize the UUID.

Definition at line 42 of file UUID.inl.

  {
    ACE_OS::memset (&this->uuid_, 0, BINARY_SIZE);
  }

void ACE_Utils::UUID::node ( const UUID_Node node  ) 

Definition at line 127 of file UUID.inl.

  {
    ACE_OS::memcpy (&this->uuid_.node_,
                    node.node_ID (),
                    UUID_Node::NODE_ID_SIZE);
  }

UUID_Node & ACE_Utils::UUID::node ( void   ) 

Definition at line 121 of file UUID.inl.

  {
    return this->uuid_.node_;
  }

const UUID_Node & ACE_Utils::UUID::node ( void   )  const

Definition at line 115 of file UUID.inl.

  {
    return this->uuid_.node_;
  }

bool ACE_Utils::UUID::operator!= ( const UUID right  )  const

Definition at line 171 of file UUID.inl.

  {
    return 0 != ACE_OS::memcmp (&this->uuid_, &right.uuid_, BINARY_SIZE);
  }

const UUID& ACE_Utils::UUID::operator= ( const UUID rhs  ) 

Assign an existing UUID to this UUID.

bool ACE_Utils::UUID::operator== ( const UUID right  )  const

Equality Operations.

Definition at line 165 of file UUID.inl.

  {
    return 0 == ACE_OS::memcmp (&this->uuid_, &right.uuid_, BINARY_SIZE);
  }

ACE_CString * ACE_Utils::UUID::pid ( void   ) 

Definition at line 147 of file UUID.inl.

  {
    return &this->pid_;
  }

void ACE_Utils::UUID::pid ( char *  pid  ) 

Definition at line 153 of file UUID.inl.

  {
    this->pid_ = pid;
  }

void ACE_Utils::UUID::thr_id ( char *  thr_id  ) 

Definition at line 141 of file UUID.inl.

  {
    this->thr_id_ = thr_id;
  }

ACE_CString * ACE_Utils::UUID::thr_id ( void   ) 

Definition at line 135 of file UUID.inl.

  {
    return &this->thr_id_;
  }

void ACE_Utils::UUID::time_hi_and_version ( ACE_UINT16  time_hi_and_version  ) 

Definition at line 85 of file UUID.inl.

  {
    this->uuid_.time_hi_and_version_ = time_hi_and_version;
  }

ACE_UINT16 ACE_Utils::UUID::time_hi_and_version ( void   )  const

Definition at line 79 of file UUID.inl.

  {
    return this->uuid_.time_hi_and_version_;
  }

void ACE_Utils::UUID::time_low ( ACE_UINT32  timelow  ) 

Definition at line 61 of file UUID.inl.

  {
    this->uuid_.time_low_ = timelow;
  }

ACE_UINT32 ACE_Utils::UUID::time_low ( void   )  const

Definition at line 55 of file UUID.inl.

  {
    return this->uuid_.time_low_;
  }

ACE_UINT16 ACE_Utils::UUID::time_mid ( void   )  const

Definition at line 67 of file UUID.inl.

  {
    return this->uuid_.time_mid_;
  }

void ACE_Utils::UUID::time_mid ( ACE_UINT16  time_mid  ) 

Definition at line 73 of file UUID.inl.

  {
    this->uuid_.time_mid_ = time_mid;
  }

const ACE_CString* ACE_Utils::UUID::to_string ( void   )  const

Returns a string representation of the UUID.


Member Data Documentation

The string representation of the UUID. This is created and updated only on demand.

Definition at line 184 of file UUID.h.

NIL UUID.

Definition at line 134 of file UUID.h.

Definition at line 180 of file UUID.h.

Definition at line 179 of file UUID.h.

Data Members for Class Attributes.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines