I have two class templates and I need to document them using Sphinx
. As usual, I have used the Doxygen
style comment for the classes. But while I have used the doxygen directive I am not able to get the proper documentation.
Sample classes
namespace X
{
/// Base Class
/**
* Description of Base Class
* */
class A
{
// Intentionally kept blank
};
/// Child Class First
/**
* Description of First Child Class
* */
template <typename T, int length_x>
class B : public A
{
// Intentionally kept blank
};
/// Child Class Second
/**
* Description of Second Child Class
* */
template<typename T>
class B<T, 1> : public A
{
// Intentionally kept blank
};
}
Content of the rst file
.. _dummy class:
Dummy Class
===========
.. doxygenclass:: X::A
:members:
:protected-members:
:private-members:
.. doxygenclass:: X::B
:members:
:protected-members:
:private-members:
.. I know that the following will not work but given as my approach
.. doxygenclass:: X::B
:members:
:protected-members:
:private-members:
I have also tried the following by seeing this, but failed.
.. _dummy class:
Dummy Class
===========
.. doxygenclass:: X::A
:members:
:protected-members:
:private-members:
.. doxygenclass:: X::B
:members:
:protected-members:
:private-members:
.. doxygenclass:: X::B<T, 1>
:members:
:protected-members:
:private-members:
Is there any way to document both child classes using Sphinx
?