welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
Loading...
Searching...
No Matches
welder::naming::name_style Concept Reference

A name style names every kind of entity welder can bind, through one hook per kind. More...

#include <welder/concepts.hpp>

Concept definition

template<class S>
concept name_style = requires {
{ S::transform_class(^^int) } -> std::convertible_to<std::string>;
{ S::transform_enum(^^int) } -> std::convertible_to<std::string>;
{ S::transform_enumerator(^^int) } -> std::convertible_to<std::string>;
{ S::transform_method(^^int) } -> std::convertible_to<std::string>;
{ S::transform_static_method(^^int) } -> std::convertible_to<std::string>;
{ S::transform_function(^^int) } -> std::convertible_to<std::string>;
{ S::transform_field(^^int) } -> std::convertible_to<std::string>;
{ S::transform_variable(^^int) } -> std::convertible_to<std::string>;
{ S::transform_submodule(^^int) } -> std::convertible_to<std::string>;
}
A name style names every kind of entity welder can bind, through one hook per kind.
Definition concepts.hpp:386

Detailed Description

A name style names every kind of entity welder can bind, through one hook per kind.

Each hook takes the entity's reflection and returns its target name. The driver calls the hook matching what it is binding — so a style varies naming by kind without inspecting the reflection itself.

A style implements all of transform_class, transform_enum, transform_enumerator, transform_method, transform_static_method, transform_function, transform_field, transform_variable and transform_submodule as static consteval std::string(std::meta::info). In practice a style inherits welder::naming::none (or a single-convention style) and overrides only the hooks that differ — static-hook hiding does the rest, since welder always calls through the concrete style type.

Template Parameters
Sthe candidate style type.

Definition at line 386 of file concepts.hpp.