Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 6964

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- quuid.cpp -->
  <title>Qt 4.8: QUuid Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtcore.html">QtCore</a></li>
<li>QUuid</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QUuid Class Reference</h1>
<!-- $$$QUuid-brief -->
<p>The QUuid class stores a Universally Unique Identifier (UUID). <a href="#details">More...</a></p>
<!-- @@@QUuid -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QUuid&gt;</span></pre><p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
<ul>
<li><a href="quuid-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#Variant-enum">Variant</a></b> { VarUnknown, NCS, DCE, Microsoft, Reserved }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#Version-enum">Version</a></b> { VerUnknown, Time, EmbeddedPOSIX, Name, Random }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#QUuid">QUuid</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#QUuid-2">QUuid</a></b> ( uint <i>l</i>, ushort <i>w1</i>, ushort <i>w2</i>, uchar <i>b1</i>, uchar <i>b2</i>, uchar <i>b3</i>, uchar <i>b4</i>, uchar <i>b5</i>, uchar <i>b6</i>, uchar <i>b7</i>, uchar <i>b8</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#QUuid-3">QUuid</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#QUuid-5">QUuid</a></b> ( const QByteArray &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#QUuid-6">QUuid</a></b> ( const GUID &amp; <i>guid</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#isNull">isNull</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#toByteArray">toByteArray</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#toRfc4122">toRfc4122</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#toString">toString</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QUuid::Variant </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#variant">variant</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QUuid::Version </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#version">version</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#operator-GUID">operator GUID</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#operator-QString">operator QString</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#operator-not-eq">operator!=</a></b> ( const QUuid &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#operator-not-eq-2">operator!=</a></b> ( const GUID &amp; <i>guid</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#operator-lt">operator&lt;</a></b> ( const QUuid &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QUuid &amp; </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#operator-eq">operator=</a></b> ( const GUID &amp; <i>guid</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#operator-eq-eq">operator==</a></b> ( const QUuid &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#operator-eq-eq-2">operator==</a></b> ( const GUID &amp; <i>guid</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#operator-gt">operator&gt;</a></b> ( const QUuid &amp; <i>other</i> ) const</td></tr>
</table>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QUuid </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#createUuid">createUuid</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QUuid </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#fromRfc4122">fromRfc4122</a></b> ( const QByteArray &amp; <i>bytes</i> )</td></tr>
</table>
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp; </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#operator-lt-lt-124">operator&lt;&lt;</a></b> ( QDataStream &amp; <i>s</i>, const QUuid &amp; <i>id</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp; </td><td class="memItemRight bottomAlign"><b><a href="quuid.html#operator-gt-gt-65">operator&gt;&gt;</a></b> ( QDataStream &amp; <i>s</i>, QUuid &amp; <i>id</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QUuid-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QUuid class stores a Universally Unique Identifier (UUID).</p>
<p>Using <i>U</i>niversally <i>U</i>nique <i>ID</i>entifiers (UUID) is a standard way to uniquely identify entities in a distributed computing environment. A UUID is a 16-byte (128-bit) number generated by some algorithm that is meant to guarantee that the UUID will be unique in the distributed computing environment where it is used. The acronym GUID is often used instead, <i>G</i>lobally <i>U</i>nique <i>ID</i>entifiers, but it refers to the same thing.</p>
<a name="variant-field"></a><p>Actually, the GUID is one <i>variant</i> of UUID. Multiple variants are in use. Each UUID contains a bit field that specifies which type (variant) of UUID it is. Call <a href="quuid.html#variant">variant</a>() to discover which type of UUID an instance of QUuid contains. It extracts the three most signifcant bits of byte 8 of the 16 bytes. In QUuid, byte 8 is <tt>QUuid::data4[0]</tt>. If you create instances of QUuid using the constructor that accepts all the numeric values as parameters, use the following table to set the three most significant bits of parameter <tt>b1</tt>, which becomes <tt>QUuid::data4[0]</tt> and contains the variant field in its three most significant bits. In the table, 'x' means <i>don't care</i>.</p>
<table class="generic">
<thead><tr class="qt-style"><th >msb0</th><th >msb1</th><th >msb2</th><th >Variant</th></tr></thead>
<tr valign="top" class="odd"><td >0</td><td >x</td><td >x</td><td >NCS (Network Computing System)</td></tr>
<tr valign="top" class="even"><td >1</td><td >0</td><td >x</td><td >DCE (Distributed Computing Environment)</td></tr>
<tr valign="top" class="odd"><td >1</td><td >1</td><td >0</td><td >Microsoft (GUID)</td></tr>
<tr valign="top" class="even"><td >1</td><td >1</td><td >1</td><td >Reserved for future expansion</td></tr>
</table>
<a name="version-field"></a><p>If <a href="quuid.html#variant">variant</a>() returns <a href="quuid.html#Variant-enum">QUuid::DCE</a>, the UUID also contains a <i>version</i> field in the four most significant bits of <tt>QUuid::data3</tt>, and you can call <a href="quuid.html#version">version</a>() to discover which version your QUuid contains. If you create instances of QUuid using the constructor that accepts all the numeric values as parameters, use the following table to set the four most significant bits of parameter <tt>w2</tt>, which becomes <tt>QUuid::data3</tt> and contains the version field in its four most significant bits.</p>
<table class="generic">
<thead><tr class="qt-style"><th >msb0</th><th >msb1</th><th >msb2</th><th >msb3</th><th >Version</th></tr></thead>
<tr valign="top" class="odd"><td >0</td><td >0</td><td >0</td><td >1</td><td >Time</td></tr>
<tr valign="top" class="even"><td >0</td><td >0</td><td >1</td><td >0</td><td >Embedded POSIX</td></tr>
<tr valign="top" class="odd"><td >0</td><td >0</td><td >1</td><td >1</td><td >Name</td></tr>
<tr valign="top" class="even"><td >0</td><td >1</td><td >0</td><td >0</td><td >Random</td></tr>
</table>
<p>The field layouts for the DCE versions listed in the table above are specified in the <a href="http://www.ietf.org/rfc/rfc4122.txt">Network Working Group UUID Specification</a>.</p>
<p>Most platforms provide a tool for generating new UUIDs, e.g&#x2e; <tt>uuidgen</tt> and <tt>guidgen</tt>. You can also use <a href="quuid.html#createUuid">createUuid</a>(). UUIDs generated by <a href="quuid.html#createUuid">createUuid</a>() are of the random type. Their <a href="quuid.html#Version-enum">QUuid::Version</a> bits are set to <a href="quuid.html#Version-enum">QUuid::Random</a>, and their <a href="quuid.html#Variant-enum">QUuid::Variant</a> bits are set to <a href="quuid.html#Variant-enum">QUuid::DCE</a>. The rest of the UUID is composed of random numbers. Theoretically, this means there is a small chance that a UUID generated by <a href="quuid.html#createUuid">createUuid</a>() will not be unique. But it is <a href="http://en.wikipedia.org/wiki/Universally_Unique_Identifier#Random_UUID_probability_of_duplicates">a <i>very</i> small chance</a>.</p>
<p>UUIDs can be constructed from numeric values or from strings, or using the static <a href="quuid.html#createUuid">createUuid</a>() function. They can be converted to a string with <a href="quuid.html#toString">toString</a>(). UUIDs have a <a href="quuid.html#variant">variant</a>() and a <a href="quuid.html#version">version</a>(), and null UUIDs return true from <a href="quuid.html#isNull">isNull</a>().</p>
</div>
<!-- @@@QUuid -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Variant$$$VarUnknown$$$NCS$$$DCE$$$Microsoft$$$Reserved -->
<h3 class="fn"><a name="Variant-enum"></a>enum QUuid::<span class="name">Variant</span></h3>
<p>This enum defines the values used in the <a href="quuid.html#variant-field">variant field</a> of the UUID. The value in the variant field determines the layout of the 128-bit value.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QUuid::VarUnknown</tt></td><td class="topAlign"><tt>-1</tt></td><td class="topAlign">Variant is unknown</td></tr>
<tr><td class="topAlign"><tt>QUuid::NCS</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Reserved for NCS (Network Computing System) backward compatibility</td></tr>
<tr><td class="topAlign"><tt>QUuid::DCE</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Distributed Computing Environment, the scheme used by <a href="quuid.html">QUuid</a></td></tr>
<tr><td class="topAlign"><tt>QUuid::Microsoft</tt></td><td class="topAlign"><tt>6</tt></td><td class="topAlign">Reserved for Microsoft backward compatibility (GUID)</td></tr>
<tr><td class="topAlign"><tt>QUuid::Reserved</tt></td><td class="topAlign"><tt>7</tt></td><td class="topAlign">Reserved for future definition</td></tr>
</table>
<!-- @@@Variant -->
<!-- $$$Version$$$VerUnknown$$$Time$$$EmbeddedPOSIX$$$Name$$$Random -->
<h3 class="fn"><a name="Version-enum"></a>enum QUuid::<span class="name">Version</span></h3>
<p>This enum defines the values used in the <a href="quuid.html#version-field">version field</a> of the UUID. The version field is meaningful only if the value in the <a href="quuid.html#variant-field">variant field</a> is <a href="quuid.html#Variant-enum">QUuid::DCE</a>.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QUuid::VerUnknown</tt></td><td class="topAlign"><tt>-1</tt></td><td class="topAlign">Version is unknown</td></tr>
<tr><td class="topAlign"><tt>QUuid::Time</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Time-based, by using timestamp, clock sequence, and MAC network card address (if available) for the node sections</td></tr>
<tr><td class="topAlign"><tt>QUuid::EmbeddedPOSIX</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">DCE Security version, with embedded POSIX UUIDs</td></tr>
<tr><td class="topAlign"><tt>QUuid::Name</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">Name-based, by using values from a name for all sections</td></tr>
<tr><td class="topAlign"><tt>QUuid::Random</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">Random-based, by using random numbers for all sections</td></tr>
</table>
<!-- @@@Version -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QUuid[overload1]$$$QUuid -->
<h3 class="fn"><a name="QUuid"></a>QUuid::<span class="name">QUuid</span> ()</h3>
<p>Creates the null UUID. <a href="quuid.html#toString">toString</a>() will output the null UUID as &quot;{00000000-0000-0000-0000-000000000000}&quot;.</p>
<!-- @@@QUuid -->
<!-- $$$QUuid$$$QUuiduintushortushortucharucharucharucharucharucharucharuchar -->
<h3 class="fn"><a name="QUuid-2"></a>QUuid::<span class="name">QUuid</span> ( <span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span> <i>l</i>, <span class="type"><a href="qtglobal.html#ushort-typedef">ushort</a></span> <i>w1</i>, <span class="type"><a href="qtglobal.html#ushort-typedef">ushort</a></span> <i>w2</i>, <span class="type"><a href="qtglobal.html#uchar-typedef">uchar</a></span> <i>b1</i>, <span class="type"><a href="qtglobal.html#uchar-typedef">uchar</a></span> <i>b2</i>, <span class="type"><a href="qtglobal.html#uchar-typedef">uchar</a></span> <i>b3</i>, <span class="type"><a href="qtglobal.html#uchar-typedef">uchar</a></span> <i>b4</i>, <span class="type"><a href="qtglobal.html#uchar-typedef">uchar</a></span> <i>b5</i>, <span class="type"><a href="qtglobal.html#uchar-typedef">uchar</a></span> <i>b6</i>, <span class="type"><a href="qtglobal.html#uchar-typedef">uchar</a></span> <i>b7</i>, <span class="type"><a href="qtglobal.html#uchar-typedef">uchar</a></span> <i>b8</i> )</h3>
<p>Creates a UUID with the value specified by the parameters, <i>l</i>, <i>w1</i>, <i>w2</i>, <i>b1</i>, <i>b2</i>, <i>b3</i>, <i>b4</i>, <i>b5</i>, <i>b6</i>, <i>b7</i>, <i>b8</i>.</p>
<p>Example:</p>
<pre class="cpp"> <span class="comment">// {67C8770B-44F1-410A-AB9A-F9B5446F13EE}</span>
 <span class="type"><a href="quuid.html">QUuid</a></span> IID_MyInterface(<span class="number">0x67c8770b</span><span class="operator">,</span> <span class="number">0x44f1</span><span class="operator">,</span> <span class="number">0x410a</span><span class="operator">,</span> <span class="number">0xab</span><span class="operator">,</span> <span class="number">0x9a</span><span class="operator">,</span> <span class="number">0xf9</span><span class="operator">,</span> <span class="number">0xb5</span><span class="operator">,</span> <span class="number">0x44</span><span class="operator">,</span> <span class="number">0x6f</span><span class="operator">,</span> <span class="number">0x13</span><span class="operator">,</span> <span class="number">0xee</span>)</pre>
