struct final
UIDis an object holding a Unique IDentifier (UID)
UID generates a unique ID, either through a random number generator, or by using OS provided methods. It is immutable once created.
static variables
static member functions
constructors, destructors, conversion operators
member-functions
Function documentation
static UID psl:: UID:: from_string(const psl::string8_t& key) constexpr
Brief
tries to convert from the given string based representation to a valid UID.
Details
when sending a string of the form "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" or "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" to this method, it will parse it and will return a valid UID instance. Otherwise it will return UID::
Parameters | |
---|---|
key in | a string in the valid format to convert to UID. |
Returns | either a valid UID based on the key, or UID:: |
psl:: UID:: operator bool() const
Brief
checks if the held UID is valid.
Returns | true in case the held UID is valid. |
---|
void psl:: UID:: invalidate()
Brief
invalidates the current UID.
Details
If for some reason you want to invalidate this object as being a valid UID, then calling this method will set the internal UID to be equivalent to UID::
Variable documentation
static UID psl:: UID:: invalid_uid
a global instance that signifies the invalid_uid used by the current runtime.