welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
Loading...
Searching...
No Matches
naming.hpp File Reference

The PEP 8 name style shared by welder's Python backends. More...

#include <meta>
#include <string>
#include <welder/naming.hpp>
Include dependency graph for naming.hpp:

Go to the source code of this file.

Classes

struct  welder::rods::python::pep8
 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...

Namespaces

namespace  welder
namespace  welder::rods
namespace  welder::rods::python

Detailed Description

The PEP 8 name style shared by welder's Python backends.

The core name-styling layer (<welder/naming.hpp>) reshapes a C++ identifier into a target convention through one hook per entity kind; this header supplies the mix Python's PEP 8 prescribes, so a Python binding reads idiomatically without every consumer re-spelling the rules. Hand it to welder::welder:

::weld_module<^^mymod>(m);
PEP 8 naming: CapWords (PascalCase) for classes and enum types, snake_case for everything callable or...
Definition naming.hpp:45
welder's binding entry point, parameterized on a rod.
Definition welder.hpp:85

and processFile binds as process_file, MaxRetries as a MAX_RETRIES-free max_retries, while a GeometryHelper class stays GeometryHelper. A [[=welder::weld_as]] on any entity still wins verbatim.

Requires the welder vocabulary first (#include <welder/vocabulary.hpp>), like the rest of the reflection layer.

Definition in file naming.hpp.