<!-- @@@QUuid -->
<!-- $$$QUuid$$$QUuidconstQString& -->
<h3 class="fn"><a name="QUuid-3"></a>QUuid::<span class="name">QUuid</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> )</h3>
<p>Creates a <a href="quuid.html">QUuid</a> object from the string <i>text</i>, which must be formatted as five hex fields separated by '-', e.g&#x2e;, &quot;{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}&quot; where 'x' is a hex digit. The curly braces shown here are optional, but it is normal to include them. If the conversion fails, a null UUID is created. See <a href="quuid.html#toString">toString</a>() for an explanation of how the five hex fields map to the public data members in <a href="quuid.html">QUuid</a>.</p>
<p><b>See also </b><a href="quuid.html#toString">toString</a>() and <a href="quuid.html#QUuid">QUuid</a>().</p>
<!-- @@@QUuid -->
<!-- $$$QUuid$$$QUuidconstQByteArray& -->
<h3 class="fn"><a name="QUuid-5"></a>QUuid::<span class="name">QUuid</span> ( const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp; <i>text</i> )</h3>
<p>Creates a <a href="quuid.html">QUuid</a> object from the <a href="qbytearray.html">QByteArray</a> <i>text</i>, which must be formatted as five hex fields separated by '-', e.g&#x2e;, &quot;{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}&quot; where 'x' is a hex digit. The curly braces shown here are optional, but it is normal to include them. If the conversion fails, a null UUID is created. See <a href="quuid.html#toByteArray">toByteArray</a>() for an explanation of how the five hex fields map to the public data members in <a href="quuid.html">QUuid</a>.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also </b><a href="quuid.html#toByteArray">toByteArray</a>() and <a href="quuid.html#QUuid">QUuid</a>().</p>
<!-- @@@QUuid -->
<!-- $$$QUuid$$$QUuidconstGUID& -->
<h3 class="fn"><a name="QUuid-6"></a>QUuid::<span class="name">QUuid</span> ( const <span class="type">GUID</span> &amp; <i>guid</i> )</h3>
<p>Casts a Windows <i>guid</i> to a Qt <a href="quuid.html">QUuid</a>.</p>
<p><b>Warning:</b> This function is only for Windows platforms.</p>
<!-- @@@QUuid -->
<!-- $$$createUuid[overload1]$$$createUuid -->
<h3 class="fn"><a name="createUuid"></a><span class="type">QUuid</span> QUuid::<span class="name">createUuid</span> ()<tt> [static]</tt></h3>
<p>On any platform other than Windows, this function returns a new UUID with variant <a href="quuid.html#Variant-enum">QUuid::DCE</a> and version <a href="quuid.html#Version-enum">QUuid::Random</a>. If the /dev/urandom device exists, then the numbers used to construct the UUID will be of cryptographic quality, which will make the UUID unique. Otherwise, the numbers of the UUID will be obtained from the local pseudo-random number generator (<a href="qtglobal.html#qrand">qrand</a>(), which is seeded by <a href="qtglobal.html#qsrand">qsrand</a>()) which is usually not of cryptograhic quality, which means that the UUID can't be guaranteed to be unique.</p>
<p>On a Windows platform, a GUID is generated, which almost certainly <i>will</i> be unique, on this or any other system, networked or not.</p>
<p><b>See also </b><a href="quuid.html#variant">variant</a>() and <a href="quuid.html#version">version</a>().</p>
<!-- @@@createUuid -->
<!-- $$$fromRfc4122[overload1]$$$fromRfc4122constQByteArray& -->
<h3 class="fn"><a name="fromRfc4122"></a><span class="type">QUuid</span> QUuid::<span class="name">fromRfc4122</span> ( const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp; <i>bytes</i> )<tt> [static]</tt></h3>
<p>Creates a <a href="quuid.html">QUuid</a> object from the binary representation of the UUID given by <i>bytes</i>, as specified by RFC 4122 section 4.1&#x2e;2&#x2e; See <a href="quuid.html#toRfc4122">toRfc4122</a>() for a further explanation of the order of bytes required.</p>
<p>The byte array accepted is <i>not</i> a human readable format.</p>
<p>If the conversion fails, a null UUID is created.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also </b><a href="quuid.html#toRfc4122">toRfc4122</a>() and <a href="quuid.html#QUuid">QUuid</a>().</p>
<!-- @@@fromRfc4122 -->
<!-- $$$isNull[overload1]$$$isNull -->
<h3 class="fn"><a name="isNull"></a><span class="type">bool</span> QUuid::<span class="name">isNull</span> () const</h3>
<p>Returns true if this is the null UUID {00000000-0000-0000-0000-000000000000}; otherwise returns false.</p>
<!-- @@@isNull -->
<!-- $$$toByteArray[overload1]$$$toByteArray -->
<h3 class="fn"><a name="toByteArray"></a><span class="type"><a href="qbytearray.html">QByteArray</a></span> QUuid::<span class="name">toByteArray</span> () const</h3>
<p>Returns the binary representation of this <a href="quuid.html">QUuid</a>. The byte array is formatted as five hex fields separated by '-' and enclosed in curly braces, i.e&#x2e;, &quot;{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}&quot; where 'x' is a hex digit. From left to right, the five hex fields are obtained from the four public data members in <a href="quuid.html">QUuid</a> as follows:</p>
<table class="generic">
<thead><tr class="qt-style"><th >Field #</th><th >Source</th></tr></thead>
<tr valign="top" class="odd"><td >1</td><td >data1</td></tr>
<tr valign="top" class="even"><td >2</td><td >data2</td></tr>
<tr valign="top" class="odd"><td >3</td><td >data3</td></tr>
<tr valign="top" class="even"><td >4</td><td >data4[0] .. data4[1]</td></tr>
<tr valign="top" class="odd"><td >5</td><td >data4[2] .. data4[7]</td></tr>
</table>
<p>This function was introduced in Qt 4.8.</p>
<!-- @@@toByteArray -->
<!-- $$$toRfc4122[overload1]$$$toRfc4122 -->
<h3 class="fn"><a name="toRfc4122"></a><span class="type"><a href="qbytearray.html">QByteArray</a></span> QUuid::<span class="name">toRfc4122</span> () const</h3>
<p>Returns the binary representation of this <a href="quuid.html">QUuid</a>. The byte array is in big endian format, and formatted according to RFC 4122, section 4.1&#x2e;2 - &quot;Layout and byte order&quot;.</p>
<p>The order is as follows:</p>
<table class="generic">
<thead><tr class="qt-style"><th >Field #</th><th >Source</th></tr></thead>
<tr valign="top" class="odd"><td >1</td><td >data1</td></tr>
<tr valign="top" class="even"><td >2</td><td >data2</td></tr>
<tr valign="top" class="odd"><td >3</td><td >data3</td></tr>
<tr valign="top" class="even"><td >4</td><td >data4[0] .. data4[7]</td></tr>
</table>
<p>This function was introduced in Qt 4.8.</p>
<!-- @@@toRfc4122 -->
<!-- $$$toString[overload1]$$$toString -->
<h3 class="fn"><a name="toString"></a><span class="type"><a href="qstring.html">QString</a></span> QUuid::<span class="name">toString</span> () const</h3>
<p>Returns the string representation of this <a href="quuid.html">QUuid</a>. The string is formatted as five hex fields separated by '-' and enclosed in curly braces, i.e&#x2e;, &quot;{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}&quot; where 'x' is a hex digit. From left to right, the five hex fields are obtained from the four public data members in <a href="quuid.html">QUuid</a> as follows:</p>
<table class="generic">
<thead><tr class="qt-style"><th >Field #</th><th >Source</th></tr></thead>
<tr valign="top" class="odd"><td >1</td><td >data1</td></tr>
<tr valign="top" class="even"><td >2</td><td >data2</td></tr>
<tr valign="top" class="odd"><td >3</td><td >data3</td></tr>
<tr valign="top" class="even"><td >4</td><td >data4[0] .. data4[1]</td></tr>
<tr valign="top" class="odd"><td >5</td><td >data4[2] .. data4[7]</td></tr>
</table>
<!-- @@@toString -->
<!-- $$$variant[overload1]$$$variant -->
<h3 class="fn"><a name="variant"></a><span class="type"><a href="quuid.html#Variant-enum">QUuid::Variant</a></span> QUuid::<span class="name">variant</span> () const</h3>
<p>Returns the value in the <a href="quuid.html#variant-field">variant field</a> of the UUID. If the return value is <a href="quuid.html#Variant-enum">QUuid::DCE</a>, call <a href="quuid.html#version">version</a>() to see which layout it uses. The null UUID is considered to be of an unknown variant.</p>
<p><b>See also </b><a href="quuid.html#version">version</a>().</p>
<!-- @@@variant -->
<!-- $$$version[overload1]$$$version -->
<h3 class="fn"><a name="version"></a><span class="type"><a href="quuid.html#Version-enum">QUuid::Version</a></span> QUuid::<span class="name">version</span> () const</h3>
<p>Returns the <a href="quuid.html#version-field">version field</a> of the UUID, if the UUID's <a href="quuid.html#variant-field">variant field</a> is <a href="quuid.html#Variant-enum">QUuid::DCE</a>. Otherwise it returns <a href="quuid.html#Version-enum">QUuid::VerUnknown</a>.</p>
<p><b>See also </b><a href="quuid.html#variant">variant</a>().</p>
<!-- @@@version -->
<!-- $$$operator GUID[overload1]$$$operator GUID -->
<h3 class="fn"><a name="operator-GUID"></a>QUuid::<span class="name">operator GUID</span> () const</h3>
<p>Returns a Windows GUID from a <a href="quuid.html">QUuid</a>.</p>
<p><b>Warning:</b> This function is only for Windows platforms.</p>
<!-- @@@operator GUID -->
<!-- $$$operator QString[overload1]$$$operator QString -->
<h3 class="fn"><a name="operator-QString"></a>QUuid::<span class="name">operator QString</span> () const</h3>
<p>Returns the string representation of the uuid.</p>
<p><b>See also </b><a href="quuid.html#toString">toString</a>().</p>
<!-- @@@operator QString -->
<!-- $$$operator!=[overload1]$$$operator!=constQUuid& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QUuid::<span class="name">operator!=</span> ( const <span class="type">QUuid</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this <a href="quuid.html">QUuid</a> and the <i>other</i> <a href="quuid.html">QUuid</a> are different; otherwise returns false.</p>
<!-- @@@operator!= -->
<!-- $$$operator!=$$$operator!=constGUID& -->
<h3 class="fn"><a name="operator-not-eq-2"></a><span class="type">bool</span> QUuid::<span class="name">operator!=</span> ( const <span class="type">GUID</span> &amp; <i>guid</i> ) const</h3>
<p>Returns true if this UUID is not equal to the Windows GUID <i>guid</i>; otherwise returns false.</p>
<!-- @@@operator!= -->
<!-- $$$operator<[overload1]$$$operator<constQUuid& -->
<h3 class="fn"><a name="operator-lt"></a><span class="type">bool</span> QUuid::<span class="name">operator&lt;</span> ( const <span class="type">QUuid</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this <a href="quuid.html">QUuid</a> has the same <a href="quuid.html#variant-field">variant field</a> as the <i>other</i> <a href="quuid.html">QUuid</a> and is lexicographically <i>before</i> the <i>other</i> <a href="quuid.html">QUuid</a>. If the <i>other</i> <a href="quuid.html">QUuid</a> has a different variant field, the return value is determined by comparing the two <a href="quuid.html#Variant-enum">variants</a>.</p>
<p><b>See also </b><a href="quuid.html#variant">variant</a>().</p>
<!-- @@@operator< -->
<!-- $$$operator=[overload1]$$$operator=constGUID& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">QUuid</span> &amp; QUuid::<span class="name">operator=</span> ( const <span class="type">GUID</span> &amp; <i>guid</i> )</h3>
<p>Assigns a Windows <i>guid</i> to a Qt <a href="quuid.html">QUuid</a>.</p>
<p><b>Warning:</b> This function is only for Windows platforms.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQUuid& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QUuid::<span class="name">operator==</span> ( const <span class="type">QUuid</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this <a href="quuid.html">QUuid</a> and the <i>other</i> <a href="quuid.html">QUuid</a> are identical; otherwise returns false.</p>
<!-- @@@operator== -->
<!-- $$$operator==$$$operator==constGUID& -->
<h3 class="fn"><a name="operator-eq-eq-2"></a><span class="type">bool</span> QUuid::<span class="name">operator==</span> ( const <span class="type">GUID</span> &amp; <i>guid</i> ) const</h3>
<p>Returns true if this UUID is equal to the Windows GUID <i>guid</i>; otherwise returns false.</p>
<!-- @@@operator== -->
<!-- $$$operator>[overload1]$$$operator>constQUuid& -->
<h3 class="fn"><a name="operator-gt"></a><span class="type">bool</span> QUuid::<span class="name">operator&gt;</span> ( const <span class="type">QUuid</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this <a href="quuid.html">QUuid</a> has the same <a href="quuid.html#variant-field">variant field</a> as the <i>other</i> <a href="quuid.html">QUuid</a> and is lexicographically <i>after</i> the <i>other</i> <a href="quuid.html">QUuid</a>. If the <i>other</i> <a href="quuid.html">QUuid</a> has a different variant field, the return value is determined by comparing the two <a href="quuid.html#Variant-enum">variants</a>.</p>
<p><b>See also </b><a href="quuid.html#variant">variant</a>().</p>
<!-- @@@operator> -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$operator<<$$$operator<<QDataStream&constQUuid& -->
<h3 class="fn"><a name="operator-lt-lt-124"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <span class="name">operator&lt;&lt;</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <i>s</i>, const <span class="type">QUuid</span> &amp; <i>id</i> )</h3>
<p>Writes the UUID <i>id</i> to the data stream <i>s</i>.</p>
<!-- @@@operator<< -->
<!-- $$$operator>>$$$operator>>QDataStream&QUuid& -->
<h3 class="fn"><a name="operator-gt-gt-65"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <span class="name">operator&gt;&gt;</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <i>s</i>, <span class="type">QUuid</span> &amp; <i>id</i> )</h3>
<p>Reads a UUID from the stream <i>s</i> into <i>id</i>.</p>
<!-- @@@operator>> -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>