Issues

Issue #139 resolved

cfunction scope and roles

Dmitriy Morozov
created an issue

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.

Comments (2)

  1. Log in to comment