File: quuid.html

package info (click to toggle)
python-qt4 4.0.1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 18,632 kB
  • ctags: 2,639
  • sloc: python: 29,409; sh: 5,646; cpp: 3,168; xml: 149; makefile: 109
file content (102 lines) | stat: -rw-r--r-- 10,602 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QUuid Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QUuid Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QUuid class stores a Universally Unique Identifier (UUID). <a href="#details">More...</a></p>
<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="quuid.html#Variant-enum">Variant</a></b> { VarUnknown, NCS, DCE, Microsoft, Reserved }</li><li><div class="fn" />enum <b><a href="quuid.html#Version-enum">Version</a></b> { VerUnknown, Time, EmbeddedPOSIX, Name, Random }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="quuid.html#QUuid">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="quuid.html#QUuid-2">__init__</a></b> (<i>self</i>, unsigned long&#160;<i>l</i>, unsigned long&#160;<i>w1</i>, unsigned long&#160;<i>w2</i>, char&#160;<i>b1</i>, char&#160;<i>b2</i>, char&#160;<i>b3</i>, char&#160;<i>b4</i>, char&#160;<i>b5</i>, char&#160;<i>b6</i>, char&#160;<i>b7</i>, char&#160;<i>b8</i>)</li><li><div class="fn" /><b><a href="quuid.html#QUuid-3">__init__</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="quuid.html#QUuid-4">__init__</a></b> (<i>self</i>, QUuid)</li><li><div class="fn" />bool <b><a href="quuid.html#isNull">isNull</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="quuid.html#toString">toString</a></b> (<i>self</i>)</li><li><div class="fn" />Variant <b><a href="quuid.html#variant">variant</a></b> (<i>self</i>)</li><li><div class="fn" />Version <b><a href="quuid.html#version">version</a></b> (<i>self</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />QUuid <b><a href="quuid.html#createUuid">createUuid</a></b> ()</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="quuid.html#__eq__">__eq__</a></b> (<i>self</i>, QUuid&#160;<i>orig</i>)</li><li><div class="fn" />bool <b><a href="quuid.html#__gt__">__gt__</a></b> (<i>self</i>, QUuid&#160;<i>other</i>)</li><li><div class="fn" />bool <b><a href="quuid.html#__lt__">__lt__</a></b> (<i>self</i>, QUuid&#160;<i>other</i>)</li><li><div class="fn" />bool <b><a href="quuid.html#__ne__">__ne__</a></b> (<i>self</i>, QUuid&#160;<i>orig</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QUuid class stores 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>
<p>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, <tt>uuidgen</tt> and <tt>guidgen</tt>.</p>
<p>UUIDs generated by QUuid, are based on the <tt>Random</tt> version of the <tt>DCE</tt> (Distributed Computing Environment) standard.</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>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Variant-enum" />QUuid.Variant</h3><p>This enum defines the variant of the UUID, which is the scheme which defines the layout of the 128-bits value.</p>
<table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QUuid.VarUnknown</tt></td>
<td align="center" valign="top"><tt>-1</tt></td>
<td valign="top">Variant is unknown</td>
</tr>
<tr>
<td valign="top"><tt>QUuid.NCS</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
<td valign="top">Reserved for NCS (Network Computing System) backward compatibility</td>
</tr>
<tr>
<td valign="top"><tt>QUuid.DCE</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
<td valign="top">Distributed Computing Environment, the scheme used by <a href="quuid.html">QUuid</a></td>
</tr>
<tr>
<td valign="top"><tt>QUuid.Microsoft</tt></td>
<td align="center" valign="top"><tt>6</tt></td>
<td valign="top">Reserved for Microsoft backward compatibility (GUID)</td>
</tr>
<tr>
<td valign="top"><tt>QUuid.Reserved</tt></td>
<td align="center" valign="top"><tt>7</tt></td>
<td valign="top">Reserved for future definition</td>
</tr>
</table>
<br />
<br />
<h3 class="fn"><a name="Version-enum" />QUuid.Version</h3><p>This enum defines the version of the UUID.</p>
<table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QUuid.VerUnknown</tt></td>
<td align="center" valign="top"><tt>-1</tt></td>
<td valign="top">Version is unknown</td>
</tr>
<tr>
<td valign="top"><tt>QUuid.Time</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
<td valign="top">Time-based, by using timestamp, clock sequence, and MAC network card address (if available) for the node sections</td>
</tr>
<tr>
<td valign="top"><tt>QUuid.EmbeddedPOSIX</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
<td valign="top">DCE Security version, with embedded POSIX UUIDs</td>
</tr>
<tr>
<td valign="top"><tt>QUuid.Name</tt></td>
<td align="center" valign="top"><tt>3</tt></td>
<td valign="top">Name-based, by using values from a name for all sections</td>
</tr>
<tr>
<td valign="top"><tt>QUuid.Random</tt></td>
<td align="center" valign="top"><tt>4</tt></td>
<td valign="top">Random-based, by using random numbers for all sections</td>
</tr>
</table>
<br />
<br />
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QUuid" />QUuid.__init__ (<i>self</i>)</h3><p>Creates the null UUID {00000000-0000-0000-0000-000000000000}.</p>
<h3 class="fn"><a name="QUuid-2" />QUuid.__init__ (<i>self</i>, unsigned long&#160;<i>l</i>, unsigned long&#160;<i>w1</i>, unsigned long&#160;<i>w2</i>, char&#160;<i>b1</i>, char&#160;<i>b2</i>, char&#160;<i>b3</i>, char&#160;<i>b4</i>, char&#160;<i>b5</i>, char&#160;<i>b6</i>, char&#160;<i>b7</i>, char&#160;<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>
    // {67C8770B-44F1-410A-AB9A-F9B5446F13EE}
    QUuid IID_MyInterface(0x67c8770b, 0x44f1, 0x410a, 0xab, 0x9a, 0xf9, 0xb5, 0x44, 0x6f, 0x13, 0xee)
</pre>
<h3 class="fn"><a name="QUuid-3" />QUuid.__init__ (<i>self</i>, <a href="qstring.html">QString</a>)</h3><p>Creates a <a href="quuid.html">QUuid</a> object from the string <i>text</i>. 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.</p>
<h3 class="fn"><a name="QUuid-4" />QUuid.__init__ (<i>self</i>, <a href="quuid.html">QUuid</a>)</h3><h3 class="fn"><a name="createUuid" /><a href="quuid.html">QUuid</a> QUuid.createUuid ()</h3><p>Returns a new UUID of <tt>DCE</tt> variant, and <tt>Random</tt> 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>
<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="quuid.html#variant">variant</a>() and <a href="quuid.html#version">version</a>().</p>
<h3 class="fn"><a name="isNull" />bool QUuid.isNull (<i>self</i>)</h3><p>Returns true if this is the null UUID {00000000-0000-0000-0000-000000000000}; otherwise returns false.</p>
<h3 class="fn"><a name="toString" /><a href="qstring.html">QString</a> QUuid.toString (<i>self</i>)</h3><p>Returns the string representation of the uuid.</p>
<h3 class="fn"><a name="variant" /><a href="quuid.html#Variant-enum">Variant</a> QUuid.variant (<i>self</i>)</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="quuid.html#version">version</a>().</p>
<h3 class="fn"><a name="version" /><a href="quuid.html#Version-enum">Version</a> QUuid.version (<i>self</i>)</h3><p>Returns the version of the UUID, if the UUID is of the DCE variant; otherwise returns <a href="quuid.html#Version-enum">VerUnknown</a>.</p>
<p>See also <a href="quuid.html#variant">variant</a>().</p>
<h3 class="fn"><a name="__eq__" />bool QUuid.__eq__ (<i>self</i>, <a href="quuid.html">QUuid</a>&#160;<i>orig</i>)</h3><h3 class="fn"><a name="__gt__" />bool QUuid.__gt__ (<i>self</i>, <a href="quuid.html">QUuid</a>&#160;<i>other</i>)</h3><h3 class="fn"><a name="__lt__" />bool QUuid.__lt__ (<i>self</i>, <a href="quuid.html">QUuid</a>&#160;<i>other</i>)</h3><h3 class="fn"><a name="__ne__" />bool QUuid.__ne__ (<i>self</i>, <a href="quuid.html">QUuid</a>&#160;<i>orig</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt&#160;4.0.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.trolltech.com">Trolltech&#160;AS</a> 2006</td><td align="right" width="25%">Qt&#160;4.1.4</td></tr></table></div></address></body></html>