|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QUuid
public class QUuid
The QUuid
class stores 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()
.
Nested Class Summary | |
---|---|
static class |
QUuid.Variant
|
static class |
QUuid.Version
This enum defines the version of the UUID. |
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Constructor Summary | |
---|---|
QUuid()
Creates the null UUID {00000000-0000-0000-0000-000000000000}. |
|
QUuid(int l,
char w1,
char w2,
byte b1,
byte b2,
byte b3,
byte b4,
byte b5,
byte b6,
byte b7,
byte b8)
Creates a UUID with the value specified by the parameters, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8. |
|
QUuid(java.lang.String arg__1)
Creates a QUuid object from the string text. |
Method Summary | |
---|---|
QUuid |
clone()
This method is reimplemented for internal reasons |
static QUuid |
createUuid()
Returns a new UUID of DCE variant, and Random type. |
int |
data1()
Returns the data of this QUuid. |
char |
data2()
Returns the data of this QUuid. |
char |
data3()
Returns the data of this QUuid. |
byte[] |
data4()
|
static QUuid |
fromNativePointer(QNativePointer nativePointer)
|
boolean |
isNull()
Returns true if this is the null UUID {00000000-0000-0000-0000-000000000000}; otherwise returns false. |
static QNativePointer |
nativePointerArray(QUuid[] array)
|
void |
readFrom(QDataStream arg__1)
|
void |
setData1(int data1)
Sets the data of this QUuid to data1. |
void |
setData2(char data2)
Sets the data of this QUuid to data2. |
void |
setData3(char data3)
Sets the data of this QUuid to data3. |
void |
setData4(byte[] data4)
|
java.lang.String |
toString()
|
QUuid.Variant |
variant()
Returns the variant of the UUID. |
QUuid.Version |
version()
Returns the version of the UUID, if the UUID is of the DCE variant; otherwise returns VerUnknown . |
void |
writeTo(QDataStream arg__1)
|
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QUuid()
public QUuid(java.lang.String arg__1)
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.
public QUuid(int l, char w1, char w2, byte b1, byte b2, byte b3, byte b4, byte b5, byte b6, byte b7, byte b8)
Example:
// {67C8770B-44F1-410A-AB9A-F9B5446F13EE} QUuid IID_MyInterface = new QUuid(0x67c8770b, (char) 0x44f1, (char) 0x410a, (byte) 0xab, (byte) 0x9a, (byte) 0xf9, (byte) 0xb5, (byte) 0x44, (byte) 0x6f, (byte) 0x13, (byte) 0xee);
Method Detail |
---|
public final boolean isNull()
public final void writeTo(QDataStream arg__1)
public final void readFrom(QDataStream arg__1)
public final java.lang.String toString()
toString
in class java.lang.Object
public final QUuid.Variant variant()
version()
.
public final QUuid.Version version()
VerUnknown
. variant()
.
public static QUuid createUuid()
On Windows, the new UUID is extremely likely to be unique on the same or any other system, networked or not.
variant()
, and version()
.
public final void setData1(int data1)
public final int data1()
public final void setData2(char data2)
public final char data2()
public final void setData3(char data3)
public final char data3()
public final void setData4(byte[] data4)
public final byte[] data4()
public static QUuid fromNativePointer(QNativePointer nativePointer)
public static QNativePointer nativePointerArray(QUuid[] array)
public QUuid clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |