Eneboo - Documentación para desarrolladores
Tipos públicos | Métodos públicos | Métodos públicos estáticos | Atributos públicos | Funciones relacionadas
Referencia de la Clase QUuid

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

#include <quuid.h>

Lista de todos los miembros.

Tipos públicos

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

Métodos públicos

 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
 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

Métodos públicos estáticos

static QUuid createUuid ()
static QUuid createUuid ()

Atributos públicos

uint data1
ushort data2
ushort data3
uchar data4 [8]

Funciones relacionadas

(Observar que estas no son funciones miembro.)

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

Descripción detallada

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

For objects or declarations that must be uniquely identified, UUIDs (also known as GUIDs) are widely used in order to assign a fixed and easy to compare value to the object or declaration. The 128-bit value of a UUID is generated by an algorithm that guarantees that the value is unique.

In Qt, UUIDs are wrapped by the QUuid struct which provides convenience functions for handling UUIDs. Most platforms provide a tool to generate new UUIDs, for example, uuidgen and guidgen.

UUIDs generated by QUuid, are based on the Random version of the DCE (Distributed Computing Environment) standard.

UUIDs can be constructed from numeric values or from strings, or using the static createUuid() function. They can be converted to a string with toString(). UUIDs have a variant() and a version(), and null UUIDs return TRUE from isNull().


Documentación de las enumeraciones miembro de la clase

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

Valores de enumeraciones:
VarUnknown 
NCS 
DCE 
Microsoft 
Reserved 
VarUnknown 
NCS 
DCE 
Microsoft 
Reserved 
Valores de enumeraciones:
VarUnknown 
NCS 
DCE 
Microsoft 
Reserved 
VarUnknown 
NCS 
DCE 
Microsoft 
Reserved 
Valores de enumeraciones:
VerUnknown 
Time 
EmbeddedPOSIX 
Name 
Random 
VerUnknown 
Time 
EmbeddedPOSIX 
Name 
Random 

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

Valores de enumeraciones:
VerUnknown 
Time 
EmbeddedPOSIX 
Name 
Random 
VerUnknown 
Time 
EmbeddedPOSIX 
Name 
Random 

Documentación del constructor y destructor

QUuid::QUuid ( ) [inline]

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

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 a 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 )
QUuid::QUuid ( const QUuid orig) [inline]

Creates a copy of the QUuid orig.

QUuid::QUuid ( const QString text)

Creates a QUuid object from the string text. The function can only convert a string in the format {HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH} (where 'H' stands for a hex digit). If the conversion fails a null UUID is created.

QUuid::QUuid ( const char *  text)
QUuid::QUuid ( ) [inline]
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]
QUuid::QUuid ( const QUuid uuid) [inline]
QUuid::QUuid ( const QString )
QUuid::QUuid ( const char *  )

Documentación de las funciones miembro

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.

Ver también:
variant(), version()
static QUuid QUuid::createUuid ( ) [static]
bool QUuid::isNull ( ) const

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

bool QUuid::isNull ( ) const
QUuid::operator QString ( ) const [inline]
QUuid::operator QString ( ) const [inline]

Returns the string representation of the uuid.

Ver también:
toString()
bool QUuid::operator!= ( const QUuid orig) const [inline]
bool QUuid::operator!= ( const QUuid other) const [inline]

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

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.

Ver también:
variant()
QUuid QUuid::operator= ( const QUuid uuid) [inline]

Assigns the value of uuid to this QUuid object.

QUuid& QUuid::operator= ( const QUuid orig) [inline]
bool QUuid::operator== ( const QUuid orig) const [inline]
bool QUuid::operator== ( const QUuid other) const [inline]

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

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.

Ver también:
variant()
bool QUuid::operator> ( const QUuid other) const
QString QUuid::toString ( ) const

QString QUuid::toString() const

Returns the string representation of the uuid.

QString QUuid::toString ( ) const
QUuid::Variant QUuid::variant ( ) const

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

Ver también:
version()
QUuid::Variant QUuid::variant ( ) const
QUuid::Version QUuid::version ( ) const

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

Ver también:
variant()
QUuid::Version QUuid::version ( ) const

Documentación de las funciones relacionadas y clases amigas

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

Writes the uuid id to the datastream s.

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

Reads uuid from from the stream s into id.


Documentación de los datos miembro


La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'