The routines in this group provide access to information in documentation comments.
More...
|
enum | CXCommentKind {
CXComment_Null = 0,
CXComment_Text = 1,
CXComment_InlineCommand = 2,
CXComment_HTMLStartTag = 3,
CXComment_HTMLEndTag = 4,
CXComment_Paragraph = 5,
CXComment_BlockCommand = 6,
CXComment_ParamCommand = 7,
CXComment_TParamCommand = 8,
CXComment_VerbatimBlockCommand = 9,
CXComment_VerbatimBlockLine = 10,
CXComment_VerbatimLine = 11,
CXComment_FullComment = 12
} |
| Describes the type of the comment AST node (CXComment ). More...
|
|
enum | CXCommentInlineCommandRenderKind { CXCommentInlineCommandRenderKind_Normal,
CXCommentInlineCommandRenderKind_Bold,
CXCommentInlineCommandRenderKind_Monospaced,
CXCommentInlineCommandRenderKind_Emphasized
} |
| The most appropriate rendering mode for an inline command, chosen on command semantics in Doxygen. More...
|
|
enum | CXCommentParamPassDirection { CXCommentParamPassDirection_In,
CXCommentParamPassDirection_Out,
CXCommentParamPassDirection_InOut
} |
| Describes parameter passing direction for \param or \arg command. More...
|
|
The routines in this group provide access to information in documentation comments.
These facilities are distinct from the core and may be subject to their own schedule of stability and deprecation.
◆ CXCommentInlineCommandRenderKind
The most appropriate rendering mode for an inline command, chosen on command semantics in Doxygen.
Enumerator |
---|
CXCommentInlineCommandRenderKind_Normal | Command argument should be rendered in a normal font.
|
CXCommentInlineCommandRenderKind_Bold | Command argument should be rendered in a bold font.
|
CXCommentInlineCommandRenderKind_Monospaced | Command argument should be rendered in a monospaced font.
|
CXCommentInlineCommandRenderKind_Emphasized | Command argument should be rendered emphasized (typically italic font).
|
Definition at line 165 of file Documentation.h.
◆ CXCommentKind
Describes the type of the comment AST node (CXComment
).
A comment node can be considered block content (e. g., paragraph), inline content (plain text) or neither (the root AST node).
Enumerator |
---|
CXComment_Null | Null comment.
No AST node is constructed at the requested location because there is no text or a syntax error.
|
CXComment_Text | Plain text.
Inline content.
|
CXComment_InlineCommand | A command with word-like arguments that is considered inline content.
For example: \c command.
|
CXComment_HTMLStartTag | HTML start tag with attributes (name-value pairs).
Considered inline content.
For example: * <br> <br /> <a href="http://example.org/">
* |
CXComment_HTMLEndTag | HTML end tag.
Considered inline content.
For example: * </a>
* |
CXComment_Paragraph | A paragraph, contains inline comment.
The paragraph itself is block content.
|
CXComment_BlockCommand | A command that has zero or more word-like arguments (number of word-like arguments depends on command name) and a paragraph as an argument.
Block command is block content.
Paragraph argument is also a child of the block command.
For example: 0 word-like arguments and a paragraph argument.
AST nodes of special kinds that parser knows about (e. g., \param command) have their own node kinds.
|
CXComment_ParamCommand | A \param or \arg command that describes the function parameter (name, passing direction, description).
For example: \param [in] ParamName description.
|
CXComment_TParamCommand | A \tparam command that describes a template parameter (name and description).
For example: \tparam T description.
|
CXComment_VerbatimBlockCommand | A verbatim block command (e.
g., preformatted code). Verbatim block has an opening and a closing command and contains multiple lines of text (CXComment_VerbatimBlockLine child nodes).
For example: \verbatim aaa \endverbatim
|
CXComment_VerbatimBlockLine | A line of text that is contained within a CXComment_VerbatimBlockCommand node.
|
CXComment_VerbatimLine | A verbatim line command.
Verbatim line has an opening command, a single line of text (up to the newline after the opening command) and has no closing command.
|
CXComment_FullComment | A full comment attached to a declaration, contains block content.
|
Definition at line 54 of file Documentation.h.
◆ CXCommentParamPassDirection
Describes parameter passing direction for \param or \arg command.
Enumerator |
---|
CXCommentParamPassDirection_In | The parameter is an input parameter.
|
CXCommentParamPassDirection_Out | The parameter is an output parameter.
|
CXCommentParamPassDirection_InOut | The parameter is an input and output parameter.
|
Definition at line 191 of file Documentation.h.
◆ clang_BlockCommandComment_getArgText()
- Parameters
-
Comment | a CXComment_BlockCommand AST node. |
ArgIdx | argument index (zero-based). |
- Returns
- text of the specified word-like argument.
◆ clang_BlockCommandComment_getCommandName()
- Parameters
-
Comment | a CXComment_BlockCommand AST node. |
- Returns
- name of the block command.
◆ clang_BlockCommandComment_getNumArgs()
- Parameters
-
Comment | a CXComment_BlockCommand AST node. |
- Returns
- number of word-like arguments.
◆ clang_BlockCommandComment_getParagraph()
- Parameters
-
Comment | a CXComment_BlockCommand or CXComment_VerbatimBlockCommand AST node. |
- Returns
- paragraph argument of the block command.
◆ clang_Comment_getChild()
- Parameters
-
Comment | AST node of any kind. |
ChildIdx | child index (zero-based). |
- Returns
- the specified child of the AST node.
◆ clang_Comment_getKind()
- Parameters
-
Comment | AST node of any kind. |
- Returns
- the type of the AST node.
◆ clang_Comment_getNumChildren()
- Parameters
-
Comment | AST node of any kind. |
- Returns
- number of children of the AST node.
◆ clang_Comment_isWhitespace()
A CXComment_Paragraph
node is considered whitespace if it contains only CXComment_Text
nodes that are empty or whitespace.
Other AST nodes (except CXComment_Paragraph
and CXComment_Text
) are never considered whitespace.
- Returns
- non-zero if
Comment
is whitespace.
◆ clang_Cursor_getParsedComment()
Given a cursor that represents a documentable entity (e.g., declaration), return the associated parsed comment as a CXComment_FullComment
AST node.
◆ clang_FullComment_getAsHTML()
Convert a given full parsed comment to an HTML fragment.
Specific details of HTML layout are subject to change. Don't try to parse this HTML back into an AST, use other APIs instead.
Currently the following CSS classes are used:
- "para-returns" for \returns paragraph and equivalent commands;
- "word-returns" for the "Returns" word in \returns paragraph.
Function argument documentation is rendered as a <dl> list with arguments sorted in function prototype order. CSS classes used:
- "param-name-index-NUMBER" for parameter name (<dt>);
- "param-descr-index-NUMBER" for parameter description (<dd>);
- "param-name-index-invalid" and "param-descr-index-invalid" are used if parameter index is invalid.
Template parameter documentation is rendered as a <dl> list with parameters sorted in template parameter list order. CSS classes used:
- "tparam-name-index-NUMBER" for parameter name (<dt>);
- "tparam-descr-index-NUMBER" for parameter description (<dd>);
- "tparam-name-index-other" and "tparam-descr-index-other" are used for names inside template template parameters;
- "tparam-name-index-invalid" and "tparam-descr-index-invalid" are used if parameter position is invalid.
- Parameters
-
Comment | a CXComment_FullComment AST node. |
- Returns
- string containing an HTML fragment.
◆ clang_FullComment_getAsXML()
Convert a given full parsed comment to an XML document.
A Relax NG schema for the XML can be found in comment-xml-schema.rng file inside clang source tree.
- Parameters
-
Comment | a CXComment_FullComment AST node. |
- Returns
- string containing an XML document.
◆ clang_HTMLStartTag_getAttrName()
- Parameters
-
Comment | a CXComment_HTMLStartTag AST node. |
AttrIdx | attribute index (zero-based). |
- Returns
- name of the specified attribute.
◆ clang_HTMLStartTag_getAttrValue()
- Parameters
-
Comment | a CXComment_HTMLStartTag AST node. |
AttrIdx | attribute index (zero-based). |
- Returns
- value of the specified attribute.
◆ clang_HTMLStartTag_getNumAttrs()
- Parameters
-
Comment | a CXComment_HTMLStartTag AST node. |
- Returns
- number of attributes (name-value pairs) attached to the start tag.
◆ clang_HTMLStartTagComment_isSelfClosing()
- Parameters
-
Comment | a CXComment_HTMLStartTag AST node. |
- Returns
- non-zero if tag is self-closing (for example, <br />).
◆ clang_HTMLTagComment_getAsString()
Convert an HTML tag AST node to string.
- Parameters
-
Comment | a CXComment_HTMLStartTag or CXComment_HTMLEndTag AST node. |
- Returns
- string containing an HTML tag.
◆ clang_HTMLTagComment_getTagName()
- Parameters
-
Comment | a CXComment_HTMLStartTag or CXComment_HTMLEndTag AST node. |
- Returns
- HTML tag name.
◆ clang_InlineCommandComment_getArgText()
- Parameters
-
Comment | a CXComment_InlineCommand AST node. |
ArgIdx | argument index (zero-based). |
- Returns
- text of the specified argument.
◆ clang_InlineCommandComment_getCommandName()
- Parameters
-
Comment | a CXComment_InlineCommand AST node. |
- Returns
- name of the inline command.
◆ clang_InlineCommandComment_getNumArgs()
- Parameters
-
Comment | a CXComment_InlineCommand AST node. |
- Returns
- number of command arguments.
◆ clang_InlineCommandComment_getRenderKind()
- Parameters
-
Comment | a CXComment_InlineCommand AST node. |
- Returns
- the most appropriate rendering mode, chosen on command semantics in Doxygen.
◆ clang_InlineContentComment_hasTrailingNewline()
- Returns
- non-zero if
Comment
is inline content and has a newline immediately following it in the comment text. Newlines between paragraphs do not count.
◆ clang_ParamCommandComment_getDirection()
- Parameters
-
Comment | a CXComment_ParamCommand AST node. |
- Returns
- parameter passing direction.
◆ clang_ParamCommandComment_getParamIndex()
- Parameters
-
Comment | a CXComment_ParamCommand AST node. |
- Returns
- zero-based parameter index in function prototype.
◆ clang_ParamCommandComment_getParamName()
- Parameters
-
Comment | a CXComment_ParamCommand AST node. |
- Returns
- parameter name.
◆ clang_ParamCommandComment_isDirectionExplicit()
- Parameters
-
Comment | a CXComment_ParamCommand AST node. |
- Returns
- non-zero if parameter passing direction was specified explicitly in the comment.
◆ clang_ParamCommandComment_isParamIndexValid()
- Parameters
-
Comment | a CXComment_ParamCommand AST node. |
- Returns
- non-zero if the parameter that this AST node represents was found in the function prototype and
clang_ParamCommandComment_getParamIndex
function will return a meaningful value.
◆ clang_TextComment_getText()
- Parameters
-
Comment | a CXComment_Text AST node. |
- Returns
- text contained in the AST node.
◆ clang_TParamCommandComment_getDepth()
- Parameters
-
Comment | a CXComment_TParamCommand AST node. |
- Returns
- zero-based nesting depth of this parameter in the template parameter list.
For example,
* template<typename C, template<typename T> class TT>
* void test(TT<int> aaa);
*
for C and TT nesting depth is 0, for T nesting depth is 1.
◆ clang_TParamCommandComment_getIndex()
- Parameters
-
Comment | a CXComment_TParamCommand AST node. |
- Returns
- zero-based parameter index in the template parameter list at a given nesting depth.
For example,
* template<typename C, template<typename T> class TT>
* void test(TT<int> aaa);
*
for C and TT nesting depth is 0, so we can ask for index at depth 0: at depth 0 C's index is 0, TT's index is 1.
For T nesting depth is 1, so we can ask for index at depth 0 and 1: at depth 0 T's index is 1 (same as TT's), at depth 1 T's index is 0.
◆ clang_TParamCommandComment_getParamName()
- Parameters
-
Comment | a CXComment_TParamCommand AST node. |
- Returns
- template parameter name.
◆ clang_TParamCommandComment_isParamPositionValid()
- Parameters
-
Comment | a CXComment_TParamCommand AST node. |
- Returns
- non-zero if the parameter that this AST node represents was found in the template parameter list and
clang_TParamCommandComment_getDepth
and clang_TParamCommandComment_getIndex
functions will return a meaningful value.
◆ clang_VerbatimBlockLineComment_getText()
- Parameters
-
Comment | a CXComment_VerbatimBlockLine AST node. |
- Returns
- text contained in the AST node.
◆ clang_VerbatimLineComment_getText()
- Parameters
-
Comment | a CXComment_VerbatimLine AST node. |
- Returns
- text contained in the AST node.