Logo Search packages:      
Sourcecode: poco version File versions  Download package

Poco::UUID Class Reference

#include <UUID.h>

List of all members.

Detailed Description

A UUID is an identifier that is unique across both space and time, with respect to the space of all UUIDs. Since a UUID is a fixed size and contains a time field, it is possible for values to rollover (around A.D. 3400, depending on the specific algorithm used). A UUID can be used for multiple purposes, from tagging objects with an extremely short lifetime, to reliably identifying very persistent objects across a network. This class implements a Universal Unique Identifier, as specified in Appendix A of the DCE 1.1 Remote Procedure Call Specification (http://www.opengroup.org/onlinepubs/9629399/), RFC 2518 (WebDAV), section 6.4.1 and the UUIDs and GUIDs internet draft by Leach/Salz from February, 1998 (http://ftp.ics.uci.edu/pub/ietf/webdav/uuid-guid/draft-leach-uuids-guids-01.txt) and also http://www.ietf.org/internet-drafts/draft-mealling-uuid-urn-03.txt

Definition at line 49 of file UUID.h.

Public Types

enum  Version { UUID_TIME_BASED = 0x01, UUID_DCE_UID = 0x02, UUID_NAME_BASED = 0x03, UUID_RANDOM = 0x04 }

Public Member Functions

void copyFrom (const char *buffer)
void copyTo (char *buffer) const
bool isNil () const
bool operator!= (const UUID &uuid) const
bool operator< (const UUID &uuid) const
bool operator<= (const UUID &uuid) const
UUIDoperator= (const UUID &uuid)
 Destroys the UUID.
bool operator== (const UUID &uuid) const
bool operator> (const UUID &uuid) const
bool operator>= (const UUID &uuid) const
void parse (const std::string &uuid)
 Swaps the UUID with another one.
void swap (UUID &uuid)
 Assignment operator.
std::string toString () const
 Parses the UUID from its string representation.
 UUID (const char *uuid)
 Parses the UUID from a string.
 UUID (const std::string &uuid)
 Copy constructor.
 UUID (const UUID &uuid)
 Creates a nil (all zero) UUID.
int variant () const
 Returns the version of the UUID.
Version version () const
 ~UUID ()
 Parses the UUID from a string.

Static Public Member Functions

static const UUIDdns ()
 Returns a nil UUID.
static const UUIDnil ()
static const UUIDoid ()
 Returns the namespace identifier for the URI (former URL) namespace.
static const UUIDuri ()
 Returns the namespace identifier for the DNS namespace.
static const UUIDx500 ()
 Returns the namespace identifier for the OID namespace.

Protected Member Functions

int compare (const UUID &uuid) const
void fromNetwork ()
void toNetwork ()
 UUID (const char *bytes, Version version)
 UUID (UInt32 timeLow, UInt32 timeMid, UInt32 timeHiAndVersion, UInt16 clockSeq, UInt8 node[])
 Returns the namespace identifier for the X500 namespace.

Static Protected Member Functions

static void appendHex (std::string &str, UInt32 n)
static void appendHex (std::string &str, UInt16 n)
static void appendHex (std::string &str, UInt8 n)
static int nibble (char hex)

Private Attributes

UInt16 _clockSeq
UInt8 _node [6]
UInt16 _timeHiAndVersion
UInt32 _timeLow
UInt16 _timeMid


class UUIDGenerator

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

Generated by  Doxygen 1.6.0   Back to index