Class ClangDocumentation
- java.lang.Object
-
- org.lwjgl.llvm.ClangDocumentation
-
public class ClangDocumentation extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClangDocumentation.Functions
Contains the function pointers loaded fromClangIndex.getLibrary()
.
-
Field Summary
Fields Modifier and Type Field Description static int
CXComment_BlockCommand
CXComment_FullComment
CXComment_HTMLEndTag
CXComment_HTMLStartTag
CXComment_InlineCommand
CXComment_Null
CXComment_Paragraph
CXComment_ParamCommand
CXComment_Text
CXComment_TParamCommand
CXComment_VerbatimBlockCommand
CXComment_VerbatimBlockLine
CXComment_VerbatimLineDescribes the type of the comment AST node (CXComment
).static int
CXCommentInlineCommandRenderKind_Bold
CXCommentInlineCommandRenderKind_Emphasized
CXCommentInlineCommandRenderKind_Monospaced
CXCommentInlineCommandRenderKind_NormalThe most appropriate rendering mode for an inline command, chosen on command semantics in Doxygen.static int
CXCommentParamPassDirection_In
CXCommentParamPassDirection_InOut
CXCommentParamPassDirection_OutDescribes parameter passing direction for \param or \arg command.
-
Method Summary
-
-
-
Field Detail
-
CXComment_Null, CXComment_Text, CXComment_InlineCommand, CXComment_HTMLStartTag, CXComment_HTMLEndTag, CXComment_Paragraph, CXComment_BlockCommand, CXComment_ParamCommand, CXComment_TParamCommand, CXComment_VerbatimBlockCommand, CXComment_VerbatimBlockLine, CXComment_VerbatimLine, CXComment_FullComment
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).(
enum CXCommentKind
)Enum values:
Comment_Null
- Null comment. No AST node is constructed at the requested location because there is no text or a syntax error.Comment_Text
- Plain text. Inline content.Comment_InlineCommand
- A command with word-like arguments that is considered inline content.For example: \c command.
Comment_HTMLStartTag
- HTML start tag with attributes (name-value pairs). Considered inline content.For example:
<br> <br /> <a href="http://example.org/">
Comment_HTMLEndTag
- HTML end tag. Considered inline content.For example:
</a>
Comment_Paragraph
- A paragraph, contains inline comment. The paragraph itself is block content.Comment_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: has 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.
Comment_ParamCommand
- A \param or \arg command that describes the function parameter (name, passing direction, description).For example: \param [in] ParamName description.
Comment_TParamCommand
- A \tparam command that describes a template parameter (name and description).For example: \tparam T description.
Comment_VerbatimBlockCommand
- A verbatim block command (e. g., preformatted code). Verbatim block has an opening and a closing command and contains multiple lines of text (Comment_VerbatimBlockLine
child nodes).For example: \verbatim aaa \endverbatim
Comment_VerbatimBlockLine
- A line of text that is contained within a CXComment_VerbatimBlockCommand node.Comment_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.Comment_FullComment
- A full comment attached to a declaration, contains block content.
-
CXCommentInlineCommandRenderKind_Normal, CXCommentInlineCommandRenderKind_Bold, CXCommentInlineCommandRenderKind_Monospaced, CXCommentInlineCommandRenderKind_Emphasized
The most appropriate rendering mode for an inline command, chosen on command semantics in Doxygen.(
enum CXCommentInlineCommandRenderKind
)Enum values:
CommentInlineCommandRenderKind_Normal
- Command argument should be rendered in a normal font.CommentInlineCommandRenderKind_Bold
- Command argument should be rendered in a bold font.CommentInlineCommandRenderKind_Monospaced
- Command argument should be rendered in a monospaced font.CommentInlineCommandRenderKind_Emphasized
- Command argument should be rendered emphasized (typically italic font).
-
CXCommentParamPassDirection_In, CXCommentParamPassDirection_Out, CXCommentParamPassDirection_InOut
Describes parameter passing direction for \param or \arg command.(
enum CXCommentParamPassDirection
)Enum values:
CommentParamPassDirection_In
- The parameter is an input parameter.CommentParamPassDirection_Out
- The parameter is an output parameter.CommentParamPassDirection_InOut
- The parameter is an input and output parameter.
-
-
Method Detail
-
nclang_Cursor_getParsedComment
public static void nclang_Cursor_getParsedComment(long C, long __functionAddress, long __result) public static void nclang_Cursor_getParsedComment(long C, long __result)
Unsafe version of:Cursor_getParsedComment
-
clang_Cursor_getParsedComment
public static CXComment clang_Cursor_getParsedComment(CXCursor C, CXComment __result)
Given a cursor that represents a documentable entity (e.g., declaration), return the associated parsed comment as aComment_FullComment
AST node.
-
nclang_Comment_getKind
public static int nclang_Comment_getKind(long Comment, long __functionAddress) public static int nclang_Comment_getKind(long Comment)
Unsafe version of:Comment_getKind
-
clang_Comment_getKind
public static int clang_Comment_getKind(CXComment Comment)
- Parameters:
Comment
- AST node of any kind- Returns:
- the type of the AST node
-
nclang_Comment_getNumChildren
public static int nclang_Comment_getNumChildren(long Comment, long __functionAddress) public static int nclang_Comment_getNumChildren(long Comment)
Unsafe version of:Comment_getNumChildren
-
clang_Comment_getNumChildren
public static int clang_Comment_getNumChildren(CXComment Comment)
- Parameters:
Comment
- AST node of any kind- Returns:
- number of children of the AST node
-
nclang_Comment_getChild
public static void nclang_Comment_getChild(long Comment, int ChildIdx, long __functionAddress, long __result) public static void nclang_Comment_getChild(long Comment, int ChildIdx, long __result)
Unsafe version of:Comment_getChild
-
clang_Comment_getChild
public static CXComment clang_Comment_getChild(CXComment Comment, int ChildIdx, CXComment __result)
- Parameters:
Comment
- AST node of any kindChildIdx
- child index (zero-based)__result
- the specified child of the AST node
-
nclang_Comment_isWhitespace
public static int nclang_Comment_isWhitespace(long Comment, long __functionAddress) public static int nclang_Comment_isWhitespace(long Comment)
Unsafe version of:Comment_isWhitespace
-
clang_Comment_isWhitespace
public static boolean clang_Comment_isWhitespace(CXComment Comment)
AComment_Paragraph
node is considered whitespace if it contains onlyComment_Text
nodes that are empty or whitespace.Other AST nodes (except
CXComment_Paragraph
andCXComment_Text
) are never considered whitespace.- Returns:
- non-zero if
Comment
is whitespace
-
nclang_InlineContentComment_hasTrailingNewline
public static int nclang_InlineContentComment_hasTrailingNewline(long Comment, long __functionAddress) public static int nclang_InlineContentComment_hasTrailingNewline(long Comment)
Unsafe version of:InlineContentComment_hasTrailingNewline
-
clang_InlineContentComment_hasTrailingNewline
public static boolean clang_InlineContentComment_hasTrailingNewline(CXComment Comment)
- 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.
-
nclang_TextComment_getText
public static void nclang_TextComment_getText(long Comment, long __functionAddress, long __result) public static void nclang_TextComment_getText(long Comment, long __result)
Unsafe version of:TextComment_getText
-
clang_TextComment_getText
public static CXString clang_TextComment_getText(CXComment Comment, CXString __result)
- Parameters:
Comment
- aComment_Text
AST node__result
- text contained in the AST node
-
nclang_InlineCommandComment_getCommandName
public static void nclang_InlineCommandComment_getCommandName(long Comment, long __functionAddress, long __result) public static void nclang_InlineCommandComment_getCommandName(long Comment, long __result)
Unsafe version of:InlineCommandComment_getCommandName
-
clang_InlineCommandComment_getCommandName
public static CXString clang_InlineCommandComment_getCommandName(CXComment Comment, CXString __result)
- Parameters:
Comment
- aComment_InlineCommand
AST node__result
- name of the inline command
-
nclang_InlineCommandComment_getRenderKind
public static int nclang_InlineCommandComment_getRenderKind(long Comment, long __functionAddress) public static int nclang_InlineCommandComment_getRenderKind(long Comment)
Unsafe version of:InlineCommandComment_getRenderKind
-
clang_InlineCommandComment_getRenderKind
public static int clang_InlineCommandComment_getRenderKind(CXComment Comment)
- Parameters:
Comment
- aComment_InlineCommand
AST node- Returns:
- the most appropriate rendering mode, chosen on command semantics in Doxygen
-
nclang_InlineCommandComment_getNumArgs
public static int nclang_InlineCommandComment_getNumArgs(long Comment, long __functionAddress) public static int nclang_InlineCommandComment_getNumArgs(long Comment)
Unsafe version of:InlineCommandComment_getNumArgs
-
clang_InlineCommandComment_getNumArgs
public static int clang_InlineCommandComment_getNumArgs(CXComment Comment)
- Parameters:
Comment
- aComment_InlineCommand
AST node- Returns:
- number of command arguments
-
nclang_InlineCommandComment_getArgText
public static void nclang_InlineCommandComment_getArgText(long Comment, int ArgIdx, long __functionAddress, long __result) public static void nclang_InlineCommandComment_getArgText(long Comment, int ArgIdx, long __result)
Unsafe version of:InlineCommandComment_getArgText
-
clang_InlineCommandComment_getArgText
public static CXString clang_InlineCommandComment_getArgText(CXComment Comment, int ArgIdx, CXString __result)
- Parameters:
Comment
- aComment_InlineCommand
AST nodeArgIdx
- argument index (zero-based)__result
- text of the specified argument
-
nclang_HTMLTagComment_getTagName
public static void nclang_HTMLTagComment_getTagName(long Comment, long __functionAddress, long __result) public static void nclang_HTMLTagComment_getTagName(long Comment, long __result)
Unsafe version of:HTMLTagComment_getTagName
-
clang_HTMLTagComment_getTagName
public static CXString clang_HTMLTagComment_getTagName(CXComment Comment, CXString __result)
- Parameters:
Comment
- aComment_HTMLStartTag
orComment_HTMLEndTag
AST node__result
- HTML tag name
-
nclang_HTMLStartTagComment_isSelfClosing
public static int nclang_HTMLStartTagComment_isSelfClosing(long Comment, long __functionAddress) public static int nclang_HTMLStartTagComment_isSelfClosing(long Comment)
Unsafe version of:HTMLStartTagComment_isSelfClosing
-
clang_HTMLStartTagComment_isSelfClosing
public static boolean clang_HTMLStartTagComment_isSelfClosing(CXComment Comment)
- Parameters:
Comment
- aComment_HTMLStartTag
AST node- Returns:
- non-zero if tag is self-closing (for example, <br /> )
-
nclang_HTMLStartTag_getNumAttrs
public static int nclang_HTMLStartTag_getNumAttrs(long Comment, long __functionAddress) public static int nclang_HTMLStartTag_getNumAttrs(long Comment)
Unsafe version of:HTMLStartTag_getNumAttrs
-
clang_HTMLStartTag_getNumAttrs
public static int clang_HTMLStartTag_getNumAttrs(CXComment Comment)
- Parameters:
Comment
- aComment_HTMLStartTag
AST node- Returns:
- number of attributes (name-value pairs) attached to the start tag
-
nclang_HTMLStartTag_getAttrName
public static void nclang_HTMLStartTag_getAttrName(long Comment, int AttrIdx, long __functionAddress, long __result) public static void nclang_HTMLStartTag_getAttrName(long Comment, int AttrIdx, long __result)
Unsafe version of:HTMLStartTag_getAttrName
-
clang_HTMLStartTag_getAttrName
public static CXString clang_HTMLStartTag_getAttrName(CXComment Comment, int AttrIdx, CXString __result)
- Parameters:
Comment
- aComment_HTMLStartTag
AST nodeAttrIdx
- attribute index (zero-based)__result
- name of the specified attribute
-
nclang_HTMLStartTag_getAttrValue
public static void nclang_HTMLStartTag_getAttrValue(long Comment, int AttrIdx, long __functionAddress, long __result) public static void nclang_HTMLStartTag_getAttrValue(long Comment, int AttrIdx, long __result)
Unsafe version of:HTMLStartTag_getAttrValue
-
clang_HTMLStartTag_getAttrValue
public static CXString clang_HTMLStartTag_getAttrValue(CXComment Comment, int AttrIdx, CXString __result)
- Parameters:
Comment
- aComment_HTMLStartTag
AST nodeAttrIdx
- attribute index (zero-based)__result
- value of the specified attribute
-
nclang_BlockCommandComment_getCommandName
public static void nclang_BlockCommandComment_getCommandName(long Comment, long __functionAddress, long __result) public static void nclang_BlockCommandComment_getCommandName(long Comment, long __result)
Unsafe version of:BlockCommandComment_getCommandName
-
clang_BlockCommandComment_getCommandName
public static CXString clang_BlockCommandComment_getCommandName(CXComment Comment, CXString __result)
- Parameters:
Comment
- aComment_BlockCommand
AST node__result
- name of the block command
-
nclang_BlockCommandComment_getNumArgs
public static int nclang_BlockCommandComment_getNumArgs(long Comment, long __functionAddress) public static int nclang_BlockCommandComment_getNumArgs(long Comment)
Unsafe version of:BlockCommandComment_getNumArgs
-
clang_BlockCommandComment_getNumArgs
public static int clang_BlockCommandComment_getNumArgs(CXComment Comment)
- Parameters:
Comment
- aComment_BlockCommand
AST node- Returns:
- number of word-like arguments
-
nclang_BlockCommandComment_getArgText
public static void nclang_BlockCommandComment_getArgText(long Comment, int ArgIdx, long __functionAddress, long __result) public static void nclang_BlockCommandComment_getArgText(long Comment, int ArgIdx, long __result)
Unsafe version of:BlockCommandComment_getArgText
-
clang_BlockCommandComment_getArgText
public static CXString clang_BlockCommandComment_getArgText(CXComment Comment, int ArgIdx, CXString __result)
- Parameters:
Comment
- aComment_BlockCommand
AST nodeArgIdx
- argument index (zero-based)__result
- text of the specified word-like argument
-
nclang_BlockCommandComment_getParagraph
public static void nclang_BlockCommandComment_getParagraph(long Comment, long __functionAddress, long __result) public static void nclang_BlockCommandComment_getParagraph(long Comment, long __result)
Unsafe version of:BlockCommandComment_getParagraph
-
clang_BlockCommandComment_getParagraph
public static CXComment clang_BlockCommandComment_getParagraph(CXComment Comment, CXComment __result)
- Parameters:
Comment
- aComment_BlockCommand
orComment_VerbatimBlockCommand
AST node__result
- paragraph argument of the block command
-
nclang_ParamCommandComment_getParamName
public static void nclang_ParamCommandComment_getParamName(long Comment, long __functionAddress, long __result) public static void nclang_ParamCommandComment_getParamName(long Comment, long __result)
Unsafe version of:ParamCommandComment_getParamName
-
clang_ParamCommandComment_getParamName
public static CXString clang_ParamCommandComment_getParamName(CXComment Comment, CXString __result)
- Parameters:
Comment
- aComment_ParamCommand
AST node__result
- parameter name
-
nclang_ParamCommandComment_isParamIndexValid
public static int nclang_ParamCommandComment_isParamIndexValid(long Comment, long __functionAddress) public static int nclang_ParamCommandComment_isParamIndexValid(long Comment)
Unsafe version of:ParamCommandComment_isParamIndexValid
-
clang_ParamCommandComment_isParamIndexValid
public static boolean clang_ParamCommandComment_isParamIndexValid(CXComment Comment)
- Parameters:
Comment
- aComment_ParamCommand
AST node- Returns:
- non-zero if the parameter that this AST node represents was found in the function prototype and
ParamCommandComment_getParamIndex
function will return a meaningful value
-
nclang_ParamCommandComment_getParamIndex
public static int nclang_ParamCommandComment_getParamIndex(long Comment, long __functionAddress) public static int nclang_ParamCommandComment_getParamIndex(long Comment)
Unsafe version of:ParamCommandComment_getParamIndex
-
clang_ParamCommandComment_getParamIndex
public static int clang_ParamCommandComment_getParamIndex(CXComment Comment)
- Parameters:
Comment
- aComment_ParamCommand
AST node- Returns:
- zero-based parameter index in function prototype
-
nclang_ParamCommandComment_isDirectionExplicit
public static int nclang_ParamCommandComment_isDirectionExplicit(long Comment, long __functionAddress) public static int nclang_ParamCommandComment_isDirectionExplicit(long Comment)
Unsafe version of:ParamCommandComment_isDirectionExplicit
-
clang_ParamCommandComment_isDirectionExplicit
public static boolean clang_ParamCommandComment_isDirectionExplicit(CXComment Comment)
- Parameters:
Comment
- aComment_ParamCommand
AST node- Returns:
- non-zero if parameter passing direction was specified explicitly in the comment
-
nclang_ParamCommandComment_getDirection
public static int nclang_ParamCommandComment_getDirection(long Comment, long __functionAddress) public static int nclang_ParamCommandComment_getDirection(long Comment)
Unsafe version of:ParamCommandComment_getDirection
-
clang_ParamCommandComment_getDirection
public static int clang_ParamCommandComment_getDirection(CXComment Comment)
- Parameters:
Comment
- aComment_ParamCommand
AST node- Returns:
- parameter passing direction
-
nclang_TParamCommandComment_getParamName
public static void nclang_TParamCommandComment_getParamName(long Comment, long __functionAddress, long __result) public static void nclang_TParamCommandComment_getParamName(long Comment, long __result)
Unsafe version of:TParamCommandComment_getParamName
-
clang_TParamCommandComment_getParamName
public static CXString clang_TParamCommandComment_getParamName(CXComment Comment, CXString __result)
- Parameters:
Comment
- aComment_TParamCommand
AST node__result
- template parameter name
-
nclang_TParamCommandComment_isParamPositionValid
public static int nclang_TParamCommandComment_isParamPositionValid(long Comment, long __functionAddress) public static int nclang_TParamCommandComment_isParamPositionValid(long Comment)
Unsafe version of:TParamCommandComment_isParamPositionValid
-
clang_TParamCommandComment_isParamPositionValid
public static boolean clang_TParamCommandComment_isParamPositionValid(CXComment Comment)
- Parameters:
Comment
- aComment_TParamCommand
AST node- Returns:
- non-zero if the parameter that this AST node represents was found in the template parameter list and
TParamCommandComment_getDepth
andTParamCommandComment_getIndex
functions will return a meaningful value
-
nclang_TParamCommandComment_getDepth
public static int nclang_TParamCommandComment_getDepth(long Comment, long __functionAddress) public static int nclang_TParamCommandComment_getDepth(long Comment)
Unsafe version of:TParamCommandComment_getDepth
-
clang_TParamCommandComment_getDepth
public static int clang_TParamCommandComment_getDepth(CXComment Comment)
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.
- Parameters:
Comment
- aComment_TParamCommand
AST node- Returns:
- zero-based nesting depth of this parameter in the template parameter list
-
nclang_TParamCommandComment_getIndex
public static int nclang_TParamCommandComment_getIndex(long Comment, int Depth, long __functionAddress) public static int nclang_TParamCommandComment_getIndex(long Comment, int Depth)
Unsafe version of:TParamCommandComment_getIndex
-
clang_TParamCommandComment_getIndex
public static int clang_TParamCommandComment_getIndex(CXComment Comment, int 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.
- Parameters:
Comment
- aComment_TParamCommand
AST node- Returns:
- zero-based parameter index in the template parameter list at a given nesting depth
-
nclang_VerbatimBlockLineComment_getText
public static void nclang_VerbatimBlockLineComment_getText(long Comment, long __functionAddress, long __result) public static void nclang_VerbatimBlockLineComment_getText(long Comment, long __result)
Unsafe version of:VerbatimBlockLineComment_getText
-
clang_VerbatimBlockLineComment_getText
public static CXString clang_VerbatimBlockLineComment_getText(CXComment Comment, CXString __result)
- Parameters:
Comment
- aComment_VerbatimBlockLine
AST node__result
- text contained in the AST node
-
nclang_VerbatimLineComment_getText
public static void nclang_VerbatimLineComment_getText(long Comment, long __functionAddress, long __result) public static void nclang_VerbatimLineComment_getText(long Comment, long __result)
Unsafe version of:VerbatimLineComment_getText
-
clang_VerbatimLineComment_getText
public static CXString clang_VerbatimLineComment_getText(CXComment Comment, CXString __result)
- Parameters:
Comment
- aComment_VerbatimLine
AST node__result
- text contained in the AST node
-
nclang_HTMLTagComment_getAsString
public static void nclang_HTMLTagComment_getAsString(long Comment, long __functionAddress, long __result) public static void nclang_HTMLTagComment_getAsString(long Comment, long __result)
Unsafe version of:HTMLTagComment_getAsString
-
clang_HTMLTagComment_getAsString
public static CXString clang_HTMLTagComment_getAsString(CXComment Comment, CXString __result)
Convert an HTML tag AST node to string.- Parameters:
Comment
- aComment_HTMLStartTag
orComment_HTMLEndTag
AST node__result
- string containing an HTML tag
-
nclang_FullComment_getAsHTML
public static void nclang_FullComment_getAsHTML(long Comment, long __functionAddress, long __result) public static void nclang_FullComment_getAsHTML(long Comment, long __result)
Unsafe version of:FullComment_getAsHTML
-
clang_FullComment_getAsHTML
public static CXString clang_FullComment_getAsHTML(CXComment Comment, CXString __result)
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-brief" for \paragraph and equivalent commands;
- "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
- aComment_FullComment
AST node__result
- string containing an HTML fragment
-
nclang_FullComment_getAsXML
public static void nclang_FullComment_getAsXML(long Comment, long __functionAddress, long __result) public static void nclang_FullComment_getAsXML(long Comment, long __result)
Unsafe version of:FullComment_getAsXML
-
clang_FullComment_getAsXML
public static CXString clang_FullComment_getAsXML(CXComment Comment, CXString __result)
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
- aComment_FullComment
AST node__result
- string containing an XML document
-
-