tagval 0.2.0
Modern C++23 header-only library of tagged values (open/closed enumerations with metadata)
Loading...
Searching...
No Matches
tagval::TagValDescriptor Struct Reference

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
 

Detailed Description

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.

Friends And Related Symbol Documentation

◆ operator==

constexpr bool operator== ( const TagValDescriptor ,
const TagValDescriptor  
)
friend

Member Data Documentation

◆ id

std::string_view tagval::TagValDescriptor::id

Stable identifier (e.g. "device_kind"). Required.

◆ name

std::string_view tagval::TagValDescriptor::name {}

Human-readable label (e.g. "Device Kind").

◆ icon

std::optional<comms::Icon> tagval::TagValDescriptor::icon {}

Optional UI icon.

◆ color

std::optional<comms::Color> tagval::TagValDescriptor::color {}

Optional UI accent.


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