mrdocs::DocComment

A processed documentation comment attached to a declaration.

Synopsis

Declared in <mrdocs/Metadata/DocComment.hpp>

struct DocComment;

Description

A complete documentation comment document consists of a sequence of text blocks. Blocks are the top‐level structural units that might contain other blocks or inline elements. These are analogous to markdown blocks.

Inline elements (text, emphasis, links, code spans, etc.) live inside certain block types, like paragraphs or headings. Inlines can contain other inlines (e.g., emphasis contains text, link contains text), but they cannot directly contain blocks.

Some blocks contain metadata about the symbol being documented, such as parameters and return values. These blocks are parsed as usual, but are stored separately in the DocComment structure.

Each block in the document might contain:

  • No other blocks (leaf blocks)

  • Other blocks (container blocks: e.g. lists)

When they contain no other blocks, they might be:

  • Inlines only (e.g. paragraphs)

  • No inlines (e.g. horizontal rule)

Inline content elements contain other inlines but cannot contain blocks.

Member Functions

Name

Description

DocComment [constructor]

Constructors

append

Append blocks from another DocComment to this.

empty

Return true if this is empty

operator==

Equality operator

operator!=

Inequality operator

operator<=>

Three‐way comparison operator

Data Members

Name

Description

Document

The list of text blocks.

brief

A brief description of the symbol.

exceptions

The list of exceptions.

params

The list of parameters.

postconditions

The list of postconditions.

preconditions

The list of preconditions.

related

The list of "related" references.

relates

The list of "relates" references.

returns

The list of return type descriptions.

sees

The list of "see also" references.

tparams

The list of template parameters.

Created with MrDocs