|
welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
|
Sphinx-style docstring assembly (reStructuredText field lists). More...
#include <welder/rods/python/doc_style.hpp>
Static Public Member Functions | |
| static constexpr std::string | format (const ::welder::detail::function_doc &d) |
| Assemble d into a Sphinx (reStructuredText) docstring. | |
| static constexpr std::string | format_enum (const ::welder::detail::enum_doc &e) |
| Assemble enum e into a Sphinx (reStructuredText) docstring: the summary, then a :var Name: text field per documented enumerator — the reST field sphinx.ext.autodoc reads for a class/enum attribute. | |
Sphinx-style docstring assembly (reStructuredText field lists).
The summary, then a :param name: text field for each documented parameter, then a :returns: text field — the reST field-list form sphinx.ext.autodoc reads without any Napoleon translation. The field block is separated from the summary by a blank line; continuation lines of a multiline doc are indented four spaces so they stay part of the field body. Undocumented parameters are omitted; with no docs at all the result is empty.
Satisfies welder::doc_style.
Definition at line 241 of file doc_style.hpp.
|
inlinestaticconstexpr |
Assemble d into a Sphinx (reStructuredText) docstring.
| d | the documentation pieces. |
Definition at line 245 of file doc_style.hpp.
References welder::rods::python::detail::any_param_doc(), welder::rods::python::detail::append_indented(), and welder::rods::python::detail::blank_line().
|
inlinestaticconstexpr |
Assemble enum e into a Sphinx (reStructuredText) docstring: the summary, then a :var Name: text field per documented enumerator — the reST field sphinx.ext.autodoc reads for a class/enum attribute.
Empty when the enum carries no documentation at all.
| e | the enum documentation pieces. |
Definition at line 276 of file doc_style.hpp.
References welder::rods::python::detail::append_indented(), and welder::rods::python::detail::blank_line().