welder
0.1.0
Bindings for annotated C++ types, from C++26 reflection
Toggle main menu visibility
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
27
namespace
welder::inline v0::rods::python {
28
45
struct
pep8
:
::welder::naming::snake_case
{
47
static
consteval
std::string
transform_class
(std::meta::info e) {
48
return ::welder::naming::restyle(std::meta::identifier_of(e),
49
::welder::naming::case_kind::pascal
);
50
}
51
52
static
consteval
std::string
transform_enum
(std::meta::info e) {
53
return ::welder::naming::restyle(std::meta::identifier_of(e),
54
::welder::naming::case_kind::pascal
);
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
62
static_assert
(::welder::naming::name_style<pep8>);
63
64
}
// namespace welder::rods::python
welder::naming::case_kind::pascal
@ pascal
FooBar
Definition
naming.hpp:105
welder::naming::snake_case
uniform< case_kind::snake > snake_case
foo_bar everywhere
Definition
naming.hpp:221
welder::rods::python
Definition
doc_style.hpp:40
naming.hpp
Language-agnostic name styling: reshape a C++ identifier into a target language's naming convention,...
welder::rods::python::pep8
PEP 8 naming: CapWords (PascalCase) for classes and enum types, snake_case for everything callable or...
Definition
naming.hpp:45
welder::rods::python::pep8::transform_enumerator
static consteval std::string transform_enumerator(std::meta::info e)
Enum members → verbatim (see the class note).
Definition
naming.hpp:57
welder::rods::python::pep8::transform_enum
static consteval std::string transform_enum(std::meta::info e)
Enum types → CapWords.
Definition
naming.hpp:52
welder::rods::python::pep8::transform_class
static consteval std::string transform_class(std::meta::info e)
Classes → CapWords.
Definition
naming.hpp:47
src
welder
rods
python
naming.hpp
Generated by
1.17.0