DocComment

Note

Generated from the C++ headers by apiary --emit-cpp-docs-json.

class DocComment

Structured form of a doc comment.

Every text field is reST-ready: inline Doxygen commands (@c, @p, @ref, :math:`math`, …) are converted and block constructs (@code, @versionadded, @note, …) are rendered as reST directives inside detail.

bool empty()

Whether every field is empty.

Returns:

true if brief, detail, params, tparams, returns, and throws are all empty.

std::string brief

One-line summary (from @brief or leading paragraph).

std::string detail

Remaining prose + converted block directives.

std::vector<DocEntry> params
Param entries.:

std::vector<DocEntry> tparams
Template Parameters:

entries – (C++ template params; usually omitted from Python pages).

std::string returns
Returns:

/ @returns text.

std::vector<DocEntry> throws_
Throws /:

@throw / @exception entries (name = exception type).

class DocEntry

A named doc entry: @param / @tparam / @throws.

name is the parameter or exception-type name; description is reST-ready text (inline commands already converted).

std::string name

The parameter or exception-type name.

std::string description

reST-ready description text (inline commands already converted).

DocComment parse_doc_comment(const std::string &raw)

Parse a marker-stripped Doxygen comment body into structured form.

Parameters:

raw – The marker-stripped Doxygen comment body.

Returns:

The structured DocComment.