xtd - Reference Guide  0.1.0
Modern c++17 framework to create console, gui and unit test applications on Windows, macOS and Linux.
xtd::guid Class Referencefinal

Represents a globally unique identifier (GUID). A GUID is a 128-bit integer (16 bytes) that can be used across all computers and networks wherever a unique identifier is required. Such an identifier has a very low probability of being duplicated. More...

#include <guid.h>

Inheritance diagram for xtd::guid:
xtd::object xtd::icomparable< guid > xtd::iequatable< guid > xtd::interface xtd::interface

Public Member Functions

 guid ()=default
 Initializes a new instance of the Guid structure. More...
 
 guid (const std::vector< uint8_t > &data)
 Initializes a new instance of the Guid structure by using the specified array of bytes. More...
 
 guid (const std::initializer_list< uint8_t > &data)
 Initializes a new instance of the Guid structure by using the specified array of bytes. More...
 
 guid (int a, int b, int c, const std::vector< uint8_t > &d)
 Initializes a new instance of the Guid structure by using the specified integers and byte array. More...
 
 guid (int a, short b, short 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) noexcept
 Initializes a new instance of the Guid structure by using the specified integers and bytes. More...
 
 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) noexcept
 Initializes a new instance of the Guid structure by using the specified uint32_tegers and bytes. More...
 
 guid (const std::string &guid)
 Initializes a new instance of the guid structure by using the value represented by the specified string. More...
 
virtual int32_t compare_to (const object &obj) const override
 Compares the current instance with another object of the same type. More...
 
virtual int32_t compare_to (const guid &value) const override
 Compares the current instance with another object of the same type. More...
 
bool equals (const object &g) const noexcept override
 Determines whether the specified object is equal to the current object. More...
 
bool equals (const guid &g) const noexcept override
 Indicates whether the current object is equal to another object of the same type. More...
 
virtual int32_t get_hash_code () const noexcept
 Serves as a hash function for a particular type. More...
 
template<typename T >
std::shared_ptr< objectmemberwise_clone () const
 Gets the type of the current instance. More...
 
const std::vector< uint8_t > & to_byte_array () const noexcept
 Returns a 16-element byte array that contains the value of this instance. More...
 
std::string to_string () const noexcept override
 Returns a string representation of the value of this instance in registry format. More...
 
std::string to_string (std::string format) const
 Returns a string representation of the value of this Guid instance, according to the provided format specifier. More...
 

Static Public Member Functions

static bool equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are considered equal. More...
 
static guid new_guid () noexcept
 Initializes a new instance of the guid structure. More...
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance. More...
 

Static Public Attributes

static const guid empty
 Get A read-only instance of the Guid structure whose value is all zeros. More...
 

Detailed Description

Represents a globally unique identifier (GUID). A GUID is a 128-bit integer (16 bytes) that can be used across all computers and networks wherever a unique identifier is required. Such an identifier has a very low probability of being duplicated.


The documentation for this class was generated from the following file: