Type-erased handle to one registered kind.
More...
#include <kind_registry.hpp>
Type-erased handle to one registered kind.
Stores TagValDescriptor, KindCategory, and three function pointers captured at registration time. No virtual dispatch, no allocation outside the explicit values() snapshot.
◆ EmitFn
◆ WalkFn
◆ FindFn
◆ KindView()
| constexpr tagval::KindView::KindView |
( |
| ) |
|
|
constexprdefaultnoexcept |
◆ descriptor()
◆ kind_id()
| constexpr std::string_view tagval::KindView::kind_id |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ category()
◆ is_closed_ended()
| constexpr bool tagval::KindView::is_closed_ended |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ is_open_ended()
| constexpr bool tagval::KindView::is_open_ended |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ values()
Allocating snapshot of the kind's current values, in declaration order (open-ended: predefined entries followed by extern entries in registration order).
◆ for_each()
| void tagval::KindView::for_each |
( |
F && |
f | ) |
const |
|
inline |
Zero-allocation walk over the kind's current values.
f is invoked per entry. Does not own f; reference / move-capture as appropriate.
◆ find()
| std::optional< KindEntryView > tagval::KindView::find |
( |
const std::string_view |
code | ) |
const |
|
inline |
Look up a value by code.
Cheaper than calling values(): goes through the kind's own try_of() path.
◆ detail::KindViewFactory
◆ operator==
The documentation for this class was generated from the following file: