'\" t
.TH TQUuid 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
TQUuid \- Defines a Universally Unique Identifier (UUID)
.SH SYNOPSIS
All the functions in this class are reentrant when TQt is built with thread support.</p>
.PP
\fC#include <tquuid.h>\fR
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "enum \fBVariant\fR { VarUnknown = -1, NCS = 0, DCE = 2, Microsoft = 6, Reserved = 7 }"
.br
.ti -1c
.BI "enum \fBVersion\fR { VerUnknown = -1, Time = 1, EmbeddedPOSIX = 2, Name = 3, Random = 4 }"
.br
.ti -1c
.BI "\fBTQUuid\fR ()"
.br
.ti -1c
.BI "\fBTQUuid\fR ( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 )"
.br
.ti -1c
.BI "\fBTQUuid\fR ( const TQUuid & orig )"
.br
.ti -1c
.BI "\fBTQUuid\fR ( const TQString & text )"
.br
.ti -1c
.BI "TQString \fBtoString\fR () const"
.br
.ti -1c
.BI "\fBoperator TQString\fR () const"
.br
.ti -1c
.BI "bool \fBisNull\fR () const"
.br
.ti -1c
.BI "TQUuid & \fBoperator=\fR ( const TQUuid & uuid )"
.br
.ti -1c
.BI "bool \fBoperator==\fR ( const TQUuid & other ) const"
.br
.ti -1c
.BI "bool \fBoperator!=\fR ( const TQUuid & other ) const"
.br
.ti -1c
.BI "bool \fBoperator<\fR ( const TQUuid & other ) const"
.br
.ti -1c
.BI "bool \fBoperator>\fR ( const TQUuid & other ) const"
.br
.ti -1c
.BI "TQUuid::Variant \fBvariant\fR () const"
.br
.ti -1c
.BI "TQUuid::Version \fBversion\fR () const"
.br
.in -1c
.SS "Static Public Members"
.in +1c
.ti -1c
.BI "TQUuid \fBcreateUuid\fR ()"
.br
.in -1c
.SH RELATED FUNCTION DOCUMENTATION
.in +1c
.ti -1c
.BI "TQDataStream & \fBoperator<<\fR ( TQDataStream & s, const TQUuid & id )"
.br
.ti -1c
.BI "TQDataStream & \fBoperator>>\fR ( TQDataStream & s, TQUuid & id )"
.br
.in -1c
.SH DESCRIPTION
The TQUuid class defines a Universally Unique Identifier (UUID).
.PP
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.
.PP
In Qt, UUIDs are wrapped by the TQUuid struct which provides convenience functions for handling UUIDs. Most platforms provide a tool to generate new UUIDs, for example, uuidgen and guidgen.
.PP
UUIDs generated by TQUuid, are based on the Random version of the DCE (Distributed Computing Environment) standard.
.PP
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().
.SS "Member Type Documentation"
.SH "TQUuid::Variant"
This enum defines the variant of the UUID, which is the scheme which defines the layout of the 128-bits value.
.TP
\fCTQUuid::VarUnknown\fR - Variant is unknown
.TP
\fCTQUuid::NCS\fR - Reserved for NCS (Network Computing System) backward compatibility
.TP
\fCTQUuid::DCE\fR - Distributed Computing Environment, the scheme used by TQUuid
.TP
\fCTQUuid::Microsoft\fR - Reserved for Microsoft backward compatibility (GUID)
.TP
\fCTQUuid::Reserved\fR - Reserved for future definition
.SH "TQUuid::Version"
This enum defines the version of the UUID.
.TP
\fCTQUuid::VerUnknown\fR - Version is unknown
.TP
\fCTQUuid::Time\fR - Time-based, by using timestamp, clock sequence, and MAC network card address (if available) for the node sections
.TP
\fCTQUuid::EmbeddedPOSIX\fR - DCE Security version, with embedded POSIX UUIDs
.TP
\fCTQUuid::Name\fR - Name-based, by using values from a name for all sections
.TP
\fCTQUuid::Random\fR - Random-based, by using random numbers for all sections
.SH MEMBER FUNCTION DOCUMENTATION
.SH "TQUuid::TQUuid ()"
Creates the null UUID {00000000-0000-0000-0000-000000000000}.
.SH "TQUuid::TQUuid ( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 )"
Creates a UUID with the value specified by the parameters, \fIl\fR, \fIw1\fR, \fIw2\fR, \fIb1\fR, \fIb2\fR, \fIb3\fR, \fIb4\fR, \fIb5\fR, \fIb6\fR, \fIb7\fR, \fIb8\fR.
.PP
Example:
.PP
.nf
.br
// {67C8770B-44F1-410A-AB9A-F9B5446F13EE}
.br
TQUuid IID_MyInterface( 0x67c8770b, 0x44f1, 0x410a, 0xab, 0x9a, 0xf9, 0xb5, 0x44, 0x6f, 0x13, 0xee )
.br
.fi
.SH "TQUuid::TQUuid ( const TQUuid & orig )"
Creates a copy of the TQUuid \fIorig\fR.
.SH "TQUuid::TQUuid ( const TQString & text )"
Creates a TQUuid object from the string \fItext\fR. 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.
.SH "TQUuid TQUuid::createUuid ()\fC [static]\fR"
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.
.PP
On Windows, the new UUID is extremely likely to be unique on the same or any other system, networked or not.
.PP
See also variant() and version().
.SH "bool TQUuid::isNull () const"
Returns TRUE if this is the null UUID {00000000-0000-0000-0000-000000000000}; otherwise returns FALSE.
.SH "TQUuid::operator TQString () const"
Returns the string representation of the uuid.
.PP
See also toString().
.SH "bool TQUuid::operator!= ( const TQUuid & other ) const"
Returns TRUE if this TQUuid and the \fIother\fR TQUuid are different; otherwise returns FALSE.
.SH "bool TQUuid::operator< ( const TQUuid & other ) const"
Returns TRUE if this TQUuid is of the same variant, and lexicographically before the \fIother\fR TQUuid; otherwise returns FALSE.
.PP
See also variant().
.SH "TQUuid & TQUuid::operator= ( const TQUuid & uuid )"
Assigns the value of \fIuuid\fR to this TQUuid object.
.SH "bool TQUuid::operator== ( const TQUuid & other ) const"
Returns TRUE if this TQUuid and the \fIother\fR TQUuid are identical; otherwise returns FALSE.
.SH "bool TQUuid::operator> ( const TQUuid & other ) const"
Returns TRUE if this TQUuid is of the same variant, and lexicographically after the \fIother\fR TQUuid; otherwise returns FALSE.
.PP
See also variant().
.SH "TQString TQUuid::toString () const"
TQString TQUuid::toString() const
.PP
Returns the string representation of the uuid.
.SH "TQUuid::Variant TQUuid::variant () const"
Returns the variant of the UUID. The null UUID is considered to be of an unknown variant.
.PP
See also version().
.SH "TQUuid::Version TQUuid::version () const"
Returns the version of the UUID, if the UUID is of the DCE variant; otherwise returns VerUnknown.
.PP
See also variant().
.SH RELATED FUNCTION DOCUMENTATION
.SH "TQDataStream & operator<< ( TQDataStream & s, const TQUuid & id )"
Writes the uuid \fIid\fR to the datastream \fIs\fR.
.SH "TQDataStream & operator>> ( TQDataStream & s, TQUuid & id )"
Reads uuid from from the stream \fIs\fR into \fIid\fR.
.SH "SEE ALSO"
.BR http://doc.trolltech.com/tquuid.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive TQt documentation is provided in HTML format; it is
located at $TQTDIR/doc/html and can be read using TQt Assistant or with
a web browser. This man page is provided as a convenience for those
users who prefer man pages, although this format is not officially
supported by Trolltech.
.P
If you find errors in this manual page, please report them to
.BR qt-bugs@trolltech.com .
Please include the name of the manual page (tquuid.3qt) and the Qt
version (3.3.8).