|
DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
|
Represents a 128-bit globally unique identifier (GUID). More...
#include <Guid.h>
Public Member Functions | |
| Guid () | |
| Initializes a new instance of the Guid structure initialized to all zeros. | |
| Guid (const Array< uint8_t > &b) | |
| Initializes a new instance of the Guid structure using the specified array of bytes. | |
| Guid (const String &g) | |
| Initializes a new instance of the Guid structure using the value represented by the specified string. | |
| bool | operator!= (const Guid &other) const |
| Determines whether two Guid instances have differing values. | |
| bool | operator== (const Guid &other) const |
| Determines whether two Guid instances have identical values. | |
| Array< uint8_t > | ToByteArray () const |
| Returns a 16-element byte array that contains the value of this instance. | |
| String | ToString () const |
| Returns a string representation of the value of this instance in standard "D" format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). | |
| Public Member Functions inherited from DotNetDupe::System::Object | |
| virtual | ~Object ()=default |
| Virtual destructor ensuring polymorphic cleanup. | |
| virtual bool | Equals (const Object &obj) const |
| Determines whether the specified Object is equal to the current Object. | |
| virtual int | GetHashCode () const |
| Serves as the default hash function. | |
| bool | operator== (const Object &obj) const |
| Determines reference equality between two objects. | |
| char * | ToStringA () const |
| Returns narrow-character string representation. | |
| wchar_t * | ToStringW () const |
| Returns wide-character string representation. | |
Static Public Member Functions | |
| static Guid | NewGuid () |
| Initializes a new instance of the Guid structure (RFC 4122 Version 4 random UUID). | |
| Static Public Member Functions inherited from DotNetDupe::System::Object | |
| static bool | Equals (const Object &obj1, const Object &obj2) |
| Static helper determining whether two object instances are equal. | |
Static Public Attributes | |
| static const Guid | Empty = Guid() |
| A read-only instance of the Guid structure whose value is all zeros. | |
Represents a 128-bit globally unique identifier (GUID).
Provides RFC 4122 version 4 generation, parsing from 32-hex or hyphenated strings, binary conversion, and comparison operations. Immutable value object. Thread-safe for all concurrent const operations.
| DotNetDupe::System::Guid::Guid | ( | ) |
Initializes a new instance of the Guid structure initialized to all zeros.
Definition at line 15 of file Guid.cpp.
Referenced by NewGuid(), operator!=(), and operator==().
| DotNetDupe::System::Guid::Guid | ( | const Array< uint8_t > & | b | ) |
Initializes a new instance of the Guid structure using the specified array of bytes.
| b | A 16-element byte array containing values with which to initialize the GUID. |
Definition at line 21 of file Guid.cpp.
References DotNetDupe::System::ArgumentException::ArgumentException(), and DotNetDupe::System::Array< T >::GetLength().
| DotNetDupe::System::Guid::Guid | ( | const String & | g | ) |
Initializes a new instance of the Guid structure using the value represented by the specified string.
| g | String that contains a GUID in "D", "N", or "B" format. |
Normalize string by stripping enclosing braces and hyphens.
Guard: Validate normalized hex string contains exactly 32 hexadecimal characters.
Parse 16 two-character hexadecimal octets into internal byte array.
Definition at line 28 of file Guid.cpp.
References DotNetDupe::System::FormatException::FormatException(), DotNetDupe::System::String::GetLength(), DotNetDupe::System::String::GetRawString(), DotNetDupe::System::String::Replace(), and DotNetDupe::System::String::Substring().
|
static |
| bool DotNetDupe::System::Guid::operator!= | ( | const Guid & | other | ) | const |
| bool DotNetDupe::System::Guid::operator== | ( | const Guid & | other | ) | const |
| Array< uint8_t > DotNetDupe::System::Guid::ToByteArray | ( | ) | const |
| String DotNetDupe::System::Guid::ToString | ( | ) | const |
Returns a string representation of the value of this instance in standard "D" format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
Definition at line 72 of file Guid.cpp.
References DotNetDupe::System::String::String().