<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt - 3.3.8 - espenr - 2499/qt - x11 - free - 3.3.8/src/tools/quuid.cpp:40 -->
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=ISO-8859-1" >
< title > TQUuid Class< / title >
< style type = "text/css" > < ! - -
fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
-->< / style >
< / head >
< body >
< table border = "0" cellpadding = "0" cellspacing = "0" width = "100%" >
< tr bgcolor = "#E5E5E5" >
< td valign = center >
< a href = "index.html" >
< font color = "#004faf" > Home< / font > < / a >
| < a href = "classes.html" >
< font color = "#004faf" > All Classes< / font > < / a >
| < a href = "mainclasses.html" >
< font color = "#004faf" > Main Classes< / font > < / a >
| < a href = "annotated.html" >
< font color = "#004faf" > Annotated< / font > < / a >
| < a href = "groups.html" >
< font color = "#004faf" > Grouped Classes< / font > < / a >
| < a href = "functions.html" >
< font color = "#004faf" > Functions< / font > < / a >
< / td >
< td align = "right" valign = "center" > < img src = "logo32.png" align = "right" width = "64" height = "32" border = "0" > < / td > < / tr > < / table > < h1 align = center > TQUuid Class Reference< / h1 >
< p > The TQUuid class defines a Universally Unique Identifier (UUID).
< a href = "#details" > More...< / a >
< p > All the functions in this class are < a href = "threads.html#reentrant" > reentrant< / a > when TQt is built with thread support.< / p >
< p > < tt > #include < < a href = "quuid-h.html" > ntquuid.h< / a > > < / tt >
< p > < a href = "quuid-members.html" > List of all member functions.< / a >
< h2 > Public Members< / h2 >
< ul >
< li class = fn > enum < a href = "#Variant-enum" > < b > Variant< / b > < / a > { VarUnknown = -1, NCS = 0, DCE = 2, Microsoft = 6, Reserved = 7 }< / li >
< li class = fn > enum < a href = "#Version-enum" > < b > Version< / b > < / a > { VerUnknown = -1, Time = 1, EmbeddedPOSIX = 2, Name = 3, Random = 4 }< / li >
< li class = fn > < a href = "#TQUuid" > < b > TQUuid< / b > < / a > ()< / li >
< li class = fn > < a href = "#TQUuid-2" > < b > TQUuid< / b > < / a > ( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 )< / li >
< li class = fn > < a href = "#TQUuid-3" > < b > TQUuid< / b > < / a > ( const TQUuid & orig )< / li >
< li class = fn > < a href = "#TQUuid-4" > < b > TQUuid< / b > < / a > ( const TQString & text )< / li >
< li class = fn > TQString < a href = "#toString" > < b > toString< / b > < / a > () const< / li >
< li class = fn > < a href = "#operator-TQString" > < b > operator TQString< / b > < / a > () const< / li >
< li class = fn > bool < a href = "#isNull" > < b > isNull< / b > < / a > () const< / li >
< li class = fn > TQUuid & < a href = "#operator-eq" > < b > operator=< / b > < / a > ( const TQUuid & uuid )< / li >
< li class = fn > bool < a href = "#operator-eq-eq" > < b > operator==< / b > < / a > ( const TQUuid & other ) const< / li >
< li class = fn > bool < a href = "#operator!-eq" > < b > operator!=< / b > < / a > ( const TQUuid & other ) const< / li >
< li class = fn > bool < a href = "#operator-lt" > < b > operator< < / b > < / a > ( const TQUuid & other ) const< / li >
< li class = fn > bool < a href = "#operator-gt" > < b > operator> < / b > < / a > ( const TQUuid & other ) const< / li >
< li class = fn > TQUuid::Variant < a href = "#variant" > < b > variant< / b > < / a > () const< / li >
< li class = fn > TQUuid::Version < a href = "#version" > < b > version< / b > < / a > () const< / li >
< / ul >
< h2 > Static Public Members< / h2 >
< ul >
< li class = fn > TQUuid < a href = "#createUuid" > < b > createUuid< / b > < / a > ()< / li >
< / ul >
< h2 > Related Functions< / h2 >
< ul >
< li class = fn > TQDataStream & < a href = "#operator-lt-lt" > < b > operator< < < / b > < / a > ( TQDataStream & s, const TQUuid & id )< / li >
< li class = fn > TQDataStream & < a href = "#operator-gt-gt" > < b > operator> > < / b > < / a > ( TQDataStream & s, TQUuid & id )< / li >
< / ul >
< hr > < a name = "details" > < / a > < h2 > Detailed Description< / h2 >
The TQUuid class defines a Universally Unique Identifier (UUID).
< p >
< p > 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.
< p > In TQt, 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.
< p > UUIDs generated by TQUuid, are based on the < a href = "#Version-enum" > Random< / a > version of the
< a href = "#Variant-enum" > DCE< / a > (Distributed Computing Environment) standard.
< p > UUIDs can be constructed from numeric values or from strings, or
using the static < a href = "#createUuid" > createUuid< / a > () function. They can be converted to a
string with < a href = "#toString" > toString< / a > (). UUIDs have a < a href = "#variant" > variant< / a > () and a < a href = "#version" > version< / a > (),
and null UUIDs return TRUE from < a href = "#isNull" > isNull< / a > ().
< hr > < h2 > Member Type Documentation< / h2 >
< h3 class = fn > < a name = "Variant-enum" > < / a > TQUuid::Variant< / h3 >
< p > This enum defines the variant of the UUID, which is the scheme
which defines the layout of the 128-bits value.
< ul >
< li > < tt > TQUuid::VarUnknown< / tt > - Variant is unknown
< li > < tt > TQUuid::NCS< / tt > - Reserved for NCS (Network Computing System) backward compatibility
< li > < tt > TQUuid::DCE< / tt > - Distributed Computing Environment, the scheme used by TQUuid
< li > < tt > TQUuid::Microsoft< / tt > - Reserved for Microsoft backward compatibility (GUID)
< li > < tt > TQUuid::Reserved< / tt > - Reserved for future definition
< / ul >
< h3 class = fn > < a name = "Version-enum" > < / a > TQUuid::Version< / h3 >
< p > This enum defines the version of the UUID.
< ul >
< li > < tt > TQUuid::VerUnknown< / tt > - Version is unknown
< li > < tt > TQUuid::Time< / tt > - Time-based, by using timestamp, clock sequence, and
MAC network card address (if available) for the node sections
< li > < tt > TQUuid::EmbeddedPOSIX< / tt > - DCE Security version, with embedded POSIX UUIDs
< li > < tt > TQUuid::Name< / tt > - Name-based, by using values from a name for all sections
< li > < tt > TQUuid::Random< / tt > - Random-based, by using random numbers for all sections
< / ul >
< hr > < h2 > Member Function Documentation< / h2 >
< h3 class = fn > < a name = "TQUuid" > < / a > TQUuid::TQUuid ()
< / h3 >
< p > Creates the null UUID {00000000-0000-0000-0000-000000000000}.
< h3 class = fn > < a name = "TQUuid-2" > < / a > TQUuid::TQUuid ( uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8 )
< / h3 >
< p > Creates a UUID with the value specified by the parameters, < em > l< / em > ,
< em > w1< / em > , < em > w2< / em > , < em > b1< / em > , < em > b2< / em > , < em > b3< / em > , < em > b4< / em > , < em > b5< / em > , < em > b6< / em > , < em > b7< / em > , < em > b8< / em > .
< p > Example:
< pre >
// {67C8770B-44F1-410A-AB9A-F9B5446F13EE}
TQUuid IID_MyInterface( 0x67c8770b, 0x44f1, 0x410a, 0xab, 0x9a, 0xf9, 0xb5, 0x44, 0x6f, 0x13, 0xee )
< / pre >
< h3 class = fn > < a name = "TQUuid-3" > < / a > TQUuid::TQUuid ( const < a href = "ntquuid.html" > TQUuid< / a > & orig )
< / h3 >
< p > Creates a copy of the TQUuid < em > orig< / em > .
< h3 class = fn > < a name = "TQUuid-4" > < / a > TQUuid::TQUuid ( const < a href = "tqstring.html" > TQString< / a > & text )
< / h3 >
Creates a TQUuid object from the string < em > text< / em > . 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.
< h3 class = fn > < a href = "ntquuid.html" > TQUuid< / a > < a name = "createUuid" > < / a > TQUuid::createUuid ()< tt > [static]< / tt >
< / h3 >
< p > Returns a new UUID of < a href = "#Variant-enum" > DCE< / a > variant, and < a href = "#Version-enum" > Random< / a > 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.
< p > On Windows, the new UUID is extremely likely to be unique on the
same or any other system, networked or not.
< p > < p > See also < a href = "#variant" > variant< / a > () and < a href = "#version" > version< / a > ().
< h3 class = fn > bool < a name = "isNull" > < / a > TQUuid::isNull () const
< / h3 >
Returns TRUE if this is the null UUID
{00000000-0000-0000-0000-000000000000}; otherwise returns FALSE.
< h3 class = fn > < a name = "operator-TQString" > < / a > TQUuid::operator TQString () const
< / h3 >
< p > Returns the string representation of the uuid.
< p > < p > See also < a href = "#toString" > toString< / a > ().
< h3 class = fn > bool < a name = "operator!-eq" > < / a > TQUuid::operator!= ( const < a href = "ntquuid.html" > TQUuid< / a > & other ) const
< / h3 >
< p > Returns TRUE if this TQUuid and the < em > other< / em > TQUuid are different;
otherwise returns FALSE.
< h3 class = fn > bool < a name = "operator-lt" > < / a > TQUuid::operator< ( const < a href = "ntquuid.html" > TQUuid< / a > & other ) const
< / h3 >
< p > Returns TRUE if this TQUuid is of the same variant,
and lexicographically before the < em > other< / em > TQUuid;
otherwise returns FALSE.
< p > < p > See also < a href = "#variant" > variant< / a > ().
< h3 class = fn > < a href = "ntquuid.html" > TQUuid< / a > & < a name = "operator-eq" > < / a > TQUuid::operator= ( const < a href = "ntquuid.html" > TQUuid< / a > & uuid )
< / h3 >
< p > Assigns the value of < em > uuid< / em > to this TQUuid object.
< h3 class = fn > bool < a name = "operator-eq-eq" > < / a > TQUuid::operator== ( const < a href = "ntquuid.html" > TQUuid< / a > & other ) const
< / h3 >
< p > Returns TRUE if this TQUuid and the < em > other< / em > TQUuid are identical;
otherwise returns FALSE.
< h3 class = fn > bool < a name = "operator-gt" > < / a > TQUuid::operator> ( const < a href = "ntquuid.html" > TQUuid< / a > & other ) const
< / h3 >
< p > Returns TRUE if this TQUuid is of the same variant,
and lexicographically after the < em > other< / em > TQUuid;
otherwise returns FALSE.
< p > < p > See also < a href = "#variant" > variant< / a > ().
< h3 class = fn > < a href = "tqstring.html" > TQString< / a > < a name = "toString" > < / a > TQUuid::toString () const
< / h3 >
< a href = "tqstring.html" > TQString< / a > < a href = "#toString" > TQUuid::toString< / a > () const
< p > Returns the string representation of the uuid.
< h3 class = fn > < a href = "ntquuid.html#Variant-enum" > TQUuid::Variant< / a > < a name = "variant" > < / a > TQUuid::variant () const
< / h3 >
< p > Returns the variant of the UUID.
The null UUID is considered to be of an unknown variant.
< p > < p > See also < a href = "#version" > version< / a > ().
< h3 class = fn > < a href = "ntquuid.html#Version-enum" > TQUuid::Version< / a > < a name = "version" > < / a > TQUuid::version () const
< / h3 >
< p > Returns the version of the UUID, if the UUID is of the DCE
variant; otherwise returns VerUnknown.
< p > < p > See also < a href = "#variant" > variant< / a > ().
< hr > < h2 > Related Functions< / h2 >
< h3 class = fn > < a href = "ntqdatastream.html" > TQDataStream< / a > & < a name = "operator-lt-lt" > < / a > operator< < ( < a href = "ntqdatastream.html" > TQDataStream< / a > & s, const < a href = "ntquuid.html" > TQUuid< / a > & id )
< / h3 >
Writes the uuid < em > id< / em > to the datastream < em > s< / em > .
< h3 class = fn > < a href = "ntqdatastream.html" > TQDataStream< / a > & < a name = "operator-gt-gt" > < / a > operator> > ( < a href = "ntqdatastream.html" > TQDataStream< / a > & s, < a href = "ntquuid.html" > TQUuid< / a > & id )
< / h3 >
Reads uuid from from the stream < em > s< / em > into < em > id< / em > .
<!-- eof -->
< hr > < p >
This file is part of the < a href = "index.html" > TQt toolkit< / a > .
Copyright © 1995-2007
< a href = "http://www.trolltech.com/" > Trolltech< / a > . All Rights Reserved.< p > < address > < hr > < div align = center >
< table width = 100% cellspacing = 0 border = 0 > < tr >
< td > Copyright © 2007
< a href = "troll.html" > Trolltech< / a > < td align = center > < a href = "trademarks.html" > Trademarks< / a >
< td align = right > < div align = right > TQt 3.3.8< / div >
< / table > < / div > < / address > < / body >
< / html >