sphinx C++ domain

The C++ Domain

The C++ domain (name cpp) supports documenting C++ projects.

The following directives are available:

.. cpp:class:: signatures
.. cpp:function:: signatures
.. cpp:member:: signatures
.. cpp:type:: signatures

Describe a C++ object. Full signature specification is supported – give the signature as you would in the declaration. Here some examples:

.. cpp:function:: bool namespaced::theclass::method(int arg1, std::string arg2)

   Describes a method with parameters and types.

.. cpp:function:: bool namespaced::theclass::method(arg1, arg2)

   Describes a method without types.

.. cpp:function:: const T &array<T>::operator[]() const

   Describes the constant indexing operator of a templated array.

.. cpp:function:: operator bool() const

   Describe a casting operator here.

.. cpp:function:: constexpr void foo(std::string &bar[2]) noexcept

   Describe a constexpr function here.

.. cpp:member:: std::string theclass::name

.. cpp:member:: std::string theclass::name[N][M]

.. cpp:type:: theclass::const_iterator

Will be rendered like this:

bool namespaced::theclass::method(int arg1, std::string arg2)

Describes a method with parameters and types.

bool namespaced::theclass::method(arg1, arg2)

Describes a method without types.

operator bool() const

Describe a casting operator here.

constexpr void foo(std::string &bar[2]) noexcept

Describe a constexpr function here.

std::string theclass::name
type theclass::const_iterator
.. cpp:namespace:: namespace

Select the current C++ namespace for the following objects.