DPDK patches and discussions
 help / color / mirror / Atom feed
From: John McNamara <john.mcnamara@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 3/3] doc: moved doxygen section to the doc guidelines
Date: Thu,  2 Jul 2015 14:50:53 +0100	[thread overview]
Message-ID: <1435845053-17203-4-git-send-email-john.mcnamara@intel.com> (raw)
In-Reply-To: <1435845053-17203-1-git-send-email-john.mcnamara@intel.com>

Moved and refactored the Doxygen guidelines from the Coding Style doc
to the Documentation Guidelines doc. Replaced the existing section
with a link.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/guidelines/coding_style.rst | 126 ++-------------------------------
 1 file changed, 7 insertions(+), 119 deletions(-)

diff --git a/doc/guides/guidelines/coding_style.rst b/doc/guides/guidelines/coding_style.rst
index c27fef4..12315bb 100644
--- a/doc/guides/guidelines/coding_style.rst
+++ b/doc/guides/guidelines/coding_style.rst
@@ -1,5 +1,7 @@
-Coding Style
-============
+.. _coding_style:
+
+DPDK Coding Style
+=================
 
 Description
 -----------
@@ -687,123 +689,9 @@ Control Statements
 Doxygen Documentation
 ---------------------
 
-The API documentation is automatically generated in the DPDK framework.
+The API documentation is automatically generated in the DPDK framework using `Doxygen <http://www.stack.nl/~dimitri/doxygen/>`_.
 That is why all files that are part of the public API must be documented using Doxygen syntax.
 
 The public API comprises functions of DPDK that can be used by an external application that will use the SDK.
-Only the Doxygen syntax described in the coding rules (this document) should be used in the code.
-All the Doxygen features are described in the Doxygen manual online.
-
-Documenting a Function
-~~~~~~~~~~~~~~~~~~~~~~
-
-All public functions must be documented. The documentation is placed in the header file, above the declaration of the function.
-The definition of the function may be documented, but using standard comments (not in doxygen format).
-The following is an example of function documentation:
-
-.. code-block:: c
-
- /**
-  * Summary here; one sentence on one line (should not exceed 80 chars).
-  *
-  * A more detailed description goes here.
-  *
-  * A blank line forms a paragraph. There should be no trailing white-space
-  * anywhere.
-  *
-  * @param first
-  *   "@param" is a Doxygen directive to describe a function parameter. Like
-  *   some other directives, it takes a term/summary on the same line and a
-  *   description (this text) indented by 2 spaces on the next line. All
-  *   descriptive text should wrap at 80 chars, without going over.
-  *   Newlines are NOT supported within directives; if a newline would be
-  *   before this text, it would be appended to the general description above.
-  * @param second
-  *   There should be no newline between multiple directives (of the same
-  *   type).
-  *
-  * @return
-  *   "@return" is a different Doxygen directive to describe the return value
-  *   of a function, if there is any.
-  */
- int rte_foo(int first, int second)
-
-
-Documenting Files
-~~~~~~~~~~~~~~~~~
-
-Each public file may start with a comment describing what the file does. For example:
-
-.. code-block:: c
-
- /**
-  * @file
-  * This file describes the coding rules of RTE.
-  *
-  * It contains the coding rules of C code, ASM code, reStructured
-  * Text documentation, and of course how to use doxygen to document
-  * public API.
-  */
-
-
-Documenting Constants and Variables
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Examples:
-
-.. code-block:: c
-
- /**
-  * The definition of a funny TRUE.
-  */
- #define TRUE 0
-
- #define TRUE 1 /**< another way to document a macro */
-
- /**
-  * Frequency of the HPET counter in Hz
-  *
-  * @see rte_eal_hpet_init()
-  */
- extern uint64_t eal_hpet_resolution_hz;
-
-
-Documenting Structures
-~~~~~~~~~~~~~~~~~~~~~~
-
-Public structures should also be documented.
-The ``/**<`` sequence can be used to documented the fields of the structure, as shown in the following example:
-
-.. code-block:: c
-
- /**
-  * Structure describing a memzone, which is a contiguous portions of
-  * physical memory identified by a name.
-  */
- struct rte_memzone {
-
- #define MEMZONE_NAMESIZE 32
-   char name[MEMZONE_NAMESIZE]; /**< name of the memory zone */
-
-   phys_addr_t phys_addr;       /**< start physical address */
-   void *addr;                  /**< start virtual address */
-   uint64_t len;                /**< len of the memzone */
-
-   int socket_id;               /**< NUMA socket id */
- };
-
-
-See Also Sections
-~~~~~~~~~~~~~~~~~
-
-The @see keyword can be used to highlight a link to an existing function, file, or URL.
-This directive should be placed on one line, without anything else, at the bottom of the documentation header.
-
-.. code-block:: c
-
- /**
-  * (documentation of function, file, ...)
-  *
-  * @see rte_foo()
-  * @see eal_memzone.c
-  */
+Only the Doxygen syntax described in the :ref:`doxygen_guidelines` should be used in the code.
+Other Doxygen features are described in the Doxygen manual online.
-- 
1.8.1.4

  parent reply	other threads:[~2015-07-02 13:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-02 13:50 [dpdk-dev] [PATCH 0/3] doc: added guidelines on dpdk documentation John McNamara
2015-07-02 13:50 ` [dpdk-dev] [PATCH 1/3] doc: set the default literal block format John McNamara
2015-07-02 13:50 ` [dpdk-dev] [PATCH 2/3] doc: added guidelines on dpdk documentation John McNamara
2015-07-02 16:20   ` Thomas Monjalon
2015-07-03  9:54     ` Bruce Richardson
2015-07-03 10:05       ` Iremonger, Bernard
2015-07-03 10:30         ` Bruce Richardson
2015-07-10 15:39     ` Mcnamara, John
2015-07-02 17:31   ` Mcnamara, John
2015-07-02 13:50 ` John McNamara [this message]
2015-07-10 15:45 ` [dpdk-dev] [PATCH v2 0/3] " John McNamara
2015-07-10 15:45   ` [dpdk-dev] [PATCH v2 1/3] doc: set the default literal block format John McNamara
2015-08-05 14:15     ` Bruce Richardson
2015-07-10 15:45   ` [dpdk-dev] [PATCH v2 2/3] doc: added guidelines on dpdk documentation John McNamara
2015-08-05 14:26     ` Bruce Richardson
2015-07-10 15:45   ` [dpdk-dev] [PATCH v2 3/3] doc: moved doxygen section to the doc guidelines John McNamara
2015-08-05 14:26     ` Bruce Richardson
2015-08-11 10:36   ` [dpdk-dev] [PATCH v2 0/3] doc: added guidelines on dpdk documentation Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1435845053-17203-4-git-send-email-john.mcnamara@intel.com \
    --to=john.mcnamara@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).