1 Star 0 Fork 1K

nhky / apollo

forked from ApolloAuto / apollo 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
how_to_document_code.md 1.50 KB
一键复制 编辑 原始数据 按行查看 历史
Natasha Dsouza 提交于 2018-06-19 21:24 . Navigation mode (#4598)

How to document source code for doxygen

Developers who are not familiar with doxygen can get more information from its official website.

We use time.h as an example to explain how to successfully document code.

File

/**
 * @file
 *
 * @brief This library provides the utilities to deal with timestamps.
 * currently our assumption is that every timestamp will be of a
 * precision at 1 us.
 */

Namespace

/**
 * @namespace apollo::common::time
 * @brief apollo::common::time
 */
namespace apollo {
namespace common {
namespace time {

Class

/**
 * @class Clock
 * @brief a singleton clock that can be used to get the current current
 * timestamp. The source can be either system clock or a mock clock.
 * Mock clock is for testing purpose mainly. The mock clock related
 * methods are not thread-safe.
 */
class Clock {
 public:
 ...

Function

/**
  * @brief Set the behavior of the \class Clock.
  * @param is_system_clock if provided with value TRUE, further call
  * to Now() will return timestamp based on the system clock. If
  * provided with FALSE, it will use the mock clock instead.
  */
 static void UseSystemClock(bool is_system_clock) {
   Clock::instance()->is_system_clock_ = is_system_clock;
 }

Public / protected class member variables

/// Stores the currently set timestamp, which serves mock clock
/// queries.
Timestamp mock_now_;
C
1
https://gitee.com/nhky/apolloauto.git
git@gitee.com:nhky/apolloauto.git
nhky
apolloauto
apollo
master

搜索帮助