dfx 0.1.0
Linux-based dynamic dataflow executor
Loading...
Searching...
No Matches
dfx::Utils::UUID Struct Reference

128-bit UUID value type. More...

#include <dfx-utilities/UUIDGenerator.hpp>

Inheritance diagram for dfx::Utils::UUID:
[legend]
Collaboration diagram for dfx::Utils::UUID:
[legend]

Public Member Functions

 UUID ()
 Construct a UUID.
bool isValid () const noexcept
 Check whether the UUID is valid.
std::string toString () const
 Convert the UUID to a string representation.

Detailed Description

128-bit UUID value type.

UUID is a thin wrapper over a fixed-size array of 16 bytes. It provides:

  • Value semantics.
  • Validity checking.
  • String conversion for logging and diagnostics.

A default-constructed UUID may represent an invalid or null UUID depending on the implementation of isValid().

Constructor & Destructor Documentation

◆ UUID()

dfx::Utils::UUID::UUID ( )

Construct a UUID.

A default-constructed UUID represents an invalid / zero-initialized UUID.

Member Function Documentation

◆ isValid()

bool dfx::Utils::UUID::isValid ( ) const
noexcept

Check whether the UUID is valid.

Returns
true if the UUID represents a valid value, otherwise false.

The definition of validity corresponds to the UUID not being all zeros.

◆ toString()

std::string dfx::Utils::UUID::toString ( ) const

Convert the UUID to a string representation.

The UUID is formatted like: XXXX-XX-XX-XX-XXXXXX

Returns
A human-readable string representation of the UUID.

Intended for logging, debugging, and diagnostics.


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