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

Add option to c:alias to alias structure contents #8141

Closed
Shamino0 opened this issue Aug 20, 2020 · 1 comment
Closed

Add option to c:alias to alias structure contents #8141

Shamino0 opened this issue Aug 20, 2020 · 1 comment
Labels
domains:c type:enhancement enhance or introduce a new feature

Comments

@Shamino0
Copy link

Thank you very much for the c:alias directive. It allows me to copy bits and pieces from my Doxygen-generated contents (produced using Breathe) to other locations in my document without breaking the links to the definitions.

For functions and macros, the alias is just what I want - I get the symbol, the return value and the parameters.

When displaying an alias of a struct, however, all I see is the name of the struct. This isn't terribly useful - it's no better than a :c:struct:`foo_t` statement.

Would it be possible to add an option to c:alias so the list of the fields could be displayed with the structure name itself?

For example:

.. c:struct:: Data

   .. c:var:: int a

   .. c:var:: double b

Assorted text here

.. c:alias:: Data
   :members:

More random text

.. c:alias:: Data

Rendering as:

struct Data
   int a
   double b

Assorted text here

struct Data
   int a
   double b

More random text

struct Data

@Shamino0 Shamino0 added the type:enhancement enhance or introduce a new feature label Aug 20, 2020
@jakobandersen
Copy link
Contributor

Good idea!

jakobandersen added a commit to jakobandersen/sphinx that referenced this issue Sep 13, 2020
jakobandersen added a commit to jakobandersen/sphinx that referenced this issue Sep 13, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
domains:c type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

2 participants