Expose C++ Doxygen comments in Python __doc__#157
Open
AdityaPandeyCN wants to merge 2 commits intocompiler-research:masterfrom
Open
Expose C++ Doxygen comments in Python __doc__#157AdityaPandeyCN wants to merge 2 commits intocompiler-research:masterfrom
AdityaPandeyCN wants to merge 2 commits intocompiler-research:masterfrom
Conversation
Signed-off-by: AdityaPandeyCN <adityapand3y666@gmail.com>
| GetSignatureString(fa).c_str()); | ||
| } | ||
|
|
||
| PyObject* CPyCppyy::CPPMethod::GetDocString() |
Collaborator
There was a problem hiding this comment.
You have defined this function, but not called/used anywhere.
Also, due to implementation details __doc__ needs to be the function signature and not the doxygen string. Example:
In [2]: cppyy.gbl.std.vector[int].push_back.__doc__
Out[2]: 'void std::vector<int>::push_back(const std::vector<int>::value_type & __x)\nvoid std::vector<int>::push_back(std::vector<int>::value_type && __x)'If you are interested look at the following PRs:
Author
There was a problem hiding this comment.
The base class https://github.com/compiler-research/CPyCppyy/blob/master/src/PyCallable.h#L23 defines this a virtual function. I wanted to override to append doxygen comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR integrates Doxygen documentation comments from C++ into Python's
__doc__attribute for methods exposed via cppyy.CPPMethod::GetDocString()to append Doxygen comments after the method prototypeCppyy::GetDoxygenComment()API declaration to retrieve documentation from the backend