Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

QUuid Struct Reference

The QUuid class defines a Universally Unique Identifier (UUID). More...

#include </home/clem/local/src/opie/library/quuid.h>

List of all members.

Public Types

enum  Variant {
  VarUnknown = -1, NCS = 0, DCE = 2, Microsoft = 6,
  Reserved = 7
}
enum  Variant {
  VarUnknown = -1, NCS = 0, DCE = 2, Microsoft = 6,
  Reserved = 7
}
enum  Version {
  VerUnknown = -1, Time = 1, EmbeddedPOSIX = 2, Name = 3,
  Random = 4
}

Public Member Functions

 QUuid ()
 QUuid (uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8)
 QUuid (const QUuid &uuid)
 QUuid (const QString &)
QString toString () const
bool isNull () const
QUuidoperator= (const QUuid &orig)
bool operator== (const QUuid &orig) const
bool operator!= (const QUuid &orig) const
bool operator< (const QUuid &other) const
bool operator> (const QUuid &other) const
QUuid::Variant variant () const
 QUuid ()
 QUuid (uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8)
 QUuid (const QUuid &uuid)
 QUuid (const QString &)
 QUuid (const char *)
QString toString () const
 operator QString () const
bool isNull () const
QUuidoperator= (const QUuid &orig)
bool operator== (const QUuid &orig) const
bool operator!= (const QUuid &orig) const
bool operator< (const QUuid &other) const
bool operator> (const QUuid &other) const
QUuid::Variant variant () const
QUuid::Version version () const

Static Public Member Functions

static QUuid createUuid ()

Public Attributes

ulong data1
ushort data2
ushort data3
uchar data4 [8]
uint data1

Related Functions

(Note that these are not member functions.)

QDataStreamoperator<< (QDataStream &s, const QUuid &id)
QDataStreamoperator>> (QDataStream &s, QUuid &id)


Detailed Description

The QUuid class defines a Universally Unique Identifier (UUID).

This class is temporarily copied from Qt 3.0.

Definition at line 28 of file quuid.h.


Member Enumeration Documentation

enum QUuid::Variant
 

Enumeration values:
VarUnknown 
NCS 
DCE 
Microsoft 
Reserved 

Definition at line 63 of file quuid.h.

enum QUuid::Variant
 

This enum defines the variant of the UUID, which is the scheme which defines the layout of the 128-bits value.

VarUnknown Variant is unknown NCS Reserved for NCS (Network Computing System) backward compatibility DCE Distributed Computing Environment, the scheme used by QUuid Microsoft Reserved for Microsoft backward compatibility (GUID) Reserved Reserved for future definition

Enumeration values:
VarUnknown 
NCS 
DCE 
Microsoft 
Reserved 

Definition at line 30 of file quuid.h.

enum QUuid::Version
 

This enum defines the version of the UUID.

VerUnknown Version is unknown Time Time-based, by using timestamp, clock sequence, and MAC network card address (if available) for the node sections EmbeddedPOSIX DCE Security version, with embedded POSIX UUIDs Name Name-based, by using values from a name for all sections Random Random-based, by using random numbers for all sections

Enumeration values:
VerUnknown 
Time 
EmbeddedPOSIX 
Name 
Random 

Definition at line 71 of file quuid.h.


Constructor & Destructor Documentation

QUuid::QUuid  )  [inline]
 

Creates the null UUID {00000000-0000-0000-0000-000000000000}.

Definition at line 38 of file quuid.h.

Referenced by QUuid().

QUuid::QUuid uint  l,
ushort  w1,
ushort  w2,
uchar  b1,
uchar  b2,
uchar  b3,
uchar  b4,
uchar  b5,
uchar  b6,
uchar  b7,
uchar  b8
[inline]
 

Creates an UUID with the value specified by the parameters, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8.

Example:

  // {67C8770B-44F1-410A-AB9A-F9B5446F13EE}
  QUuid IID_MyInterface( 0x67c8770b, 0x44f1, 0x410a, 0xab, 0x9a, 0xf9, 0xb5, 0x44, 0x6f, 0x13, 0xee )

Definition at line 42 of file quuid.h.

QUuid::QUuid const QUuid orig  )  [inline]
 

Creates a copy of the QUuid orig.

Definition at line 56 of file quuid.h.

References data1, data2, data3, data4, and i.

QUuid::QUuid const QString text  ) 
 

Creates a QUuid object from the string text. Right now, the function can only convert the format {12345678-1234-1234-1234-123456789ABC} and will create the null UUID when the conversion fails.

Definition at line 62 of file quuid.cpp.

References data1, data2, data3, data4, i, QString::mid(), QUuid(), and QString::upper().

QUuid::QUuid  )  [inline]
 

Definition at line 79 of file quuid.h.

QUuid::QUuid uint  l,
ushort  w1,
ushort  w2,
uchar  b1,
uchar  b2,
uchar  b3,
uchar  b4,
uchar  b5,
uchar  b6,
uchar  b7,
uchar  b8
[inline]
 

Definition at line 83 of file quuid.h.

QUuid::QUuid const QUuid uuid  )  [inline]
 

Definition at line 97 of file quuid.h.

QUuid::QUuid const QString  ) 
 

QUuid::QUuid const char *  text  ) 
 

For internal use only.

Definition at line 148 of file quuid.cpp.

References QUuid().


Member Function Documentation

QUuid QUuid::createUuid  )  [static]
 

