Doxygen Cheat Sheet



  1. Doxygen Cheat Sheet Pdf
  2. Doxygen Tags Cheat Sheet
  3. Doxygen Syntax Cheat Sheet
  4. Doxygen Cheat Sheet Printable

Doxygen is parsing the cpp file in question and documenting a few #defines in it, but totally skipping over the class. How do I get Doxygen to see it? Can I put something in the doxyfile or in the file itself? Improve this question. Follow asked Jun 15 '12 at 20:39. /. Natspec multi liner./ Natspec is Doxygen-like syntax for documenting functions, arguments etc. Simple data types type public constant name; uint public amount; delete amount; - deletes variable content Getters are automatically generated for public vars. Constant vars have to be initialized on declaration.

Doxygen is a tool that generates documentation from source code. Click here for the online Doxygen manual. The offline PDF manual is even better.

The comments embedded in the source code must be formatted in a special way, which may decrease readability for users not familiar with the special syntax. Markdown formatting is human readable and easy to grasp and has been included since Doxygen 1.8.0. Files with regular markdown syntax (as used by GitHub) are indicated with a *.md extension. Files using specialised Doxygen syntax are indicated with a *.dox extension.

The JavaDoc comment style was selected for this library. Although harder to type, an @ (at) character was selected to mark special commands instead of the (backslash) character to make these commands more prominent.

The Doxygen configuration file ('Doxyfile') can be found in the doc subdirectory. An excellent cross-platform Doxygen GUI frontend called doxywizard is included with the Doxygen package to manage settings and generate output. Each setting is meticulously documented in the wizard and configuration file.

Settings that differ from the default are highlighted in red.

This section provides a quick cheat sheet of the Doxygen documentation style selected for this library.

2.1 Brief description comment block

A brief comment block is marked with three slash characters (///). Example:

externvoid some_function(void);

2.2 Brief description comment block after a member

A brief comment after a member is indicated with three slash characters and a smaller than sign (///<). Example:

{
} some_struct_t;

2.3 Detailed description comment block (using JavaDoc style)

The start of a detailed description comment block is indicated with a slash and double star sequence (/**). To make the block stand out as a unit, the star is continued at the start of each line. The JAVADOC_AUTOBRIEF setting is set to YES in the Doxygen configuration file ('px-lib/doc/Doxyfile'). With this setting a detailed description block always starts with a brief description. Example:

* Brief description which ends at this dot.
* Detailed description starts here.

2.4 Special command prefix

All Doxygen special commands are prefixed with an @ (at) sign, for example @ingroup and @defgroup:

* @ingroup COMMON
* @defgroup PX_TEMPLATE px_template.h : Template for a C module
* Brief description (which ends at the dot).
* Detailed description.

2.5 Frequently used special commands

Here is a list of special commands that are used frequently in the library:

Command Description
@ref Add a hyperlinked reference to a named section, page or anchor
@param Document a function parameter
@retval Document the function return value
@ingroup Make an entity a member of a specific group
@defgroup Define a group
@addtogroup Add additional members to a group

2.6 Function documentation

Here is an example that shows how a function, it's parameters and return value is documented:

* See if a timer has expired.
* @param[in,out] systmr Pointer to a timer object
* @retval true timer expired
* @retval false timer not expired or timer stopped
externboolpx_systmr_has_expired(px_systmr_t * systmr);

2.7 Module Grouping

C modules are documented in the H file using explicit grouping commands. The tree hierarchy is maintained in 'px-lib/doc/module_tree.dox'. Here is an example of the grouping at the start of the H file:

* @ingroup UTILS
* @defgroup PX_SYSTMR px_systmr.h : Polled software timers
2019

Doxygen Cheat Sheet Pdf

* Brief description.
* Detailed description.
/// @{
/// The number of timer ticks per second

Observe that a /// @{ start marker and a /// @} end marker is used to indicate that all of the definitions, typedefs, variables and functions in between is part of that group. Canon powershot sd790 is software download mac.

2.8 Page Grouping

Documentation pages are grouped into sections and sub sections by refering to a child page anywhere on the parent page using the @subpage command.

For example 'px-lib/doc/best_practice.dox':

- C coding style:
- Doxygen as source documention tool:
- Subversion (SVN) for revision control:
- Test function for each module
super.function();- call func from first ancestorDoxygen
SpecificAncestor.function();- call func from specific ancestor

Ancestor contructors

contract Derived is Base(7) { .. };- pass a static value to ancestor constructor
constructor(uint _y) Base(_y * _y) public {};- pass a dynamic value

All ancestor constructors are called upon contract initialization and all needs to have theirs arguments set in one of the ways above.

require / revert / assert

require(condition,[message])- use for public facing assertions
revert([message])
assert(condition)- use for internal assertions
All of these throw an error and revert current transaction.

Inline assembly

assembly { .. } - block with inline assembly to get closer to EVM

Deprecations

constant- function modifier
year- time literal suffix
throw- alias to revert
block.blockhash(block_number);- replaced by global blockhash(block_number);
msg.gasDoxygen Cheat Sheet- replaced by global gasleft();
suicide

Doxygen Tags Cheat Sheet

- alias to selfdestruct(address)
keccak256(a, b)- deprecated in favor ofkeccak256(abi.encodePacked(a, b))

Doxygen Syntax Cheat Sheet


callcode

Doxygen Cheat Sheet Printable

Also contructors written as functions with same name as contract.