docs: use glob pattern to match source code docs (#1918)

This commit is contained in:
ReenigneArcher 2023-12-17 10:37:54 -05:00 • committed by GitHub
commit 068c3fa303
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 36 additions and 73 deletions

View file

@ -1,10 +0,0 @@
platform
========
.. toctree::
:maxdepth: 1
platform/common
platform/linux
platform/macos
platform/windows

View file

@ -1,12 +0,0 @@
linux
=====
.. toctree::
:maxdepth: 1
linux/cuda
linux/graphics
linux/misc
linux/vaapi
linux/wayland
linux/x11grab

View file

@ -1,11 +0,0 @@
macos
=====
.. toctree::
:maxdepth: 1
macos/av_audio
macos/av_img_t
macos/av_video
macos/misc
macos/nv12_zero_device

View file

@ -1,9 +0,0 @@
windows
=======
.. toctree::
:maxdepth: 1
windows/display
windows/misc
windows/PolicyConfig

View file

@ -0,0 +1,91 @@
Source Code
===========
We are in process of improving the source code documentation. Code should be documented using Doxygen syntax.
Some examples exist in `main.h` and `main.cpp`. In order for documentation within the code to appear in the
rendered docs, the definition of the object must be in a header file, although the documentation itself can (and
should) be in the source file.
Example Documentation Blocks
----------------------------
**file.h**
.. code-block:: c
// functions
int main(int argc, char *argv[]);
**file.cpp** (with markdown)
.. code-block:: cpp
/**
* @brief Main application entry point.
* @param argc The number of arguments.
* @param argv The arguments.
*
* EXAMPLES:
* ```cpp
* main(1, const char* args[] = {"hello", "markdown", nullptr});
* ```
*/
int main(int argc, char *argv[]) {
// do stuff
}
**file.cpp** (with ReStructuredText)
.. code-block:: cpp
/**
* @brief Main application entry point.
* @param argc The number of arguments.
* @param argv The arguments.
* @rst
* EXAMPLES:
*
* .. code-block:: cpp
* main(1, const char* args[] = {"hello", "rst", nullptr});
* @endrst
*/
int main(int argc, char *argv[]) {
// do stuff
}
Source
------
.. toctree::
:caption: src
:maxdepth: 1
:glob:
src/*
.. toctree::
:caption: src/platform
:maxdepth: 1
:glob:
src/platform/*
.. toctree::
:caption: src/platform/linux
:maxdepth: 1
:glob:
src/platform/linux/*
.. toctree::
:caption: src/platform/macos
:maxdepth: 1
:glob:
src/platform/macos/*
.. toctree::
:caption: src/platform/windows
:maxdepth: 1
:glob:
src/platform/windows/*

View file

@ -0,0 +1,5 @@
audio
=====
.. doxygenfile:: audio.h
:allow-dot-graphs:

View file

@ -0,0 +1,5 @@
cbs
===
.. doxygenfile:: cbs.h
:allow-dot-graphs:

View file

@ -0,0 +1,5 @@
config
======
.. doxygenfile:: config.h
:allow-dot-graphs:

View file

@ -0,0 +1,5 @@
confighttp
==========
.. doxygenfile:: confighttp.h
:allow-dot-graphs:

View file

@ -0,0 +1,5 @@
crypto
======
.. doxygenfile:: crypto.h
:allow-dot-graphs:

View file

@ -0,0 +1,5 @@
httpcommon
==========
.. doxygenfile:: httpcommon.h
:allow-dot-graphs:

View file

@ -0,0 +1,5 @@
input
=====
.. doxygenfile:: input.h
:allow-dot-graphs:

View file

@ -0,0 +1,5 @@
main
====
.. doxygenfile:: main.h
:allow-dot-graphs:

View file

@ -0,0 +1,5 @@
move_by_copy
============
.. doxygenfile:: move_by_copy.h
:allow-dot-graphs:

View file

@ -0,0 +1,5 @@
network
=======
.. doxygenfile:: network.h
:allow-dot-graphs:

View file

@ -0,0 +1,5 @@
nvhttp
======
.. doxygenfile:: nvhttp.h
:allow-dot-graphs:

View file

@ -0,0 +1,4 @@
common
======
.. Todo:: Add common.h

View file

@ -0,0 +1,5 @@
cuda
====
.. doxygenfile:: platform/linux/cuda.h
:allow-dot-graphs:

View file

@ -0,0 +1,4 @@
graphics
========
.. Todo:: Add graphics.h

View file

@ -0,0 +1,4 @@
misc
====
.. Todo:: Add misc.h

Some files were not shown because too many files have changed in this diff Show more