Returns a new UUID of DCE variant, and Random type. The UUIDs generated are based on the platform specific pseudo-random generator, which is usually not a cryptographic-quality random number generator. Therefore, a UUID is not guaranteed to be unique cross application instances.

On Windows, the new UUID is extremely likely to be unique on the same or any other system, networked or not.

See also:
variant(), version()

Definition at line 391 of file quuid.cpp.

References QDateTime::currentDateTime(), data, data1, data3, data4, and max.

Referenced by VcprojGenerator::getProjectUUID().

bool QUuid::isNull  )  const
 

bool QUuid::isNull  )  const
 

Returns TRUE if this is the null UUID {00000000-0000-0000-0000-000000000000}, otherwise returns FALSE.

Definition at line 151 of file quuid.cpp.

References data1, data2, data3, and data4.

Referenced by QComponentFactory::createInstance(), VcprojGenerator::getProjectUUID(), variant(), and version().

QUuid::operator QString  )  const [inline]
 

Returns the string representation of the uuid.

See also:
toString()

Definition at line 105 of file quuid.h.

bool QUuid::operator!= const QUuid orig  )  const [inline]
 

Definition at line 129 of file quuid.h.

bool QUuid::operator!= const QUuid other  )  const [inline]
 

Returns TRUE if this QUuid and the other QUuid are different, otherwise returns FALSE.

Definition at line 100 of file quuid.h.

bool QUuid::operator< const QUuid other  )  const
 

bool QUuid::operator< const QUuid other  )  const
 

Returns TRUE if this QUuid is of the same variant, and lexicographically before the other QUuid; otherwise returns FALSE.

See also:
variant()

Definition at line 189 of file quuid.cpp.

References data1, data2, data3, data4, FALSE, ISLESS, and variant().

QUuid& QUuid::operator= const QUuid orig  )  [inline]
 

Definition at line 109 of file quuid.h.

QUuid QUuid::operator= const QUuid uuid  )  [inline]
 

Assigns the value of uuid to this QUuid object.

Definition at line 73 of file quuid.h.

References data1, data2, data3, data4, and i.

bool QUuid::operator== const QUuid orig  )  const [inline]
 

Definition at line 115 of file quuid.h.

References data1, data2, data3, data4, FALSE, i, and TRUE.

bool QUuid::operator== const QUuid other  )  const [inline]
 

Returns TRUE if this QUuid and the other QUuid are identical, otherwise returns FALSE.

Definition at line 86 of file quuid.h.

References data1, data2, data3, data4, FALSE, i, and TRUE.

bool QUuid::operator> const QUuid other  )  const
 

bool QUuid::operator> const QUuid other  )  const
 

Returns TRUE if this QUuid is of the same variant, and lexicographically after the other QUuid; otherwise returns FALSE.

See also:
variant()

Definition at line 214 of file quuid.cpp.

References data1, data2, data3, data4, FALSE, ISMORE, and variant().

QString QUuid::toString  )  const
 

QString QUuid::toString  )  const
 

QString QUuid::toString() const

Returns a string in {12345678-1234-1234-1234-123456789ABC} format.

Definition at line 132 of file quuid.cpp.

References data1, data2, data3, data4, i, and QString::number().

Referenced by QComponentFactory::createInstance(), and VcprojGenerator::getProjectUUID().

QUuid::Variant QUuid::variant  )  const
 

QUuid::Variant QUuid::variant  )  const
 

Returns the variant of the UUID. The null UUID is considered to be of an unknown variant.

See also:
version()

Definition at line 167 of file quuid.cpp.

References data4, DCE, isNull(), Microsoft, NCS, Reserved, and VarUnknown.

Referenced by operator<(), operator>(), and version().

QUuid::Version QUuid::version  )  const
 

Returns the version of the UUID, if the UUID is of the DCE variant; otherwise returns VerUnknown.

See also:
variant()

Definition at line 305 of file quuid.cpp.

References data3, DCE, isNull(), Random, Time, variant(), and VerUnknown.


Friends And Related Function Documentation

QDataStream & operator<< QDataStream s,
const QUuid id
[related]
 

Writes the uuid id to the datastream s.

Definition at line 207 of file quuid.cpp.

References i.

QDataStream & operator>> QDataStream s,
QUuid id
[related]
 

Reads uuid from from the stream s into id.

Definition at line 221 of file quuid.cpp.

References i, u16, u32, and u8.


Member Data Documentation

uint QUuid::data1
 

Definition at line 180 of file quuid.h.

ulong QUuid::data1
 

Definition at line 110 of file quuid.h.

Referenced by createUuid(), isNull(), operator<(), operator=(), operator==(), operator>(), QUuid(), and toString().

ushort QUuid::data2
 

Definition at line 181 of file quuid.h.

Referenced by isNull(), operator<(), operator=(), operator==(), operator>(), QUuid(), and toString().

ushort QUuid::data3
 

Definition at line 182 of file quuid.h.

Referenced by createUuid(), VcprojGenerator::getProjectUUID(), isNull(), operator<(), operator=(), operator==(), operator>(), QUuid(), toString(), and version().

uchar QUuid::data4
 

Definition at line 183 of file quuid.h.

Referenced by createUuid(), VcprojGenerator::getProjectUUID(), VcprojGenerator::increaseUUID(), isNull(), operator<(), operator=(), operator==(), operator>(), QUuid(), toString(), and variant().


The documentation for this struct was generated from the following files:
Generated on Sat Nov 5 17:50:14 2005 for OPIE by  doxygen 1.4.2