[GRASS-SVN] r62219 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Oct 8 14:19:54 PDT 2014
Author: wenzeslaus
Date: 2014-10-08 14:19:54 -0700 (Wed, 08 Oct 2014)
New Revision: 62219
Modified:
grass/trunk/lib/gis/parser.c
grass/trunk/lib/gis/parser_dependencies.c
Log:
lib/parser: more doxygen documentation
Modified: grass/trunk/lib/gis/parser.c
===================================================================
--- grass/trunk/lib/gis/parser.c 2014-10-08 19:56:35 UTC (rev 62218)
+++ grass/trunk/lib/gis/parser.c 2014-10-08 21:19:54 UTC (rev 62219)
@@ -290,19 +290,19 @@
*
* The usual order a module calls functions is:
*
- * # G_gisinit()
- * # G_define_module()
- * # G_define_standard_flag()
- * # G_define_standard_option()
- * # G_define_flag()
- * # G_define_option()
- * # G_option_exclusive()
- * # G_option_required()
- * # G_option_requires()
- * # G_option_requires_all()
- * # G_option_excludes()
- * # G_option_collective()
- * # G_parser()
+ * 1. G_gisinit()
+ * 2. G_define_module()
+ * 3. G_define_standard_flag()
+ * 4. G_define_standard_option()
+ * 5. G_define_flag()
+ * 6. G_define_option()
+ * 7. G_option_exclusive()
+ * 8. G_option_required()
+ * 9. G_option_requires()
+ * 10. G_option_requires_all()
+ * 11. G_option_excludes()
+ * 12. G_option_collective()
+ * 13. G_parser()
*
* \param argc number of arguments
* \param argv argument list
Modified: grass/trunk/lib/gis/parser_dependencies.c
===================================================================
--- grass/trunk/lib/gis/parser_dependencies.c 2014-10-08 19:56:35 UTC (rev 62218)
+++ grass/trunk/lib/gis/parser_dependencies.c 2014-10-08 21:19:54 UTC (rev 62219)
@@ -176,7 +176,11 @@
st->error[st->n_errors++] = G_store(msg);
}
-/* at most one option from a set */
+/*! \brief Sets the options to be mutually exclusive.
+
+ When running the module, at most one option from a set can be
+ provided.
+*/
void G_option_exclusive(void *first, ...)
{
va_list ap;
@@ -214,8 +218,17 @@
}
}
-/* if the first option is present, at least one of the other
- options must also be present */
+/*! \brief Define a list of options from which at least one option
+ is required if first option is present.
+
+ If the first option is present, at least one of the other
+ options must also be present.
+
+ If you want all options to be provided use G_option_requires_all()
+ function.
+ If you want more than one option to be present but not all,
+ call this function multiple times.
+*/
void G_option_requires(void *first, ...)
{
va_list ap;
@@ -236,8 +249,16 @@
}
}
-/* if the first option is present, all the other options must also
- be present. */
+/*! \brief Define additionally required options for an option.
+
+ If the first option is present, all the other options must also
+ be present.
+
+ If it is enough if only one option from a set is present,
+ use G_option_requires() function.
+
+ \see G_option_collective()
+*/
void G_option_requires_all(void *first, ...)
{
va_list ap;
@@ -258,7 +279,7 @@
}
}
-/* if the first option is present, none of the other options may also
+/* if the first option is present, none of the other options may also (should?)
be present. */
void G_option_excludes(void *first, ...)
{
More information about the grass-commit
mailing list