Class Gid

Class Documentation

class Gid

Unique ID (GID).

Wrapper for unique ID (aka GID).

Public Functions

explicit Gid(const GidValue value)

Constructor.

To create a new GID, see Gid::new().

Parameters:

value – the value for this GID

Gid(const Gid&) = default
virtual ~Gid()
GidValue value() const

Get the GID value.

Returns:

the value

const std::string &to_string() const

Get the GID as a string.

This string can be converted back to a GID using from_string().

Public Static Functions

static Gid new_gid()

Get a new GID.

static std::optional<Gid> from_string(const std::string &str)

Get a GID object from a string.

The string should have been generated using to_string().

Returns:

the GID object, or std::nullopt if it fails