[GRASS-SVN] r64421 - grass/trunk/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 3 05:04:09 PST 2015


Author: martinl
Date: 2015-02-03 05:04:08 -0800 (Tue, 03 Feb 2015)
New Revision: 64421

Modified:
   grass/trunk/lib/gis/parser_dependencies.c
Log:
libgis: improve doxygen documentation of parser_dependencies.c


Modified: grass/trunk/lib/gis/parser_dependencies.c
===================================================================
--- grass/trunk/lib/gis/parser_dependencies.c	2015-02-03 13:03:51 UTC (rev 64420)
+++ grass/trunk/lib/gis/parser_dependencies.c	2015-02-03 13:04:08 UTC (rev 64421)
@@ -3,7 +3,7 @@
   
   \brief GIS Library - Argument parsing functions (dependencies between options)
   
-  (C) 2014 by the GRASS Development Team
+  (C) 2014-2015 by the GRASS Development Team
   
   This program is free software under the GNU General Public License
   (>=v2). Read the file COPYING that comes with GRASS for details.
@@ -59,6 +59,20 @@
 
 static struct vector rules = {sizeof(struct rule), 50};
 
+/*! \brief Set generic option rule
+
+   Supported rule types:
+    - RULE_EXCLUSIVE
+    - RULE_REQUIRED
+    - RULE_REQUIRES
+    - RULE_REQUIRES_ALL
+    - RULE_EXCLUDES
+    - RULE_COLLECTIVE
+   
+   \param type rule type
+   \param nopts number of options in the array
+   \param opts array of options
+*/
 void G_option_rule(int type, int nopts, void **opts)
 {
     struct rule rule;
@@ -180,6 +194,8 @@
 
     When running the module, at most one option from a set can be
     provided.
+
+    \param first first given option
 */
 void G_option_exclusive(void *first, ...)
 {
@@ -199,7 +215,12 @@
     }
 }
 
-/* at least one option from a set */
+/*! \brief Sets the options to be required.
+  
+    At least one option from a set must be given.
+
+    \param first first given option
+*/
 void G_option_required(void *first, ...)
 {
     va_list ap;
@@ -228,6 +249,8 @@
     function.
     If you want more than one option to be present but not all,
     call this function multiple times.
+
+    \param first first given option
 */
 void G_option_requires(void *first, ...)
 {
@@ -258,6 +281,8 @@
     use G_option_requires() function.
 
     \see G_option_collective()
+
+    \param first first given option
 */
 void G_option_requires_all(void *first, ...)
 {
@@ -279,8 +304,13 @@
     }
 }
 
-/* if the first option is present, none of the other options may also (should?)
-   be present. */
+/*! \brief Exclude selected options.
+
+    If the first option is present, none of the other options may also (should?)
+    be present.
+
+    \param first first given option
+*/
 void G_option_excludes(void *first, ...)
 {
     va_list ap;
@@ -301,8 +331,13 @@
     }
 }
 
-/* if any option is present, all the other options must also be present
-   all or nothing from a set */
+/*! \brief Sets the options to be collective.
+
+    If any option is present, all the other options must also be present
+    all or nothing from a set.
+
+    \param first first given option
+*/
 void G_option_collective(void *first, ...)
 {
     va_list ap;
@@ -322,6 +357,7 @@
     }
 }
 
+/*! \brief Check for option rules (internal use only) */
 void G__check_option_rules(void)
 {
     unsigned int i;
@@ -355,6 +391,7 @@
     }
 }
 
+/*! \brief Describe option rules (stderr) */
 void G__describe_option_rules(void)
 {
     unsigned int i;
@@ -392,7 +429,7 @@
 }
 
 /*!
-   \brief Checks if there is any rule RULE_REQUIRED.
+   \brief Checks if there is any rule RULE_REQUIRED (internal use only).
 
    \return 1 if there is such rule
    \return 0 if not
@@ -418,6 +455,10 @@
     "collective"
 };
 
+/*! \brief Describe option rules in XML format (internal use only)
+
+    \param fp file where to print XML info
+*/
 void G__describe_option_rules_xml(FILE *fp)
 {
     unsigned int i, j;



More information about the grass-commit mailing list