eq::base::UUID Class Reference

Provides a universally unique identifier. More...

#include <uuid.h>

Collaboration diagram for eq::base::UUID:

Collaboration graph
[legend]

List of all members.

Classes

struct  Data
 Opaque data type, used for network transport. More...

Public Member Functions

 UUID (const bool generate=false)
 Construct a new universally unique identifier.
 UUID (const UUID &from)
 Create a copy of a universally unique identifier.
 UUID (const Data &from)
 Create a copy of a universally unique identifier.
void getData (Data &data) const
 Get the raw data for network transport.
UUIDoperator= (const UUID &from)
 Assign another universally unique identifier.
UUIDoperator= (const std::string &from)
 Assign another UUID from a string representation.
bool operator== (const UUID &rhs) const
bool operator!= (const UUID &rhs) const
bool operator< (const UUID &rhs) const
bool operator> (const UUID &rhs) const
bool operator! () const
void convertToNetwork ()
 Convert this UUID for network transport.
void convertToHost ()
 Convert this UUID from network transport.

Static Public Attributes

static const UUID ZERO
 The NULL UUID.

Friends

struct stde::hash< const eq::base::UUID >
std::ostream & operator<< (std::ostream &os, const UUID &id)
 UUID& ostream operator.


Detailed Description

Provides a universally unique identifier.

Not to be subclassed.

Definition at line 46 of file uuid.h.


Constructor & Destructor Documentation

eq::base::UUID::UUID ( const bool  generate = false  )  [inline]

Construct a new universally unique identifier.

If generate is set to true, a new UUID is allocated. Otherwise the UUID is cleared, i.e., it is equal to UUID::ZERO.

Definition at line 132 of file uuid.h.

eq::base::UUID::UUID ( const UUID from  )  [inline]

Create a copy of a universally unique identifier.

Definition at line 136 of file uuid.h.

References _id.

eq::base::UUID::UUID ( const Data from  )  [inline]

Create a copy of a universally unique identifier.

Definition at line 139 of file uuid.h.

References eq::base::UUID::UUID::Data::id.


Member Function Documentation

void eq::base::UUID::getData ( Data data  )  const [inline]

Get the raw data for network transport.

Definition at line 142 of file uuid.h.

References eq::base::UUID::UUID::Data::id.

UUID& eq::base::UUID::operator= ( const UUID from  )  [inline]

Assign another universally unique identifier.

Definition at line 145 of file uuid.h.

References _id.

UUID& eq::base::UUID::operator= ( const std::string &  from  )  [inline]

Assign another UUID from a string representation.

Definition at line 152 of file uuid.h.

bool eq::base::UUID::operator== ( const UUID rhs  )  const [inline]

Returns:
true if the UUIDs are equal, false otherwise.

Definition at line 159 of file uuid.h.

References _id.

bool eq::base::UUID::operator!= ( const UUID rhs  )  const [inline]

Returns:
true if the UUIDs are different, false otherwise.

Definition at line 163 of file uuid.h.

References _id.

bool eq::base::UUID::operator< ( const UUID rhs  )  const [inline]

Returns:
true if this UUID is smaller than the RHS UUID.

Definition at line 167 of file uuid.h.

References _id.

bool eq::base::UUID::operator> ( const UUID rhs  )  const [inline]

Returns:
true if this UUID is bigger than the RHS UUID.

Definition at line 171 of file uuid.h.

References _id.

bool eq::base::UUID::operator! (  )  const [inline]

Returns:
true if this UUID is set, i.e., it is not UUID::ZERO.

Definition at line 175 of file uuid.h.

void eq::base::UUID::convertToNetwork (  )  [inline]

Convert this UUID for network transport.

Definition at line 178 of file uuid.h.

Referenced by eq::net::Node::connect(), and eq::net::DataOStream::operator<<().

Here is the caller graph for this function:

void eq::base::UUID::convertToHost (  )  [inline]

Convert this UUID from network transport.

Definition at line 181 of file uuid.h.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const UUID id 
) [friend]

UUID& ostream operator.

Definition at line 207 of file uuid.h.


Member Data Documentation


The documentation for this class was generated from the following files:
Generated on Mon Aug 10 18:58:44 2009 for Equalizer 0.9 by  doxygen 1.5.8