sphinx_c_autodoc.clang package#
Submodules#
sphinx_c_autodoc.clang.comments module#
Expose some CXComment functionality to python for libclang
sphinx_c_autodoc.clang.patches module#
Provide functionality to patch the python clang bindings for some missing functionality.
- sphinx_c_autodoc.clang.patches.Cursor_cached_raw_comment(self: Cursor) str | None [source]#
Provides a caching mechanism to a Cursor’s raw comment instead of looking it up each time it’s called.
- sphinx_c_autodoc.clang.patches.Cursor_comment_extent(self: Cursor) SourceRange [source]#
Gets the extent of the associated comment.
For some reason libclang calls this “range” while other parts of the interface use the term “extent”, for consistency with the python API naming extent was used here.
- Returns:
The extent for the cursor’s raw_comment.
- Return type:
cindex.SourceRange
- sphinx_c_autodoc.clang.patches.Cursor_getParsedComment(self: Cursor) Comment [source]#
Get the parsed comment for the cursor
- Returns:
The comment for the cursor
- Return type:
- sphinx_c_autodoc.clang.patches.Cursor_is_macro_function_like(self: Cursor) bool [source]#
Determine if the macro is a function like macro
- Returns:
True if the macro is function like
- Return type:
boo
- sphinx_c_autodoc.clang.patches.Cursor_set_comment_extent(self: Cursor, value: SourceRange) None [source]#
Provides a mechanism to a set a Cursor’s comment extent. For things like macros clang doesn’t provide a mechanism to associate comments. So it may be done later, but the cursors can still be passed around like normal.
- sphinx_c_autodoc.clang.patches.Cursor_set_raw_comment(self: Cursor, value: str) None [source]#
Provides a mechanism to a set a Cursor’s raw comment. For things like macros clang doesn’t provide a mechanism to associate comments. So it may be done later, but the cursors can still be passed around like normal.
- sphinx_c_autodoc.clang.patches.Cursor_tu(self: Cursor) TranslationUnit [source]#
Provide the cursor’s translation unit in a “public” The Cursors have translation units as protected, underscore, but one can’t do very much querying without access to the translation unit.
- sphinx_c_autodoc.clang.patches.SourceLocation_isFromMainFile(self: SourceLocation) bool [source]#
Tests if a
cindex.SourceLocation
is in the main translation unit being parsed.- Returns:
- True if this location is in the main file of the translation unit.
False otherwise.
- Return type:
- sphinx_c_autodoc.clang.patches.add_dll_entry_points() None [source]#
Add functions available in the clang dll but not listed in the python clang bindings.
- sphinx_c_autodoc.clang.patches.add_new_methods() None [source]#
Add new methods to the classes in clang.