welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
Loading...
Searching...
No Matches
naming.hpp
Go to the documentation of this file.
1#pragma once
2#include <meta>
3#include <string>
4
5#include <welder/naming.hpp> // the name_style machinery + case restyling
6
26
27namespace welder::inline v0::rods::python {
28
47 static consteval std::string transform_class(std::meta::info e) {
48 return ::welder::naming::restyle(std::meta::identifier_of(e),
50 }
51
52 static consteval std::string transform_enum(std::meta::info e) {
53 return ::welder::naming::restyle(std::meta::identifier_of(e),
55 }
56
57 static consteval std::string transform_enumerator(std::meta::info e) {
58 return std::string{std::meta::identifier_of(e)};
59 }
60};
61
62static_assert(::welder::naming::name_style<pep8>);
63
64} // namespace welder::rods::python
uniform< case_kind::snake > snake_case
foo_bar everywhere
Definition naming.hpp:221
Language-agnostic name styling: reshape a C++ identifier into a target language's naming convention,...
PEP 8 naming: CapWords (PascalCase) for classes and enum types, snake_case for everything callable or...
Definition naming.hpp:45
static consteval std::string transform_enumerator(std::meta::info e)
Enum members → verbatim (see the class note).
Definition naming.hpp:57
static consteval std::string transform_enum(std::meta::info e)
Enum types → CapWords.
Definition naming.hpp:52
static consteval std::string transform_class(std::meta::info e)
Classes → CapWords.
Definition naming.hpp:47