Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get property type from c# doxygen generated (C# support in general) #249

Closed
ms92ita opened this issue Mar 31, 2016 · 10 comments · Fixed by #550
Closed

Cannot get property type from c# doxygen generated (C# support in general) #249

ms92ita opened this issue Mar 31, 2016 · 10 comments · Fixed by #550
Assignees
Labels
enhancement Improvements, additions (also cosmetics) upstream Issue in external software

Comments

@ms92ita
Copy link

ms92ita commented Mar 31, 2016

Hi all,

i have generated documentation from doxygen and it has been created correctly, but when i create html (with command "make html") from sphinx and i have created a .rst with a doxygenclass directive like this:

.. doxygenclass:: myclass
:members:
:undoc-members:

I have noticed that, for properties, it hasn't been included the property type. For example:

property primarykey

when it must look like this:

property int primarykey.

Am I doing something wrong?

Thanks in advance

@ms92ita
Copy link
Author

ms92ita commented Apr 4, 2016

If you need some other infos, when I try to call make, for each property i have this warning:

D:\appendix\classes.rst:4: WARNING: Error in declarator or parameters and qualifiers If pointer to member declarator: Invalid definition: Expected identifier in nested name. [error at 62] Namespace:For::MyClass::MyProperty --------------------------------------------------------------^

The property is declared like this
public int MyProperty {get; set; }

@vitaut
Copy link
Contributor

vitaut commented Apr 8, 2016

Sphinx doesn't have a C# domain and Breathe falls back to the C++ domain in this case. The latter obviously doesn't know anything about C# properties, thus the error. Fixing this would require adding a new domain or implementing rendering of C# declarations in Breathe which will require substantial amount of work and I don't think it will happen any time soon.

@ms92ita
Copy link
Author

ms92ita commented Apr 8, 2016

Ok, so if I implement a domain that "converts" the c# declaration pattern in c++ pattern in breathe or doxygen, can i escape that?
Is it an other solution modifying the doxygen output (after build) to satisfy the c++ domain with a xsl transformation?

@vitaut
Copy link
Contributor

vitaut commented Apr 8, 2016

The domain doesn't convert a declaration in one language into another. It should parse the declaration and do the necessary processing such as generating a target (anchor) and rendering parts of the declaration. However, converting Doxygen representation (either XML or parsed) into the form that Breathe and Sphinx C++ domain can understand might be a viable workaround.

@ms92ita
Copy link
Author

ms92ita commented Apr 11, 2016

It seems that sphinx have some problems parsing the properties becuase, if I declare a single member or function, it takes the type but not for properties. I don't want to modify my source code and I don't know the workflow of sphinx, so is it possible to have a working example with a programming language that supports property type and views the type in breathe or sphinx documentation?

@noname77
Copy link

second that. has anyone come up with a solution?

@vermeeren vermeeren self-assigned this Jun 2, 2018
@vermeeren
Copy link
Collaborator

Current Sphinx does not have an official C# domain according to http://www.sphinx-doc.org/en/stable/domains.html.

I do notice @djungelorm has been working on https://github.com/djungelorm/sphinx-csharp. I haven't checked details but perhaps this could be used for the Sphinx side.

Support for the sphinxcontrib-phpdomain was recently merged with #351. This might serve as some sort of example for how to add support to Breathe for other domains.

@vermeeren vermeeren added suggestion Possible enhancement, open for debate upstream Issue in external software labels Jun 2, 2018
@vermeeren vermeeren changed the title Cannot get property type from c# doxygen generated Cannot get property type from c# doxygen generated (C# support in general) Aug 27, 2019
@vermeeren vermeeren removed their assignment Aug 27, 2019
@cadop
Copy link

cadop commented Jun 8, 2020

Is this closed? In #422 it says this issue will be used to track c# support.

Also, there are multiple references to the custom C# domain of sphinx. However, I can't find any information relating to how that domain would be used by breathe. Any guidance here?

@vermeeren
Copy link
Collaborator

@cadop The only potentially useful thing I know of would be the PHP domain, a link to that PR is in my previous comment here.

@rogerbarton
Copy link
Contributor

I've been working on this and I've started a PR #550

@vermeeren vermeeren linked a pull request Aug 19, 2020 that will close this issue
@vermeeren vermeeren added enhancement Improvements, additions (also cosmetics) and removed suggestion Possible enhancement, open for debate labels Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements, additions (also cosmetics) upstream Issue in external software
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants