karoo::uuid Class Reference

This class implements a name-based UUID, which produces a unique 128bit ID for a URL (the UUID is always the same for a given URL); or it can create a time-based UUID. More...

#include <uuid.h>

List of all members.

Public Member Functions

 uuid ()
 Create a NULL UUID.
 uuid (uint8_t *bytes)
 Create a UUID directly from 128 bits of data.
 uuid (const text &str)
 Create a valid Version 3 MD5 URL UUID.
 uuid (struct timeval tv)
 Create a valid Version 1 time-based UUID.
 uuid (const uuid &ref)
 Create a UUID which is an exact copy of another.
uuid operator= (const uuid &ref)
const char * toString () const
 Get the standard string representation of the UUID.
const uint8_t * getBytes () const
 Get the array of bytes.


Detailed Description

This class implements a name-based UUID, which produces a unique 128bit ID for a URL (the UUID is always the same for a given URL); or it can create a time-based UUID.

Constructor & Destructor Documentation

karoo::uuid::uuid ( const text str  ) 

Create a valid Version 3 MD5 URL UUID.

Parameters:
str the URL string (does not need to be null terminated.)
If str is precisely a UUID string rather than a URL, then it will do a byte-wise conversion directly to UUID.

karoo::uuid::uuid ( struct timeval  tv  ) 

Create a valid Version 1 time-based UUID.

Parameters:
tv time stamp

karoo::uuid::uuid ( const uuid ref  ) 

Create a UUID which is an exact copy of another.

Parameters:
ref the UUID to copy byte-by-byte


Member Function Documentation

const char* karoo::uuid::toString (  )  const

Get the standard string representation of the UUID.

Returns:
a pointer to the internally cached string. This will be freed by the destructor.


The documentation for this class was generated from the following file:

Generated on Tue Feb 16 15:04:30 2010 for Karoo by  doxygen 1.5.8