Public Member Functions

 Guid ()
 Constructs an object that represents a GUID consisting of all zeroes. More...
 
 Guid (const ArrayPtr< uint8_t > &b)
 
 Guid (const String &g)
 
 Guid (int32_t a, int16_t b, int16_t c, const ArrayPtr< uint8_t > &d)
 
 Guid (int32_t a, int16_t b, int16_t c, uint8_t d, uint8_t e, uint8_t f, uint8_t g, uint8_t h, uint8_t i, uint8_t j, uint8_t k)
 
 Guid (uint32_t a, uint16_t b, uint16_t c, uint8_t d, uint8_t e, uint8_t f, uint8_t g, uint8_t h, uint8_t i, uint8_t j, uint8_t k)
 
 ~Guid ()
 Destructor. More...
 
 Guid (const Guid &guid)
 
Guidoperator= (const Guid &guid)
 
int CompareTo (const Guid &g) const
 
bool Equals (const Guid &g) const
 
ArrayPtr< uint8_t > ToByteArray () const
 
String ToString () const
 Converts the GUID represented by the current object to its string representation. More...
 
String ToString (const String &format) const
 
bool operator!= (const Guid &b) const
 
bool operator== (const Guid &b) const
 
int GetHashCode () const
 Returns a hash code for the current object. More...
 

Static Public Member Functions

static Guid NewGuid ()
 Generates a new GUID and returns a Guid object that represents it. More...
 
static Guid Parse (const String &input)
 
static bool TryParse (const String &input, Guid &g)
 

Static Public Attributes

static Guid Empty
 Represents a GUID that has a value of 0. More...
 

Detailed Description

Represents a Globally Unique IDentifier This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.

Constructor & Destructor Documentation

◆ Guid() [1/7]

System::Guid::Guid ( )

Constructs an object that represents a GUID consisting of all zeroes.

◆ Guid() [2/7]

System::Guid::Guid ( const ArrayPtr< uint8_t > &  b)

Constructs an object that represents a GUID specified as an array of unsigned 8-bit integer values.

Parameters
bA byte-array containing separate bytes of the GUID

◆ Guid() [3/7]

System::Guid::Guid ( const String g)

Constructs an object that represents a GUID specified as a string

Parameters
gThe string representation of a GUID to be represented by the object buing constructed

◆ Guid() [4/7]

System::Guid::Guid ( int32_t  a,
int16_t  b,
int16_t  c,
const ArrayPtr< uint8_t > &  d 
)

Constucts an instance of Guad class from the specified GUID components.

Parameters
aBits 0-31 of the GUID
bBits 32-47 of the GUID
cBits 48-63 of the GUID
dA byte array containing bits 64-127 of the GUID

◆ Guid() [5/7]

System::Guid::Guid ( int32_t  a,
int16_t  b,
int16_t  c,
uint8_t  d,
uint8_t  e,
uint8_t  f,
uint8_t  g,
uint8_t  h,
uint8_t  i,
uint8_t  j,
uint8_t  k 
)

Constucts an instance of Guad class from the specified unsigned integers and bytes.

Parameters
aBits 0-31 of the GUID
bBits 32-47 of the GUID
cBits 48-63 of the GUID
dBits 64-71 of the GUID
eBits 72-79 of the GUID
fBits 80-87 of the GUID
gBits 88-95 of the GUID
hBits 96-103 of the GUID
iBits 104-111 of the GUID
jBits 112-119 of the GUID
kBits 120-127 of the GUID

◆ Guid() [6/7]

System::Guid::Guid ( uint32_t  a,
uint16_t  b,
uint16_t  c,
uint8_t  d,
uint8_t  e,
uint8_t  f,
uint8_t  g,
uint8_t  h,
uint8_t  i,
uint8_t  j,
uint8_t  k 
)

Constucts an instance of Guad class from the specified unsigned integers and bytes.

Parameters
aBits 0-31 of the GUID
bBits 32-47 of the GUID
cBits 48-63 of the GUID
dBits 64-71 of the GUID
eBits 72-79 of the GUID
fBits 80-87 of the GUID
gBits 88-95 of the GUID
hBits 96-103 of the GUID
iBits 104-111 of the GUID
jBits 112-119 of the GUID
kBits 120-127 of the GUID

◆ ~Guid()

System::Guid::~Guid ( )

Destructor.

◆ Guid() [7/7]

System::Guid::Guid ( const Guid guid)

Constructs an object that represents the same GUID as the specified object.

Parameters
guidThe Guid object to copy the GUID value from

Member Function Documentation

◆ CompareTo()

int System::Guid::CompareTo ( const Guid g) const

Performs arithmetic comparison of the GUIDs represented by the current and specified objects.

Parameters
gThe comparand
Returns
-1 if the GUID represented by the current object is less than the GUID represented by g; 0 if the GUIDs are equal; 1 if the GUID represented by the current object is greater than the GUID represented by g

◆ Equals()

bool System::Guid::Equals ( const Guid g) const

Determines if the GUIDs represented by the current and specified objects are equal.

Parameters
gThe comparand
Returns
True if the GUIDs represented by the current and the specified objects are equal, otherwise - false

◆ GetHashCode()

int System::Guid::GetHashCode ( ) const

Returns a hash code for the current object.

◆ NewGuid()

static Guid System::Guid::NewGuid ( )
static

Generates a new GUID and returns a Guid object that represents it.

◆ operator!=()

bool System::Guid::operator!= ( const Guid b) const

Determines if the GUIDs represented by the current and specified objects are not equal.

Parameters
bThe comparand
Returns
True if the GUIDs represented by the current and the specified objects are not equal, otherwise - false

◆ operator=()

Guid& System::Guid::operator= ( const Guid guid)

Assigns to the current object the GUID value represented by the specified Guid object.

Parameters
guidThe Guid object to copy the GUID value from
Returns
A reference to the self

◆ operator==()

bool System::Guid::operator== ( const Guid b) const

Determines if the GUIDs represented by the current and specified objects are equal.

Parameters
bThe comparand
Returns
True if the GUIDs represented by the current and the specified objects are equal, otherwise - false

◆ Parse()

static Guid System::Guid::Parse ( const String input)
static

Converts the specified string representation of a GUID into equivalent Guid object.

Parameters
inputThe string containing the string representation of GUID
Returns
A Guid object representig a GUID equivalent to that represented by input

◆ ToByteArray()

ArrayPtr<uint8_t> System::Guid::ToByteArray ( ) const

Converts the GUID represented by the current object into array of bytes.

Returns
A byte array containing bytes constituting the GUID represented by the current object

◆ ToString() [1/2]

String System::Guid::ToString ( ) const

Converts the GUID represented by the current object to its string representation.

◆ ToString() [2/2]

String System::Guid::ToString ( const String format) const

Converts the GUID represented by the current object to its string representation using the specified string format.

Parameters
formatThe format to use
Returns
The string representation of the GUID value represented by the current object

◆ TryParse()

static bool System::Guid::TryParse ( const String input,
Guid g 
)
static

Tries to convert the specified string into Guid object.

Parameters
inputThe string to convert
gOutput Guid object, if successfull.
Returns
True, if input string represents valid Guid, otherwise false.

Member Data Documentation

◆ Empty

Guid System::Guid::Empty
static

Represents a GUID that has a value of 0.