|
welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
|
The stored form of a getter / setter mark: which property half the function supplies, for which languages, under which (optional) explicit name. More...
#include <welder/annotations.hpp>
Public Member Functions | |
| template<class... Args> | |
| consteval accessor_spec | operator() (Args &&... args) const |
| Scope the mark by language and/or force an explicit property name. | |
Public Attributes | |
| accessor_role | role {} |
| Which half this function supplies. | |
| unsigned | mask = 0 |
| The languages it applies to; 0 == all. | |
| char | name [accessor_name_capacity] {} |
| The explicit property name; empty == derive. | |
The stored form of a getter / setter mark: which property half the function supplies, for which languages, under which (optional) explicit name.
Each marker is a constexpr object usable bare as an annotation (all languages, name derived from the function's identifier) or called with an optional run of lang markers and an optional trailing explicit name — the weld_as argument grammar with the name optional:
Repeat the annotation for a different name (or admission) per language. An explicit name is used verbatim — it never flows through a name style — exactly like weld_as (which is diagnosed on an accessor: the explicit property name is the rename tool there). An empty name means "derive from the function's identifier" (strip a leading get/set word, keep the rest in the identifier's own convention).
Definition at line 385 of file annotations.hpp.
|
inlineconsteval |
Scope the mark by language and/or force an explicit property name.
| Args | the leading lang markers, then the optional name (deduced). |
| args | zero or more languages, optionally followed by the name. |
Definition at line 395 of file annotations.hpp.
References welder::detail::accessor_mask(), welder::detail::accessor_name(), name, and role.
| unsigned welder::detail::accessor_spec::mask = 0 |
The languages it applies to; 0 == all.
Definition at line 387 of file annotations.hpp.
| char welder::detail::accessor_spec::name[accessor_name_capacity] {} |
The explicit property name; empty == derive.
Definition at line 388 of file annotations.hpp.
Referenced by operator()().
| accessor_role welder::detail::accessor_spec::role {} |
Which half this function supplies.
Definition at line 386 of file annotations.hpp.
Referenced by operator()().