C++ domain customization¶
-
cpp_strip_namespaces_from_signatures : list[str] =
[]
¶ list[str]
specifying namespaces to strip from signatures. This does not apply to the name of the symbol being defined by the signature, only to parameter types, return types, default value expressions, etc.For example, with the following in
conf.py
:cpp_strip_namespaces_from_signatures = [ "my_ns1", "my_ns2", "my_ns2::my_nested_ns", ]
.. cpp:type:: my_ns1::A .. cpp:type:: my_ns2::my_nested_ns::B .. cpp:type:: my_ns3::C .. cpp:function:: void my_ns1::MyFunction(my_ns1::A x, my_ns2::my_nested_ns::B y, my_ns3::C);
Warning
If a nested symbol name like
"my_ns1::abc"
is specified incpp_strip_namespaces_from_signatures
, then a reference likemy_ns1::abc::X
will be converted tomy_ns1::X
. To also strip themy_ns1::
portion,"my_ns1"
must also be specified incpp_strip_namespaces_from_signatures
.
-
cpp_qualify_parameter_ids : bool =
True
¶ Specifies whether function, template, and macro parameters should be assigned fully-qualified ids (for cross-linking purposes) of the form
<parent-id>-p-<param-name>
based on the id of the parent declaration.If set to
False
, instead the shorter unqualified idp-<param-name>
is used. This option should only be set toFalse
if each C++ declaration is on a separate page.
#include
directives in signatures¶
This theme extend the C and C++ domains to allow signatures to specify required
#include
directives.
.. cpp:function:: #include "my_header.h"
#include "another_header.h"
void foo(int param);
Some function.