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

cfunction scope and roles #139

Closed
shimizukawa opened this issue Jan 2, 2015 · 1 comment
Closed

cfunction scope and roles #139

shimizukawa opened this issue Jan 2, 2015 · 1 comment
Labels
type:enhancement enhance or introduce a new feature

Comments

@shimizukawa
Copy link
Member

It would great if the cfunction directive was aware of its scope. I.e. if cfunction was declared inside of a ctype (as its child), then it should automatically prepend the name of that type to its id. Similar for the references (via func role) within that type. It should not, however, prepend the type name within the visible name in the output. I.e. I'm hoping for the behavior similar to the method behavior for Python documention.

So for example if one wrote:

.. ctype:: class A

   Some description of type A.

   .. cfunction:: f()

      Description of f.

  .. cfunction:: g()

      Calls :func:`f`.

Another reference to :func:`A::f`.

then ideally it would generate the same ids as if one wrote

.. ctype:: class A

   Some description of type A.

   .. cfunction:: A::f()

      Description of f.

  .. cfunction:: A::g()

      Calls :func:`A::f`.

Another reference to :func:`A::f`.

but without the confusing A:: within the class itself.


@shimizukawa shimizukawa added the type:enhancement enhance or introduce a new feature label Jan 2, 2015
@shimizukawa
Copy link
Member Author

From Georg Brandl on 2010-08-25 11:50:14+00:00

This is fixed by using the C++ domain, new in Sphinx 1.0, instead.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

1 participant