Napoleon#

This extension also provides a way to extend napoleon to work with C constructs.

Enabling this feature simply requires adding the napoleon sub package of this extension to the list of desired sphinx extensions:

extensions = [
    'sphinx_c_autodoc.napoleon',
    ]

Note

Currently only the Google style docstrings are supported.

Using this extension will take:

/**
 * This example structure uses the `Members:` section and lets napoleon format
 * the members.
 *
 * Members:
 *     one: The first member of parent struct
 *     two: This is a structure declared in the parent struct its children are
 *         documented below.
 *         Members:
 *             nested_one: The nested member documentation
 *             nested_two: The second nested member documentation
 *     three: The third member of parent struct
 *
 */
struct members_documented_with_napoleon
{
    int one;
    struct {
        float nested_one;
        int nested_two;
    } two;
    float three;
};

and convert it into

struct members_documented_with_napoleon
[source]

This example structure uses the Members: section and lets napoleon format the members.

int one
[source]

The first member of parent struct

struct two
[source]

This is a structure declared in the parent struct its children are documented below.

float nested_one
[source]

The nested member documentation

int nested_two
[source]

The second nested member documentation

float three
[source]

The third member of parent struct