<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # QUuid Class Reference ## [[QtCore](index.htm) module] 該QUuid類存儲通用唯一標識符(UUID) 。[More...](#details) ### Types * `enum Variant { VarUnknown, NCS, DCE, Microsoft, Reserved }` * `enum Version { VerUnknown, Time, EmbeddedPOSIX, Name, Random }` ### Methods * `__init__ (self)` * `__init__ (self, int?l, int?w1, int?w2, str?b1, str?b2, str?b3, str?b4, str?b5, str?b6, str?b7, str?b8)` * `__init__ (self, QString)` * `__init__ (self, QByteArray)` * `__init__ (self, QUuid)` * `bool isNull (self)` * `QByteArray toByteArray (self)` * `QByteArray toRfc4122 (self)` * `QString toString (self)` * `Variant variant (self)` * `Version version (self)` ### Static Methods * `QUuid createUuid ()` * `QUuid fromRfc4122 (QByteArray)` ### Special Methods * `bool __eq__ (self, QUuid?orig)` * `bool __ge__ (self, QUuid?other)` * `bool __gt__ (self, QUuid?other)` * `bool __le__ (self, QUuid?other)` * `bool __lt__ (self, QUuid?other)` * `bool __ne__ (self, QUuid?orig)` * `str __repr__ (self)` * * * ## Detailed Description 該QUuid類存儲通用唯一標識符(UUID) 。 Using _U_niversally_U_NIQUE_ID_entifiers ( UUID)是一種標準的方式來唯一地標識在分布式計算環境中的實體。 UUID是一個由一些算法,是為了保證該UUID將是唯一的在那里它被用來在分布式計算環境中產生的16字節(128位)的數目。首字母縮寫詞的GUID通常用來代替,_G_lobally_U_NIQUE_ID_entifiers ,但它指的是同一件事。 實際上,該GUID是1_variant_的UUID。多個變體都在使用。每個UUID包含一個位域,指定它是UUID的類型(變種) 。通話[variant](quuid.html#variant)()來發現哪些類型的UUID QUuid的實例包含的內容。它提取的16個字節的字節8的三個最signifcant比特。在QUuid ,字節是8`QUuid.data4[0]`。如果您使用接受所有的數值作為參數的構造函數中創建QUuid的實例,請使用下表來設置參數的三個最顯著的位`b1`,成為`QUuid.data4[0]`并包含在它的三個最顯著位變體領域。在該表中, “ X”表示_don't care_。 | msb0 | msb1 | msb2 | Variant | | --- | --- | --- | --- | | 0 | x | x | NCS (Network Computing System) | | 1 | 0 | x | DCE (Distributed Computing Environment) | | 1 | 1 | 0 | Microsoft (GUID) | | 1 | 1 | 1 | Reserved for future expansion | If [variant](quuid.html#variant)()返回[QUuid.DCE](quuid.html#Variant-enum),的UUID還包含一個_version_中的四個最顯著的位場`QUuid.data3`,你可以調用[version](quuid.html#version)( )來發現哪個版本的QUuid包含。如果您使用接受所有的數值作為參數的構造函數中創建QUuid的實例,請使用下表來設置參數的四個最顯著的位`w2`,成為`QUuid.data3`并包含在其四個最顯著位版本字段。 | msb0 | msb1 | msb2 | msb3 | Version | | --- | --- | --- | --- | --- | | 0 | 0 | 0 | 1 | Time | | 0 | 0 | 1 | 0 | Embedded POSIX | | 0 | 0 | 1 | 1 | Name | | 0 | 1 | 0 | 0 | Random | 現場布局在表中列出的DCE版本在指定的[Network Working Group UUID Specification](http://www.ietf.org/rfc/rfc4122.txt)。 大多數平臺上生成新的UUID ,例如提供一個工具`uuidgen`和`guidgen`。您也可以使用[createUuid](quuid.html#createUuid)( ) 。所產生的UUID[createUuid](quuid.html#createUuid)()是隨機型。他們的[QUuid.Version](quuid.html#Version-enum)位被設置為[QUuid.Random](quuid.html#Version-enum),和它們的[QUuid.Variant](quuid.html#Variant-enum)位被設置為[QUuid.DCE](quuid.html#Variant-enum)。的UUID的其馀部分是由隨機數。從理論上講,這意味著有一個UUID,通過產生一個小的機會[createUuid](quuid.html#createUuid)( )將不會是唯一的。但它是 [a _very_ small chance](http://en.wikipedia.org/wiki/Universally_Unique_Identifier#Random_UUID_probability_of_duplicates)。 的UUID可以由數值或字符串的構造,或使用靜態[createUuid](quuid.html#createUuid)()函數。它們可以被轉換成一個字符串[toString](quuid.html#toString)( ) 。 UUID的有[variant](quuid.html#variant)()和一個[version](quuid.html#version)( ) ,和空的UUID返回True從[isNull](quuid.html#isNull)( ) 。 * * * ## Type Documentation ``` QUuid.Variant ``` 這個枚舉變量定義在使用的值[variant field](quuid.html#variant-field)的UUID 。在變型字段中的值決定了128位值的布局。 | Constant | Value | Description | | --- | --- | --- | | `QUuid.VarUnknown` | `-1` | Variant是未知 | | `QUuid.NCS` | `0` | 預留NCS (網絡計算系統)的向后兼容性 | | `QUuid.DCE` | `2` | 分布式計算環境,使用計劃[QUuid](quuid.html) | | `QUuid.Microsoft` | `6` | 保留給微軟向后兼容( GUID ) | | `QUuid.Reserved` | `7` | 保留為將來之定義 | ``` QUuid.Version ``` 這個枚舉變量定義在使用的值[version field](quuid.html#version-field)的UUID 。版本字段是有意義的,只有在價值[variant field](quuid.html#variant-field) is [QUuid.DCE](quuid.html#Variant-enum)。 | Constant | Value | Description | | --- | --- | --- | | `QUuid.VerUnknown` | `-1` | 版本未知 | | `QUuid.Time` | `1` | 以時間為基礎,通過使用時間戳,時鐘序列,和MAC網卡地址(如果有)為節點部分 | | `QUuid.EmbeddedPOSIX` | `2` | DCE安全的版本,帶有嵌入式POSIX的UUID | | `QUuid.Name` | `3` | 基于名稱的,使用的值從一個名進行的所有部分 | | `QUuid.Random` | `4` | 隨機化,通過使用隨機數的所有節 | * * * ## Method Documentation ``` QUuid.__init__ (self) ``` 創建空的UUID 。[toString](quuid.html#toString)( )將輸出空UUID作為“ { 00000000-0000-0000-0000-000000000000 } ” 。 ``` QUuid.__init__ (self, int?l, int?w1, int?w2, str?b1, str?b2, str?b3, str?b4, str?b5, str?b6, str?b7, str?b8) ``` 創建一個具有由參數指定的值一個UUID ,_l_,_w1_,_w2_,_b1_,_b2_,_b3_,_b4_,_b5_,_b6_,_b7_,_b8_。 例如: ``` // {67C8770B-44F1-410A-AB9A-F9B5446F13EE} [QUuid](quuid.html) IID_MyInterface(0x67c8770b, 0x44f1, 0x410a, 0xab, 0x9a, 0xf9, 0xb5, 0x44, 0x6f, 0x13, 0xee) ``` ``` QUuid.__init__ (self, QString) ``` 創建[QUuid](quuid.html)從字符串對象_text_,它必須格式化為相隔5進制領域“ - ” ,如“ { XXXXXXXX - XXXX-XXXX- XXXX-XXXXXXXXXXXX } ”,其中“X”是一個十六進制數字。這里顯示的花括號是可選的,但它是正常的,包括他們。如果轉換失敗,空UUID被創建。看[toString](quuid.html#toString)( )對于如何五十六進制字段映射到公共數據成員的解釋[QUuid](quuid.html)。 **See also** [toString](quuid.html#toString)()和[QUuid](quuid.html#QUuid)( ) 。 ``` QUuid.__init__ (self, QByteArray) ``` ``` QUuid.__init__ (self, QUuid) ``` 創建[QUuid](quuid.html)從對象[QByteArray](qbytearray.html) _text_,它必須格式化為相隔5進制領域“ - ” ,如“ { XXXXXXXX - XXXX-XXXX- XXXX-XXXXXXXXXXXX } ”,其中“X”是一個十六進制數字。這里顯示的花括號是可選的,但它是正常的,包括他們。如果轉換失敗,空UUID被創建。看[toByteArray](quuid.html#toByteArray)( )對于如何五十六進制字段映射到公共數據成員的解釋[QUuid](quuid.html)。 此功能被引入Qt的4.8 。 **See also** [toByteArray](quuid.html#toByteArray)()和[QUuid](quuid.html#QUuid)( ) 。 ``` QUuid QUuid.createUuid () ``` [](quuid.html) [在Windows以外的任何平臺上,這個函數返回一個新的UUID與變異](quuid.html)[QUuid.DCE](quuid.html#Variant-enum)和版本[QUuid.Random](quuid.html#Version-enum)。如果在/ dev / urandom設備存在,則用于構造UUID的號碼將加密的質量,這將使得UUID是唯一的。否則,該UUID的號碼將被從本地偽隨機數發生器(得到[qrand](index.htm#qrand)( ),它是由接種[qsrand](index.htm#qsrand)()) ,這是cryptograhic質量通常不是,表示的UUID不能保證是唯一的。 在Windows平臺上,一個GUID生成,這幾乎肯定_will_是唯一的,在這個或任何其他系統,聯網與否。 **See also** [variant](quuid.html#variant)()和[version](quuid.html#version)( ) 。 ``` QUuid QUuid.fromRfc4122 (QByteArray) ``` [](quuid.html) [創建](quuid.html)[QUuid](quuid.html)從給定的UUID的二進制表示反對_bytes_,指定由RFC 4122第4.1.2節。看[toRfc4122](quuid.html#toRfc4122)( )為所需的字節順序的進一步解釋。 接受字節數組_not_一個人類可讀的格式。 如果轉換失敗,空UUID被創建。 此功能被引入Qt的4.8 。 **See also** [toRfc4122](quuid.html#toRfc4122)()和[QUuid](quuid.html#QUuid)( ) 。 ``` bool QUuid.isNull (self) ``` 返回True如果是空的UUID { 00000000-0000-0000-0000-000000000000 } ,否則返回False 。 ``` QByteArray QUuid.toByteArray (self) ``` [](qbytearray.html) [返回此二進制表示](qbytearray.html)[QUuid](quuid.html)。字節數組的格式為分離五十六場“ - ”和大括號括起來,即“ { XXXXXXXX - XXXX-XXXX- XXXX-XXXXXXXXXXXX } ”,其中“X”是一個十六進制數字。由左到右,五十六進制字段從在四個公共數據成員獲得[QUuid](quuid.html)如下: | Field # | Source | | --- | --- | | 1 | data1 | | 2 | data2 | | 3 | data3 | | 4 | data4[0] .. data4[1] | | 5 | data4[2] .. data4[7] | 此功能被引入Qt的4.8 。 ``` QByteArray QUuid.toRfc4122 (self) ``` [](qbytearray.html) [返回此二進制表示](qbytearray.html)[QUuid](quuid.html)。字節數組是用big endian格式,并根據RFC 4122 ,第4.1.2格式化 - “布局和字節順序” 。 的順序如下所示: | Field # | Source | | --- | --- | | 1 | data1 | | 2 | data2 | | 3 | data3 | | 4 | data4[0] .. data4[7] | 此功能被引入Qt的4.8 。 ``` QString QUuid.toString (self) ``` 返回此字符串表示形式[QUuid](quuid.html)。該字符串的格式為分離五十六場“ - ”和大括號括起來,即“ { XXXXXXXX - XXXX-XXXX- XXXX-XXXXXXXXXXXX } ”,其中“X”是一個十六進制數字。由左到右,五十六進制字段從在四個公共數據成員獲得[QUuid](quuid.html)如下: | Field # | Source | | --- | --- | | 1 | data1 | | 2 | data2 | | 3 | data3 | | 4 | data4[0] .. data4[1] | | 5 | data4[2] .. data4[7] | ``` Variant QUuid.variant (self) ``` [](quuid.html#Variant-enum) [傳回值](quuid.html#Variant-enum)[variant field](quuid.html#variant-field)的UUID 。如果返回值是[QUuid.DCE](quuid.html#Variant-enum),調用[version](quuid.html#version)() ,看看哪些布局它使用。空的UUID被認為是一個未知的變體。 **See also** [version](quuid.html#version)( ) 。 ``` Version QUuid.version (self) ``` [](quuid.html#Version-enum) [返回](quuid.html#Version-enum)[version field](quuid.html#version-field)的UUID的,如果UUID的[variant field](quuid.html#variant-field) is [QUuid.DCE](quuid.html#Variant-enum)。否則返回[QUuid.VerUnknown](quuid.html#Version-enum)。 **See also** [variant](quuid.html#variant)( ) 。 ``` bool QUuid.__eq__ (self, QUuid?orig) ``` ``` bool QUuid.__ge__ (self, QUuid?other) ``` ``` bool QUuid.__gt__ (self, QUuid?other) ``` ``` bool QUuid.__le__ (self, QUuid?other) ``` ``` bool QUuid.__lt__ (self, QUuid?other) ``` ``` bool QUuid.__ne__ (self, QUuid?orig) ``` ``` str QUuid.__repr__ (self) ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看