This is about how to use Doxygen to maintain the API documents. There are three parts:
$ ./doc/generate_doc.sh .This script runs on macOS, Linux, and Windows Subsystem for Linux (WSL).
Let's say the library name is “Foo”
The new configuration's path is $ROOT_AFR_DIR/doc/config/foo
Copy below as content:
# Include common configuration options. @INCLUDE_PATH = doc/config @INCLUDE = common # Basic project information. PROJECT_NAME = "Foo" # Library documentation output directory. HTML_OUTPUT = foo # Generate Doxygen tag file for this library. GENERATE_TAGFILE = doc/output/foo.tag # Directories containing library source code. INPUT = [The source files path] # Library file names. FILE_PATTERNS = *.h *.c *.txt EXAMPLE_PATH = [The source files path] # External tag files required by this library. TAGFILES = doc/output/main.tag=../main \
The path to put this txt file: $ROOT_AFR_DIR/doc/lib/foo.txt
In the following sections, follow each of them and append the content to the txt file.
/** @mainpage */
TODO: this section is copy-pasted currently. Need a better way.
/** @config_page{Foo} @config_brief{library} @section ...... @brief ...... ...... @configpossible ...... @configrecommended ...... @configdefault ...... */
/** @constants_page{Foo} @constants_brief{library} @section foo_constants_single Single Value Constants - @ref ...... @section foo_constants_multiple Multiple Values Constants - @ref ...... */
/** @functions_page{foo, Foo} @functions_brief{foo} - @function_name{foo_function_socket} - @function_brief{foo_function_socket} */ /** @page foo_function_func FOO_func @snippet aws_foo.h declare_foo_func @copydoc FOO_func" */
/** @handles_group{Foo} @handles_brief{library} @paramstructs_group{Foo} @paramstructs_brief{Foo, Foo library} */
/* @[declare_foo_func] */ void FOO_func(); /* @[declare_foo_func] */
@ingroup Foo_datatypes_handles
@ingroup Foo_datatypes_enums
@ingroup Foo_datatypes_paramstructs
/** * @anchor AGroupOfConstants * @name AGroupOfConstants * ... */ /**@{ */ #define Constants_1 #define Constants_2 /**@} */