PLCnext API Documentation 25.0.2.69
|
This class represents a Universal Unique ID. More...
#include <Uuid.hpp>
Public Member Functions | |
Uuid (void) | |
Constructs an empty Uuid instance. More... | |
Uuid (const Uuid &arg) | |
The default copy constructor. More... | |
Uuid (Uuid &&arg) noexcept | |
The default move constructor. More... | |
Uuid & | operator= (const Uuid &arg) |
THe default copy-assignment operator. More... | |
Uuid & | operator= (Uuid &&arg) noexcept |
The default move-assignment operator. More... | |
~Uuid (void) | |
The default destructor. | |
bool | IsEmpty (void) const |
Determines if this instance is empty. More... | |
String | ToString (void) const |
Returns the string representation of this Uuid. More... | |
size_t | GetHashValue (void) const |
Returns the hash value of this Uuid. More... | |
void | Clear (void) |
Empties this instance. More... | |
void | CopyTo (byte *pData) const |
Copies the binary data of this Uuid to the supplied buffer. More... | |
void | CopyLittleEndianTo (byte *pData) const |
Copies the binary data of this Uuid to the supplied buffer in little endian format. More... | |
Impl & | GetImpl (void) |
For internal use only. More... | |
const Impl & | GetImpl (void) const |
Static Public Member Functions | |
static Uuid | GetEmpty (void) |
Returns an empty Uuid. More... | |
static Uuid | CreateNew (void) |
Creates a new unique Uuid. More... | |
static Uuid | Create (const byte *pData) |
Creates a new unique Uuid from the given bytes. More... | |
static Uuid | CreateFromLittleEndian (const byte *pData) |
Creates a new unique Uuid from the given bytes. More... | |
static Uuid | Parse (const String &input) |
Creates a new Uuid by parsing the supplied string. More... | |
static bool | TryParse (const String &input, Uuid &result) |
Tries to creates a new Uuid by parsing the supplied string. More... | |
Friends | |
ARP_EXPORT friend bool | operator== (const Uuid &lhs, const Uuid &rhs) noexcept |
The equality operator compares 2 Uuids. More... | |
ARP_EXPORT friend bool | operator!= (const Uuid &lhs, const Uuid &rhs) noexcept |
The inequality operator compares 2 Uuids. More... | |
ARP_EXPORT friend bool | operator< (const Uuid &lhs, const Uuid &rhs) noexcept |
The less operator compares 2 Uuids. More... | |
ARP_EXPORT friend bool | operator> (const Uuid &lhs, const Uuid &rhs) noexcept |
The greater operator compares 2 Uuids. More... | |
ARP_EXPORT friend bool | operator<= (const Uuid &lhs, const Uuid &rhs) noexcept |
The less-or-equal operator compares 2 Uuids. More... | |
ARP_EXPORT friend bool | operator>= (const Uuid &lhs, const Uuid &rhs) noexcept |
The greater-or-equal operator compares 2 Uuids. More... | |
ARP_EXPORT friend std::ostream & | operator<< (std::ostream &os, const Uuid &id) |
The ostream operator is used for logging and string formatting. More... | |
ARP_EXPORT friend std::istream & | operator>> (std::istream &is, Uuid &id) |
The istream operator is used for string parsing. More... | |
This class represents a Universal Unique ID.
UUID is a standardized 128-bit format for unique string IDs.
Arp::System::Commons::Configuration::Uuid::Uuid | ( | void | ) |
|
default |
The default copy constructor.
arg | The argument to copy. |
|
defaultnoexcept |
The default move constructor.
arg | The argument to move. |
void Arp::System::Commons::Configuration::Uuid::Clear | ( | void | ) |
Empties this instance.
Cleas this instance to an empty/zero'ed uuid.
void Arp::System::Commons::Configuration::Uuid::CopyLittleEndianTo | ( | byte * | pBuffer | ) | const |
Copies the binary data of this Uuid to the supplied buffer in little endian format.
Copies the binary representation to the given buffer in little endian.
pData | The buffer to copy the binary data to in little endian format. |
pBuffer | The buffer to be filled in little endian format.The count of copied bytes is always 16, thus the as argument passed buffer should have at least a size of 16. |
void Arp::System::Commons::Configuration::Uuid::CopyTo | ( | byte * | pBuffer | ) | const |
Copies the binary data of this Uuid to the supplied buffer.
Copies the binary representation to the given buffer in big endian.
pData | The buffer to copy the binary data to. |
pBuffer | The buffer to be filled in big endian format.The count of copied bytes is always 16, thus the as argument passed buffer should have at least a size of 16. |
|
static |
|
static |
|
static |
|
static |
size_t Arp::System::Commons::Configuration::Uuid::GetHashValue | ( | void | ) | const |
const Uuid::Impl & Arp::Base::Commons::Configuration::Uuid::GetImpl | ( | void | ) |
For internal use only.
bool Arp::System::Commons::Configuration::Uuid::IsEmpty | ( | void | ) | const |
Determines if this instance is empty.
Checks if this uuid is emtpy (zero'ed).
true
if this instance is empty, otherwise false
.true
if it is empty, otherwise false
.THe default copy-assignment operator.
arg | The argument to copy. |
The default move-assignment operator.
arg | The argument to move. |
Creates a new Uuid by parsing the supplied string.
Creates a new unique id from the given input string.
input | The string to parse. |
ArgumentException | If the input string does not represent a valid Uuid. |
input | The input string to parse |
ArgumentException | If the input string has not a valid UUID format. |
The following string formats a supported xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
String Arp::System::Commons::Configuration::Uuid::ToString | ( | void | ) | const |
|
static |
Tries to creates a new Uuid by parsing the supplied string.
Creates a new unique id.
input | The string to parse. |
result | The resulting Uuid. |
true
if the string is a valid Uuid string, otherwise false
.input | The input string to parse |
result | The resulting uuid. |
true
on success, otherwise false
.For supported formats
The inequality operator compares 2 Uuids.
lhs | The left argument to compare to the right argument. |
rhs | The right argument to compare to the left argument. |
true
if the arguments are not equal, otherwise false
.The less operator compares 2 Uuids.
lhs | The left argument to compare to the right argument. |
rhs | The right argument to compare to the left argument. |
true
if the left arguments is less than the right argument, otherwise false
.
|
friend |
The ostream operator is used for logging and string formatting.
os | The stream to write to. |
url | The Uuid to write. |
The less-or-equal operator compares 2 Uuids.
lhs | The left argument to compare to the right argument. |
rhs | The right argument to compare to the left argument. |
true
if the left arguments is less or equal than the right argument, otherwise false
. The equality operator compares 2 Uuids.
lhs | The left argument to compare to the right argument. |
rhs | The right argument to compare to the left argument. |
true
if the arguments are equal, otherwise false
.The greater operator compares 2 Uuids.
lhs | The left argument to compare to the right argument. |
rhs | The right argument to compare to the left argument. |
true
if the left arguments is greater than the right argument, otherwise false
. The greater-or-equal operator compares 2 Uuids.
lhs | The left argument to compare to the right argument. |
rhs | The right argument to compare to the left argument. |
true
if the left arguments is greater or equal than the right argument, otherwise false
.
|
friend |
The istream operator is used for string parsing.
is | The stream to read from. |
url | The Uuid to read. |