|
welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
|
PEP 8 naming: CapWords (PascalCase) for classes and enum types, snake_case for everything callable or data — methods, static methods, free functions, data members (properties), namespace variables — and submodules. More...
#include <welder/rods/python/naming.hpp>
Static Public Member Functions | |
| static consteval std::string | transform_class (std::meta::info e) |
| Classes → CapWords. | |
| static consteval std::string | transform_enum (std::meta::info e) |
| Enum types → CapWords. | |
| static consteval std::string | transform_enumerator (std::meta::info e) |
| Enum members → verbatim (see the class note). | |
| Static Public Member Functions inherited from welder::naming::uniform< case_kind::snake > | |
| static consteval std::string | transform_class (std::meta::info e) |
| static consteval std::string | transform_enum (std::meta::info e) |
| static consteval std::string | transform_enumerator (std::meta::info e) |
| static consteval std::string | transform_method (std::meta::info e) |
| static consteval std::string | transform_static_method (std::meta::info e) |
| static consteval std::string | transform_function (std::meta::info e) |
| static consteval std::string | transform_field (std::meta::info e) |
| static consteval std::string | transform_variable (std::meta::info e) |
| static consteval std::string | transform_submodule (std::meta::info e) |
PEP 8 naming: CapWords (PascalCase) for classes and enum types, snake_case for everything callable or data — methods, static methods, free functions, data members (properties), namespace variables — and submodules.
Built by inheriting the all-snake_case base and overriding the two kinds PEP 8 spells differently (types → CapWords) plus enum members, which are kept verbatim: C++ enumerators are already authored in the constant style the writer intends (Red, MAX, …), and Python's enum imposes no case, so reshaping them would be a surprising, lossy rename rather than a convention fix. (Whichever way an enumerator is spelled, int(E.Value) still works — the pybind11/nanobind rods bind enum.IntEnum.)
Definition at line 45 of file naming.hpp.
|
inlinestaticconsteval |
|
inlinestaticconsteval |
|
inlinestaticconsteval |
Enum members → verbatim (see the class note).
Definition at line 57 of file naming.hpp.