|
tagval 0.2.0
Modern C++23 header-only library of tagged values (open/closed enumerations with metadata)
|
Runtime metadata describing a tag-value kind (e.g. More...
#include <descriptor.hpp>
Collaboration diagram for tagval::TagValDescriptor:Public Attributes | |
| std::string_view | id |
| Stable identifier (e.g. "device_kind"). Required. | |
| std::string_view | name {} |
| Human-readable label (e.g. "Device Kind"). | |
| std::optional< comms::Icon > | icon {} |
| Optional UI icon. | |
| std::optional< comms::Color > | color {} |
| Optional UI accent. | |
Friends | |
| constexpr bool | operator== (const TagValDescriptor &, const TagValDescriptor &) noexcept=default |
Runtime metadata describing a tag-value kind (e.g.
"device_kind").
Lifetime: every string_view here must refer to storage that outlives the descriptor. For a typical usage where make_descriptor() returns string literals, this is automatic.
|
friend |
| std::string_view tagval::TagValDescriptor::id |
Stable identifier (e.g. "device_kind"). Required.
| std::string_view tagval::TagValDescriptor::name {} |
Human-readable label (e.g. "Device Kind").
| std::optional<comms::Icon> tagval::TagValDescriptor::icon {} |
Optional UI icon.
| std::optional<comms::Color> tagval::TagValDescriptor::color {} |
Optional UI accent.