tagval 0.2.0
Modern C++23 header-only library of tagged values (open/closed enumerations with metadata)
Loading...
Searching...
No Matches
tagval::Entry< Owner, Code, Label, Icon, Color > Struct Template Reference

Compile-time entry. More...

#include <entry.hpp>

Public Types

using owner_t = Owner
 

Static Public Attributes

static constexpr auto code = Code
 
static constexpr auto label = Label
 
static constexpr auto icon = Icon
 
static constexpr auto color = Color
 

Detailed Description

template<typename Owner, comms::FixedString Code, comms::FixedString Label = "", comms::FixedString Icon = "", comms::FixedString Color = "">
struct tagval::Entry< Owner, Code, Label, Icon, Color >

Compile-time entry.

Subclass to declare a value:

struct Active : tagval::Entry<Status, "active", "Active",
                              "mdi:on", "#00ff00"> {};

Trailing metadata fields default to empty comms::FixedString values.

Member Typedef Documentation

◆ owner_t

template<typename Owner , comms::FixedString Code, comms::FixedString Label = "", comms::FixedString Icon = "", comms::FixedString Color = "">
using tagval::Entry< Owner, Code, Label, Icon, Color >::owner_t = Owner

Member Data Documentation

◆ code

template<typename Owner , comms::FixedString Code, comms::FixedString Label = "", comms::FixedString Icon = "", comms::FixedString Color = "">
constexpr auto tagval::Entry< Owner, Code, Label, Icon, Color >::code = Code
staticconstexpr

◆ label

template<typename Owner , comms::FixedString Code, comms::FixedString Label = "", comms::FixedString Icon = "", comms::FixedString Color = "">
constexpr auto tagval::Entry< Owner, Code, Label, Icon, Color >::label = Label
staticconstexpr

◆ icon

template<typename Owner , comms::FixedString Code, comms::FixedString Label = "", comms::FixedString Icon = "", comms::FixedString Color = "">
constexpr auto tagval::Entry< Owner, Code, Label, Icon, Color >::icon = Icon
staticconstexpr

◆ color

template<typename Owner , comms::FixedString Code, comms::FixedString Label = "", comms::FixedString Icon = "", comms::FixedString Color = "">
constexpr auto tagval::Entry< Owner, Code, Label, Icon, Color >::color = Color
staticconstexpr

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