|
welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
|
The accumulator threaded through the rod's emission hooks: the deduped set of reference containers the welded namespace uses, and the renderer for the finished header. More...
#include <welder/rods/python/opaque_containers/document.hpp>
Public Member Functions | |
| template<std::meta::info C, class Style, std::meta::info Enclosing, std::meta::info Site> | |
| void | add_one (bool excluded, bool styled_site) |
| Record container C found on member/site Site within Enclosing (deduped by spelling; excluded OR-merged across use sites — one by_value anywhere opts the whole type out, opaqueness being module-wide). | |
| template<std::meta::info SurfaceType, class Style, std::meta::info Enclosing, std::meta::info Site> | |
| void | collect (bool excluded, bool styled_site) |
| Collect every reference container within surface type SurfaceType (a data member / parameter / return type) found on member/site Site within Enclosing, tagging them excluded and whether styled_site (see add_one). | |
| template<std::meta::info Fn, class Style> | |
| void | collect_callable (bool styled_site) |
| Collect from callable Fn's parameter types and (unless a constructor) its return type — never by_value (that mark lives on data members). | |
| std::string | render (const std::string &ns) const |
| The finished, self-contained header text — WELDER_OPAQUE(...) at global scope, the welded aliases inside namespace @a ns, entries sorted by nesting depth then name so the output is deterministic AND an inner container's alias welds before the outer that hands out references to it. | |
Public Attributes | |
| std::vector< entry > | entries {} |
| Deduped by C++ spelling. | |
The accumulator threaded through the rod's emission hooks: the deduped set of reference containers the welded namespace uses, and the renderer for the finished header.
Definition at line 362 of file document.hpp.
|
inline |
Record container C found on member/site Site within Enclosing (deduped by spelling; excluded OR-merged across use sites — one by_value anywhere opts the whole type out, opaqueness being module-wide).
The name is opaque_name (the default derivation, or Style's transform_opaque_container override); styled_site records whether the carriage hook that reached here carried a name style, so a later Style-aware visit refines the name a constructor / operator / property visit could only give the default.
Definition at line 374 of file document.hpp.
References welder::rods::opaque_containers::container_depth(), welder::rods::opaque_containers::container_spelling(), entries, and welder::rods::opaque_containers::opaque_name().
Referenced by collect().
|
inline |
Collect every reference container within surface type SurfaceType (a data member / parameter / return type) found on member/site Site within Enclosing, tagging them excluded and whether styled_site (see add_one).
Definition at line 396 of file document.hpp.
References add_one(), and welder::rods::opaque_containers::containers_in().
Referenced by collect_callable().
|
inline |
Collect from callable Fn's parameter types and (unless a constructor) its return type — never by_value (that mark lives on data members).
The enclosing scope and site handed to the naming hook are parent_of(Fn) and Fn itself; styled_site is false for a constructor / operator / property accessor (whose carriage hook has no name style) and true for a method / free function.
Definition at line 410 of file document.hpp.
References collect().
|
inline |
The finished, self-contained header text — WELDER_OPAQUE(...) at global scope, the welded aliases inside namespace @a ns, entries sorted by nesting depth then name so the output is deterministic AND an inner container's alias welds before the outer that hands out references to it.
Two distinct container types deriving the same name emit an #error (this generator version cannot rename them).
Definition at line 429 of file document.hpp.
References entries.
| std::vector<entry> welder::rods::opaque_containers::document::entries {} |
Deduped by C++ spelling.
Definition at line 363 of file document.hpp.