Alex exoskeleton
ALEX SoftwareDocumentation
|
to specify a brief description ```
Install Doxygen Document Generator
This document is a style guide to provide best practice formatting guidelines for ALEX Software Documentation using Doxygen. As such, the guide is a compilation of material from the Doxygen Manual and the How to Write Doc Comments for the Javadoc Tool technical article. The latter document contains a Javadoc style guide which provides conventions for creating useful API documents - these conventions are included at the end of this document as an essential documentation reference.
```c++ CPP_CLI_SUPPORT = YES //Parsing Support for C++/CLI language JAVADOC_AUTOBRIEF = NO //Explicitly useUsing the default settings, Doxygen Document Generator automatically creates a doc comment block when you type /**
Using Visual Studio Preview Version 16.6.0 Preview 5.0
To switch to Doxygen, type “Doxygen” in the Ctrl+Q search box, or go to Tools > Options > Text Editor > C/C++ > > General, and choose your preferred documentation style: Doxygen(/**)
Source: Doxygen and XML Doc Comment Support
Part-example of Documented Drive.h
Function Command | Decription | Doxygen Manual Link |
---|---|---|
\param | Used to describe a function parameter | command |
\return | Used to describe the function return variable | command |
\sa | Used to refer to associated functions, may be used to avoid unnecessary repitition | command |
The following tips (sourced from the Javadoc Style Guide) provide convention for using \param
and \return
:
\param
- Use the command \param
followed by the name (not the data type) of the parameter, then the description. By convention:\return
\return
for methods that return void and for constructors\return
for all other methods, even if its content is entirely redundant with the method description### Function Description Prototype
Source: Doxygen Manual
Doxygen Output - Documenting Enum Type
Using In-line Comments to Display an Enum Table /**< enum value 1 */
represents an inline comment. This comment is placed after the member it refers to, this association is indicated by <
symbol in the comment description. Here, the placement of in-line comments associated the enum variable Eval1
with its value 1
and Doxygen creates an enum table from these associations.
Function Command | Decription | Doxygen Manual Link |
---|---|---|
@code | Starts a code block. A code block is interpreted as source code. Names of class, members, and other documented entities are replaced by links to the documentation. Use with \endcode | command |
\b<word> | Displays the argument <word> in bold font. Equivalent to HTML <b>multiple words</b> | command \e<word> Displays the argument <word> in italic font. Equivalent to HTML <em>multiple words</em> command \details Starts the detail description. Alternatively, a detailed description is started with a new paragraph (after a blank line) command |
\todo | Starts a paragraph where a TODO item is described. The description will also add an item to a separate TODO list. | command |
\test | Starts a paragraph where a test case can be described. The description will also add the test case to a separate test list. | command |
|\bug
| |\deprecated
|
Doxygen supports the use of Markdown to create tables in the doc comments. These should be used to document mappings (key-value pairs) when an enum type is not used. See the example below:
For column alignment, one or two colons (:
) can be used to select the type of alignment in the header seperator line. See the example below:
Doxygen supports the use of LaTeX commands to document formulas. See the example below.
Function Command | Decription | Doxygen Manual Link |
---|---|---|
\f$ | Used to insert an in-line formula in a paragraph. End with \f$ | $ command |
| f[ ... \f]
or \f{ ... }{ ...\f}
| Used to insert column-centered and multi-line formulas into paragraph.
```c++ /**
} */
Preferred - This description more completely defines what a tool tip is, in the larger context of registering and being displayed in response to the cursor.
```java /**
text | the string to display. If the text is null, the tool tip is turned off for this component. */ public void setToolTipText(String text) ``` |
Tag Conventions - Note: The equivalent Doxygen commands will be used in place of Javadoc commands (@ replaced by \) Order of Tags - Include tags in the following order
\author
(classes and interfaces only, required)\version
(classes and interfaces only, required)\param
(methods and constructors only)\return
(methods only)\exception
(\throws
is a synonym)\sa
or \see\