Extract doxygen documentation for static symbols.
authorTeemu Murtola <teemu.murtola@gmail.com>
Sat, 30 Jun 2012 09:35:16 +0000 (12:35 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 5 Jul 2012 19:56:51 +0000 (21:56 +0200)
The full doxygen documentation now includes documentation for static
methods.  Fixed warnings from undocumented static methods in documented
files.

Change-Id: Ib77dc8e19882c6b2f4a1a97a4fcab63277aae211

21 files changed:
Doxyfile-common.cmakein
Doxyfile.cmakein
src/gromacs/analysisdata/modules/histogram.cpp
src/gromacs/analysisdata/modules/plot.cpp
src/gromacs/legacyheaders/gmx_fft.h
src/gromacs/legacyheaders/thread_mpi/atomic.h
src/gromacs/options/basicoptions.cpp
src/gromacs/options/timeunitmanager.cpp
src/gromacs/selection/compiler.cpp
src/gromacs/selection/parser.cpp
src/gromacs/selection/parser.h
src/gromacs/selection/parser.y
src/gromacs/selection/scanner_internal.cpp
src/gromacs/selection/sm_compare.cpp
src/gromacs/selection/sm_same.cpp
src/gromacs/trajectoryanalysis/modules/angle.cpp
src/gromacs/utility/errorcodes.cpp
src/gromacs/utility/path.cpp
src/testutils/datapath.cpp
src/testutils/refdata.cpp
src/testutils/testoptions.cpp

index c291224ddc5a27a088335c4e725a7c7c2c73e22f..5bb08509625837d6be76e7b33aa87234a7e8e784 100644 (file)
@@ -32,3 +32,5 @@ ALPHABETICAL_INDEX     = YES
 SHOW_DIRECTORIES       = YES
 HTML_DYNAMIC_SECTIONS  = YES
 GENERATE_LATEX         = NO
+
+EXTRACT_LOCAL_CLASSES  = NO
index 8acd499faf9e0522b8fb1860705dee1e03256be8..9feca27e63e1037d8029a15d461a5cd49fbfb42e 100644 (file)
@@ -6,6 +6,8 @@ PREDEFINED            += F77_FUNC(name,NAME)=name
 
 ENABLED_SECTIONS       = libapi internal
 INTERNAL_DOCS          = YES
+EXTRACT_STATIC         = YES
+EXTRACT_LOCAL_CLASSES  = YES
 HIDE_UNDOC_CLASSES     = YES
 WARN_LOGFILE           = doxygen-doc/doxygen.log
 
index 3fe30d7c393ce8beb83b02ee258939acb66f9987..f5d0f5cdd57b4687ebac2b1dc41413baa1fe43b6 100644 (file)
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/gmxassert.h"
 
-static const real UNDEFINED = std::numeric_limits<real>::max();
-static bool isDefined(real value)
+namespace
+{
+
+//! Value used to signify that a real-valued histogram setting is not set.
+const real UNDEFINED = std::numeric_limits<real>::max();
+//! Checks whether \p value is defined.
+bool isDefined(real value)
 {
     return value != UNDEFINED;
 }
 
+} // namespace
+
 namespace gmx
 {
 
index a64852c89f6f63919d2d2c4cbcab78da2f94dc5f..4af0d1a001bcb634d7f8f8a7d4030695c95301ca 100644 (file)
 #include "gromacs/utility/gmxassert.h"
 #include "gromacs/utility/stringutil.h"
 
-static const char *const g_plotFormats[] = {
+namespace
+{
+
+//! Enum values for plot formats.
+const char *const g_plotFormats[] = {
     "none", "xmgrace", "xmgr", NULL
 };
 
+} // namespace
+
 namespace gmx
 {
 
index f69a90d6e931b170f4252b20500dd08563396466..182fbacf7bedd490efff52a5271c7e972a6299dd 100644 (file)
@@ -105,7 +105,9 @@ typedef enum gmx_fft_direction
  */
 
 typedef int gmx_fft_flag;
+/** Macro to indicate no special flags for FFT routines. */
 static const int GMX_FFT_FLAG_NONE = 0;
+/** Flag to disable FFT optimizations based on timings, see ::gmx_fft_flag. */
 static const int GMX_FFT_FLAG_CONSERVATIVE = (1<<0);
 
 /*! \brief Setup a 1-dimensional complex-to-complex transform 
index 4fccd33d72a5459180c557c80169f3423bb38cac..fb665da0ea1b4a4e6815528cb9bf5413552e5634 100644 (file)
@@ -197,7 +197,7 @@ extern "C"
 
 
 
-/* System mutex used for locking to guarantee atomicity */
+/** System mutex used for locking to guarantee atomicity */
 static tMPI_Thread_mutex_t tMPI_Atomic_mutex = TMPI_THREAD_MUTEX_INITIALIZER;
 
 /** Atomic operations datatype
index 11cf80582ded66d0b2e140550b33e53d23959f3a..7715fe7caab888e6f3dd2c7399a530f846c64345 100644 (file)
 
 #include "basicoptionstorage.h"
 
-template <typename T> static
-void expandVector(size_t length, std::vector<T> *values)
+namespace
+{
+
+/*! \brief
+ * Expands a single value to a vector by copying the value.
+ *
+ * \tparam        ValueType  Type of values to process.
+ * \param[in]     length     Length of the resulting vector.
+ * \param[in,out] values     Values to process.
+ * \throws   std::bad_alloc    if out of memory.
+ * \throws   InvalidInputError if \p values has an invalid number of values.
+ *
+ * \p values should have 0, 1, or \p length values.
+ * If \p values has 1 value, it is expanded such that it has \p length
+ * identical values.  In other valid cases, nothing is done.
+ */
+template <typename ValueType>
+void expandVector(size_t length, std::vector<ValueType> *values)
 {
     if (length > 0 && values->size() > 0 && values->size() != length)
     {
@@ -60,11 +76,13 @@ void expandVector(size_t length, std::vector<T> *values)
             GMX_THROW(gmx::InvalidInputError(gmx::formatString(
                       "Expected 1 or %d values, got %d", length, values->size())));
         }
-        const T &value = (*values)[0];
+        const ValueType &value = (*values)[0];
         values->resize(length, value);
     }
 }
 
+} // namespace
+
 namespace gmx
 {
 
index 47c282a869de849c3291f92cd50173184e44c902..0b15b60f76920df69d9ca60f19f217fd5e5504c0 100644 (file)
 #include "gromacs/options/optionsvisitor.h"
 #include "gromacs/utility/gmxassert.h"
 
-namespace gmx
+namespace
 {
 
-// These must correspond to the TimeUnit enum in the header!
-static const char *const g_timeUnits[] = {
+/*! \brief
+ * Enum values for a time unit.
+ *
+ * These must correspond to the TimeUnit enum in the header!
+ */
+const char *const g_timeUnits[] = {
     "fs", "ps", "ns", "us", "ms",  "s", NULL
 };
-static const double g_timeScaleFactors[] = {
+/*! \brief
+ * Scaling factors from each time unit to internal units (=picoseconds).
+ *
+ * These must correspond to the TimeUnit enum in the header!
+ */
+const double g_timeScaleFactors[] = {
     1e-3,    1,  1e3,  1e6,  1e9, 1e12
 };
 
+} // namespace
+
+namespace gmx
+{
+
 TimeUnitManager::TimeUnitManager()
     : timeUnit_(eTimeUnit_ps)
 {
index d186c6084f8d346c324a8caa727b08ce7a1e4043..1f65253914d004ca1b67ef9a83635720c74b5f1a 100644 (file)
@@ -346,6 +346,9 @@ typedef struct t_compiler_data
  * COMPILER UTILITY FUNCTIONS
  ********************************************************************/
 
+/*! \brief
+ * Helper method for printing out debug information about a min/max group.
+ */
 static void
 print_group_info(FILE *fp, const char *name, t_selelem *sel, gmx_ana_index_t *g)
 {
index 357bb382c28982412d6fe30352a0e9ba3507a8b8..13a81e46f5638aed6081b8211c0677c58adf48fc 100644 (file)
 
 #include "scanner.h"
 
+//! Helper method to reorder a list of parameter values and to count the values.
 static t_selexpr_value *
 process_value_list(t_selexpr_value *values, int *nr);
+//! Helper method to reorder a list of parameters.
 static t_selexpr_param *
 process_param_list(t_selexpr_param *params);
 
+//! Error handler needed by Bison.
 static void
 yyerror(yyscan_t, char const *s);
 
@@ -143,7 +146,7 @@ yyerror(yyscan_t, char const *s);
 
 
 /* Line 268 of yacc.c  */
-#line 147 "parser.cpp"
+#line 150 "parser.cpp"
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
@@ -213,7 +216,7 @@ typedef union YYSTYPE
 {
 
 /* Line 293 of yacc.c  */
-#line 101 "parser.y"
+#line 104 "parser.y"
 
     int                         i;
     real                        r;
@@ -228,7 +231,7 @@ typedef union YYSTYPE
 
 
 /* Line 293 of yacc.c  */
-#line 232 "parser.cpp"
+#line 235 "parser.cpp"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -264,7 +267,7 @@ void yypstate_delete ();
 
 
 /* Line 343 of yacc.c  */
-#line 268 "parser.cpp"
+#line 271 "parser.cpp"
 
 #ifdef short
 # undef short
@@ -563,16 +566,16 @@ static const yytype_int8 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   217,   217,   218,   229,   230,   252,   258,   259,   270,
-     282,   288,   294,   300,   306,   316,   324,   325,   335,   336,
-     343,   344,   358,   359,   363,   364,   367,   368,   371,   372,
-     380,   388,   396,   404,   408,   418,   426,   436,   437,   441,
-     448,   455,   465,   479,   488,   500,   507,   517,   523,   529,
-     535,   541,   547,   553,   560,   569,   583,   592,   596,   606,
-     619,   627,   635,   648,   650,   655,   656,   661,   670,   671,
-     672,   676,   677,   679,   684,   685,   689,   690,   692,   696,
-     702,   708,   714,   720,   724,   731,   738,   745,   749,   756,
-     763
+       0,   220,   220,   221,   232,   233,   255,   261,   262,   273,
+     285,   291,   297,   303,   309,   319,   327,   328,   338,   339,
+     346,   347,   361,   362,   366,   367,   370,   371,   374,   375,
+     383,   391,   399,   407,   411,   421,   429,   439,   440,   444,
+     451,   458,   468,   482,   491,   503,   510,   520,   526,   532,
+     538,   544,   550,   556,   563,   572,   586,   595,   599,   609,
+     622,   630,   638,   651,   653,   658,   659,   664,   673,   674,
+     675,   679,   680,   682,   687,   688,   692,   693,   695,   699,
+     705,   711,   717,   723,   727,   734,   741,   748,   752,   759,
+     766
 };
 #endif
 
@@ -1366,218 +1369,218 @@ yydestruct (yymsg, yytype, yyvaluep, scanner)
       case 5: /* "HELP_TOPIC" */
 
 /* Line 1391 of yacc.c  */
-#line 196 "parser.y"
+#line 199 "parser.y"
        { free((yyvaluep->str));                     };
 
 /* Line 1391 of yacc.c  */
-#line 1374 "parser.cpp"
+#line 1377 "parser.cpp"
        break;
       case 8: /* "STR" */
 
 /* Line 1391 of yacc.c  */
-#line 196 "parser.y"
+#line 199 "parser.y"
        { free((yyvaluep->str));                     };
 
 /* Line 1391 of yacc.c  */
-#line 1383 "parser.cpp"
+#line 1386 "parser.cpp"
        break;
       case 9: /* "IDENTIFIER" */
 
 /* Line 1391 of yacc.c  */
-#line 196 "parser.y"
+#line 199 "parser.y"
        { free((yyvaluep->str));                     };
 
 /* Line 1391 of yacc.c  */
-#line 1392 "parser.cpp"
+#line 1395 "parser.cpp"
        break;
       case 25: /* "PARAM" */
 
 /* Line 1391 of yacc.c  */
-#line 197 "parser.y"
+#line 200 "parser.y"
        { if((yyvaluep->str)) free((yyvaluep->str));              };
 
 /* Line 1391 of yacc.c  */
-#line 1401 "parser.cpp"
+#line 1404 "parser.cpp"
        break;
       case 28: /* "CMP_OP" */
 
 /* Line 1391 of yacc.c  */
-#line 196 "parser.y"
+#line 199 "parser.y"
        { free((yyvaluep->str));                     };
 
 /* Line 1391 of yacc.c  */
-#line 1410 "parser.cpp"
+#line 1413 "parser.cpp"
        break;
       case 51: /* "command" */
 
 /* Line 1391 of yacc.c  */
-#line 198 "parser.y"
+#line 201 "parser.y"
        { if((yyvaluep->sel)) _gmx_selelem_free((yyvaluep->sel)); };
 
 /* Line 1391 of yacc.c  */
-#line 1419 "parser.cpp"
+#line 1422 "parser.cpp"
        break;
       case 52: /* "cmd_plain" */
 
 /* Line 1391 of yacc.c  */
-#line 198 "parser.y"
+#line 201 "parser.y"
        { if((yyvaluep->sel)) _gmx_selelem_free((yyvaluep->sel)); };
 
 /* Line 1391 of yacc.c  */
-#line 1428 "parser.cpp"
+#line 1431 "parser.cpp"
        break;
       case 54: /* "help_topic" */
 
 /* Line 1391 of yacc.c  */
-#line 204 "parser.y"
+#line 207 "parser.y"
        { _gmx_selexpr_free_values((yyvaluep->val)); };
 
 /* Line 1391 of yacc.c  */
-#line 1437 "parser.cpp"
+#line 1440 "parser.cpp"
        break;
       case 55: /* "selection" */
 
 /* Line 1391 of yacc.c  */
-#line 199 "parser.y"
+#line 202 "parser.y"
        { _gmx_selelem_free_chain((yyvaluep->sel));  };
 
 /* Line 1391 of yacc.c  */
-#line 1446 "parser.cpp"
+#line 1449 "parser.cpp"
        break;
       case 59: /* "string" */
 
 /* Line 1391 of yacc.c  */
-#line 196 "parser.y"
+#line 199 "parser.y"
        { free((yyvaluep->str));                     };
 
 /* Line 1391 of yacc.c  */
-#line 1455 "parser.cpp"
+#line 1458 "parser.cpp"
        break;
       case 60: /* "sel_expr" */
 
 /* Line 1391 of yacc.c  */
-#line 200 "parser.y"
+#line 203 "parser.y"
        { _gmx_selelem_free((yyvaluep->sel));        };
 
 /* Line 1391 of yacc.c  */
-#line 1464 "parser.cpp"
+#line 1467 "parser.cpp"
        break;
       case 62: /* "num_expr" */
 
 /* Line 1391 of yacc.c  */
-#line 200 "parser.y"
+#line 203 "parser.y"
        { _gmx_selelem_free((yyvaluep->sel));        };
 
 /* Line 1391 of yacc.c  */
-#line 1473 "parser.cpp"
+#line 1476 "parser.cpp"
        break;
       case 63: /* "str_expr" */
 
 /* Line 1391 of yacc.c  */
-#line 200 "parser.y"
+#line 203 "parser.y"
        { _gmx_selelem_free((yyvaluep->sel));        };
 
 /* Line 1391 of yacc.c  */
-#line 1482 "parser.cpp"
+#line 1485 "parser.cpp"
        break;
       case 64: /* "pos_expr" */
 
 /* Line 1391 of yacc.c  */
-#line 200 "parser.y"
+#line 203 "parser.y"
        { _gmx_selelem_free((yyvaluep->sel));        };
 
 /* Line 1391 of yacc.c  */
-#line 1491 "parser.cpp"
+#line 1494 "parser.cpp"
        break;
       case 65: /* "method_params" */
 
 /* Line 1391 of yacc.c  */
-#line 201 "parser.y"
+#line 204 "parser.y"
        { _gmx_selexpr_free_params((yyvaluep->param)); };
 
 /* Line 1391 of yacc.c  */
-#line 1500 "parser.cpp"
+#line 1503 "parser.cpp"
        break;
       case 66: /* "method_param_list" */
 
 /* Line 1391 of yacc.c  */
-#line 201 "parser.y"
+#line 204 "parser.y"
        { _gmx_selexpr_free_params((yyvaluep->param)); };
 
 /* Line 1391 of yacc.c  */
-#line 1509 "parser.cpp"
+#line 1512 "parser.cpp"
        break;
       case 67: /* "method_param" */
 
 /* Line 1391 of yacc.c  */
-#line 201 "parser.y"
+#line 204 "parser.y"
        { _gmx_selexpr_free_params((yyvaluep->param)); };
 
 /* Line 1391 of yacc.c  */
-#line 1518 "parser.cpp"
+#line 1521 "parser.cpp"
        break;
       case 68: /* "value_list" */
 
 /* Line 1391 of yacc.c  */
-#line 202 "parser.y"
+#line 205 "parser.y"
        { _gmx_selexpr_free_values((yyvaluep->val)); };
 
 /* Line 1391 of yacc.c  */
-#line 1527 "parser.cpp"
+#line 1530 "parser.cpp"
        break;
       case 69: /* "value_list_contents" */
 
 /* Line 1391 of yacc.c  */
-#line 202 "parser.y"
+#line 205 "parser.y"
        { _gmx_selexpr_free_values((yyvaluep->val)); };
 
 /* Line 1391 of yacc.c  */
-#line 1536 "parser.cpp"
+#line 1539 "parser.cpp"
        break;
       case 70: /* "basic_value_list" */
 
 /* Line 1391 of yacc.c  */
-#line 203 "parser.y"
+#line 206 "parser.y"
        { _gmx_selexpr_free_values((yyvaluep->val)); };
 
 /* Line 1391 of yacc.c  */
-#line 1545 "parser.cpp"
+#line 1548 "parser.cpp"
        break;
       case 71: /* "basic_value_list_contents" */
 
 /* Line 1391 of yacc.c  */
-#line 203 "parser.y"
+#line 206 "parser.y"
        { _gmx_selexpr_free_values((yyvaluep->val)); };
 
 /* Line 1391 of yacc.c  */
-#line 1554 "parser.cpp"
+#line 1557 "parser.cpp"
        break;
       case 72: /* "value_item" */
 
 /* Line 1391 of yacc.c  */
-#line 202 "parser.y"
+#line 205 "parser.y"
        { _gmx_selexpr_free_values((yyvaluep->val)); };
 
 /* Line 1391 of yacc.c  */
-#line 1563 "parser.cpp"
+#line 1566 "parser.cpp"
        break;
       case 73: /* "basic_value_item" */
 
 /* Line 1391 of yacc.c  */
-#line 203 "parser.y"
+#line 206 "parser.y"
        { _gmx_selexpr_free_values((yyvaluep->val)); };
 
 /* Line 1391 of yacc.c  */
-#line 1572 "parser.cpp"
+#line 1575 "parser.cpp"
        break;
       case 74: /* "value_item_range" */
 
 /* Line 1391 of yacc.c  */
-#line 202 "parser.y"
+#line 205 "parser.y"
        { _gmx_selexpr_free_values((yyvaluep->val)); };
 
 /* Line 1391 of yacc.c  */
-#line 1581 "parser.cpp"
+#line 1584 "parser.cpp"
        break;
 
       default:
@@ -1926,14 +1929,14 @@ yyreduce:
         case 2:
 
 /* Line 1806 of yacc.c  */
-#line 217 "parser.y"
+#line 220 "parser.y"
     { (yyval.sel) = NULL; }
     break;
 
   case 3:
 
 /* Line 1806 of yacc.c  */
-#line 219 "parser.y"
+#line 222 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_append_selection((yyvsp[(2) - (2)].sel), (yyvsp[(1) - (2)].sel), scanner);
@@ -1946,14 +1949,14 @@ yyreduce:
   case 4:
 
 /* Line 1806 of yacc.c  */
-#line 229 "parser.y"
+#line 232 "parser.y"
     { (yyval.sel) = (yyvsp[(1) - (2)].sel); }
     break;
 
   case 5:
 
 /* Line 1806 of yacc.c  */
-#line 231 "parser.y"
+#line 234 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = NULL;
@@ -1976,7 +1979,7 @@ yyreduce:
   case 6:
 
 /* Line 1806 of yacc.c  */
-#line 252 "parser.y"
+#line 255 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = NULL;
@@ -1988,14 +1991,14 @@ yyreduce:
   case 7:
 
 /* Line 1806 of yacc.c  */
-#line 258 "parser.y"
+#line 261 "parser.y"
     { (yyval.sel) = NULL; }
     break;
 
   case 8:
 
 /* Line 1806 of yacc.c  */
-#line 260 "parser.y"
+#line 263 "parser.y"
     {
                  BEGIN_ACTION;
                  t_selelem *s, *p;
@@ -2011,7 +2014,7 @@ yyreduce:
   case 9:
 
 /* Line 1806 of yacc.c  */
-#line 271 "parser.y"
+#line 274 "parser.y"
     {
                  BEGIN_ACTION;
                  t_selelem *s, *p;
@@ -2028,7 +2031,7 @@ yyreduce:
   case 10:
 
 /* Line 1806 of yacc.c  */
-#line 283 "parser.y"
+#line 286 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_selection(NULL, (yyvsp[(1) - (1)].sel), scanner);
@@ -2039,7 +2042,7 @@ yyreduce:
   case 11:
 
 /* Line 1806 of yacc.c  */
-#line 289 "parser.y"
+#line 292 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_selection((yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].sel), scanner);
@@ -2050,7 +2053,7 @@ yyreduce:
   case 12:
 
 /* Line 1806 of yacc.c  */
-#line 295 "parser.y"
+#line 298 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].sel), scanner);
@@ -2061,7 +2064,7 @@ yyreduce:
   case 13:
 
 /* Line 1806 of yacc.c  */
-#line 301 "parser.y"
+#line 304 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].sel), scanner);
@@ -2072,7 +2075,7 @@ yyreduce:
   case 14:
 
 /* Line 1806 of yacc.c  */
-#line 307 "parser.y"
+#line 310 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_assign_variable((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].sel), scanner);
@@ -2083,7 +2086,7 @@ yyreduce:
   case 15:
 
 /* Line 1806 of yacc.c  */
-#line 317 "parser.y"
+#line 320 "parser.y"
     {
                  BEGIN_ACTION;
                  _gmx_sel_handle_help_cmd(process_value_list((yyvsp[(2) - (2)].val), NULL), scanner);
@@ -2094,14 +2097,14 @@ yyreduce:
   case 16:
 
 /* Line 1806 of yacc.c  */
-#line 324 "parser.y"
+#line 327 "parser.y"
     { (yyval.val) = NULL; }
     break;
 
   case 17:
 
 /* Line 1806 of yacc.c  */
-#line 326 "parser.y"
+#line 329 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.val) = _gmx_selexpr_create_value(STR_VALUE);
@@ -2113,14 +2116,14 @@ yyreduce:
   case 18:
 
 /* Line 1806 of yacc.c  */
-#line 335 "parser.y"
+#line 338 "parser.y"
     { (yyval.sel) = (yyvsp[(1) - (1)].sel); }
     break;
 
   case 19:
 
 /* Line 1806 of yacc.c  */
-#line 337 "parser.y"
+#line 340 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_position((yyvsp[(1) - (1)].sel), NULL, scanner);
@@ -2132,14 +2135,14 @@ yyreduce:
   case 20:
 
 /* Line 1806 of yacc.c  */
-#line 343 "parser.y"
+#line 346 "parser.y"
     { (yyval.sel) = (yyvsp[(2) - (3)].sel); }
     break;
 
   case 21:
 
 /* Line 1806 of yacc.c  */
-#line 345 "parser.y"
+#line 348 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_modifier((yyvsp[(2) - (3)].meth), (yyvsp[(3) - (3)].param), (yyvsp[(1) - (3)].sel), scanner);
@@ -2151,63 +2154,63 @@ yyreduce:
   case 22:
 
 /* Line 1806 of yacc.c  */
-#line 358 "parser.y"
+#line 361 "parser.y"
     { (yyval.i) = (yyvsp[(1) - (1)].i); }
     break;
 
   case 23:
 
 /* Line 1806 of yacc.c  */
-#line 359 "parser.y"
+#line 362 "parser.y"
     { (yyval.i) = -(yyvsp[(2) - (2)].i); }
     break;
 
   case 24:
 
 /* Line 1806 of yacc.c  */
-#line 363 "parser.y"
+#line 366 "parser.y"
     { (yyval.r) = (yyvsp[(1) - (1)].r); }
     break;
 
   case 25:
 
 /* Line 1806 of yacc.c  */
-#line 364 "parser.y"
+#line 367 "parser.y"
     { (yyval.r) = -(yyvsp[(2) - (2)].r); }
     break;
 
   case 26:
 
 /* Line 1806 of yacc.c  */
-#line 367 "parser.y"
+#line 370 "parser.y"
     { (yyval.r) = (yyvsp[(1) - (1)].i); }
     break;
 
   case 27:
 
 /* Line 1806 of yacc.c  */
-#line 368 "parser.y"
+#line 371 "parser.y"
     { (yyval.r) = (yyvsp[(1) - (1)].r); }
     break;
 
   case 28:
 
 /* Line 1806 of yacc.c  */
-#line 371 "parser.y"
+#line 374 "parser.y"
     { (yyval.str) = (yyvsp[(1) - (1)].str); }
     break;
 
   case 29:
 
 /* Line 1806 of yacc.c  */
-#line 372 "parser.y"
+#line 375 "parser.y"
     { (yyval.str) = (yyvsp[(1) - (1)].str); }
     break;
 
   case 30:
 
 /* Line 1806 of yacc.c  */
-#line 381 "parser.y"
+#line 384 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_selelem_create(SEL_BOOLEAN);
@@ -2220,7 +2223,7 @@ yyreduce:
   case 31:
 
 /* Line 1806 of yacc.c  */
-#line 389 "parser.y"
+#line 392 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_selelem_create(SEL_BOOLEAN);
@@ -2233,7 +2236,7 @@ yyreduce:
   case 32:
 
 /* Line 1806 of yacc.c  */
-#line 397 "parser.y"
+#line 400 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_selelem_create(SEL_BOOLEAN);
@@ -2246,14 +2249,14 @@ yyreduce:
   case 33:
 
 /* Line 1806 of yacc.c  */
-#line 404 "parser.y"
+#line 407 "parser.y"
     { (yyval.sel) = (yyvsp[(2) - (3)].sel); }
     break;
 
   case 34:
 
 /* Line 1806 of yacc.c  */
-#line 409 "parser.y"
+#line 412 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_comparison((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), (yyvsp[(2) - (3)].str), scanner);
@@ -2265,7 +2268,7 @@ yyreduce:
   case 35:
 
 /* Line 1806 of yacc.c  */
-#line 419 "parser.y"
+#line 422 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_group_by_name((yyvsp[(2) - (2)].str), scanner);
@@ -2278,7 +2281,7 @@ yyreduce:
   case 36:
 
 /* Line 1806 of yacc.c  */
-#line 427 "parser.y"
+#line 430 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_group_by_id((yyvsp[(2) - (2)].i), scanner);
@@ -2290,21 +2293,21 @@ yyreduce:
   case 37:
 
 /* Line 1806 of yacc.c  */
-#line 436 "parser.y"
+#line 439 "parser.y"
     { (yyval.str) = NULL; }
     break;
 
   case 38:
 
 /* Line 1806 of yacc.c  */
-#line 437 "parser.y"
+#line 440 "parser.y"
     { (yyval.str) = (yyvsp[(1) - (1)].str);   }
     break;
 
   case 39:
 
 /* Line 1806 of yacc.c  */
-#line 442 "parser.y"
+#line 445 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), NULL, (yyvsp[(1) - (2)].str), scanner);
@@ -2316,7 +2319,7 @@ yyreduce:
   case 40:
 
 /* Line 1806 of yacc.c  */
-#line 449 "parser.y"
+#line 452 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (3)].meth), process_value_list((yyvsp[(3) - (3)].val), NULL), (yyvsp[(1) - (3)].str), scanner);
@@ -2328,7 +2331,7 @@ yyreduce:
   case 41:
 
 /* Line 1806 of yacc.c  */
-#line 456 "parser.y"
+#line 459 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (3)].meth), process_value_list((yyvsp[(3) - (3)].val), NULL), (yyvsp[(1) - (3)].str), scanner);
@@ -2340,7 +2343,7 @@ yyreduce:
   case 42:
 
 /* Line 1806 of yacc.c  */
-#line 466 "parser.y"
+#line 469 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_method((yyvsp[(2) - (3)].meth), (yyvsp[(3) - (3)].param), (yyvsp[(1) - (3)].str), scanner);
@@ -2352,7 +2355,7 @@ yyreduce:
   case 43:
 
 /* Line 1806 of yacc.c  */
-#line 480 "parser.y"
+#line 483 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_selelem_create(SEL_CONST);
@@ -2366,7 +2369,7 @@ yyreduce:
   case 44:
 
 /* Line 1806 of yacc.c  */
-#line 489 "parser.y"
+#line 492 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_selelem_create(SEL_CONST);
@@ -2380,7 +2383,7 @@ yyreduce:
   case 45:
 
 /* Line 1806 of yacc.c  */
-#line 501 "parser.y"
+#line 504 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), NULL, (yyvsp[(1) - (2)].str), scanner);
@@ -2392,7 +2395,7 @@ yyreduce:
   case 46:
 
 /* Line 1806 of yacc.c  */
-#line 508 "parser.y"
+#line 511 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_method((yyvsp[(2) - (3)].meth), (yyvsp[(3) - (3)].param), (yyvsp[(1) - (3)].str), scanner);
@@ -2404,7 +2407,7 @@ yyreduce:
   case 47:
 
 /* Line 1806 of yacc.c  */
-#line 518 "parser.y"
+#line 521 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '+', scanner);
@@ -2415,7 +2418,7 @@ yyreduce:
   case 48:
 
 /* Line 1806 of yacc.c  */
-#line 524 "parser.y"
+#line 527 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '-', scanner);
@@ -2426,7 +2429,7 @@ yyreduce:
   case 49:
 
 /* Line 1806 of yacc.c  */
-#line 530 "parser.y"
+#line 533 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '*', scanner);
@@ -2437,7 +2440,7 @@ yyreduce:
   case 50:
 
 /* Line 1806 of yacc.c  */
-#line 536 "parser.y"
+#line 539 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '/', scanner);
@@ -2448,7 +2451,7 @@ yyreduce:
   case 51:
 
 /* Line 1806 of yacc.c  */
-#line 542 "parser.y"
+#line 545 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(2) - (2)].sel), NULL, '-', scanner);
@@ -2459,7 +2462,7 @@ yyreduce:
   case 52:
 
 /* Line 1806 of yacc.c  */
-#line 548 "parser.y"
+#line 551 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_arithmetic((yyvsp[(1) - (3)].sel), (yyvsp[(3) - (3)].sel), '^', scanner);
@@ -2470,14 +2473,14 @@ yyreduce:
   case 53:
 
 /* Line 1806 of yacc.c  */
-#line 553 "parser.y"
+#line 556 "parser.y"
     { (yyval.sel) = (yyvsp[(2) - (3)].sel); }
     break;
 
   case 54:
 
 /* Line 1806 of yacc.c  */
-#line 561 "parser.y"
+#line 564 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_selelem_create(SEL_CONST);
@@ -2491,7 +2494,7 @@ yyreduce:
   case 55:
 
 /* Line 1806 of yacc.c  */
-#line 570 "parser.y"
+#line 573 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_keyword((yyvsp[(2) - (2)].meth), NULL, (yyvsp[(1) - (2)].str), scanner);
@@ -2503,7 +2506,7 @@ yyreduce:
   case 56:
 
 /* Line 1806 of yacc.c  */
-#line 584 "parser.y"
+#line 587 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_const_position((yyvsp[(2) - (7)].r), (yyvsp[(4) - (7)].r), (yyvsp[(6) - (7)].r));
@@ -2514,14 +2517,14 @@ yyreduce:
   case 57:
 
 /* Line 1806 of yacc.c  */
-#line 592 "parser.y"
+#line 595 "parser.y"
     { (yyval.sel) = (yyvsp[(2) - (3)].sel); }
     break;
 
   case 58:
 
 /* Line 1806 of yacc.c  */
-#line 597 "parser.y"
+#line 600 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_method((yyvsp[(1) - (2)].meth), (yyvsp[(2) - (2)].param), NULL, scanner);
@@ -2533,7 +2536,7 @@ yyreduce:
   case 59:
 
 /* Line 1806 of yacc.c  */
-#line 607 "parser.y"
+#line 610 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_position((yyvsp[(3) - (3)].sel), (yyvsp[(1) - (3)].str), scanner);
@@ -2545,7 +2548,7 @@ yyreduce:
   case 60:
 
 /* Line 1806 of yacc.c  */
-#line 620 "parser.y"
+#line 623 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_variable_ref((yyvsp[(1) - (1)].sel));
@@ -2556,7 +2559,7 @@ yyreduce:
   case 61:
 
 /* Line 1806 of yacc.c  */
-#line 628 "parser.y"
+#line 631 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_variable_ref((yyvsp[(1) - (1)].sel));
@@ -2567,7 +2570,7 @@ yyreduce:
   case 62:
 
 /* Line 1806 of yacc.c  */
-#line 636 "parser.y"
+#line 639 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.sel) = _gmx_sel_init_variable_ref((yyvsp[(1) - (1)].sel));
@@ -2578,35 +2581,35 @@ yyreduce:
   case 63:
 
 /* Line 1806 of yacc.c  */
-#line 649 "parser.y"
+#line 652 "parser.y"
     { (yyval.param) = process_param_list((yyvsp[(1) - (1)].param)); }
     break;
 
   case 64:
 
 /* Line 1806 of yacc.c  */
-#line 651 "parser.y"
+#line 654 "parser.y"
     { (yyval.param) = process_param_list((yyvsp[(1) - (2)].param)); }
     break;
 
   case 65:
 
 /* Line 1806 of yacc.c  */
-#line 655 "parser.y"
+#line 658 "parser.y"
     { (yyval.param) = NULL;              }
     break;
 
   case 66:
 
 /* Line 1806 of yacc.c  */
-#line 657 "parser.y"
+#line 660 "parser.y"
     { (yyvsp[(2) - (2)].param)->next = (yyvsp[(1) - (2)].param); (yyval.param) = (yyvsp[(2) - (2)].param); }
     break;
 
   case 67:
 
 /* Line 1806 of yacc.c  */
-#line 662 "parser.y"
+#line 665 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.param) = _gmx_selexpr_create_param((yyvsp[(1) - (2)].str));
@@ -2618,84 +2621,84 @@ yyreduce:
   case 68:
 
 /* Line 1806 of yacc.c  */
-#line 670 "parser.y"
+#line 673 "parser.y"
     { (yyval.val) = NULL; }
     break;
 
   case 69:
 
 /* Line 1806 of yacc.c  */
-#line 671 "parser.y"
+#line 674 "parser.y"
     { (yyval.val) = (yyvsp[(1) - (1)].val);   }
     break;
 
   case 70:
 
 /* Line 1806 of yacc.c  */
-#line 672 "parser.y"
+#line 675 "parser.y"
     { (yyval.val) = (yyvsp[(2) - (3)].val);   }
     break;
 
   case 71:
 
 /* Line 1806 of yacc.c  */
-#line 676 "parser.y"
+#line 679 "parser.y"
     { (yyval.val) = (yyvsp[(1) - (1)].val); }
     break;
 
   case 72:
 
 /* Line 1806 of yacc.c  */
-#line 678 "parser.y"
+#line 681 "parser.y"
     { (yyvsp[(2) - (2)].val)->next = (yyvsp[(1) - (2)].val); (yyval.val) = (yyvsp[(2) - (2)].val); }
     break;
 
   case 73:
 
 /* Line 1806 of yacc.c  */
-#line 680 "parser.y"
+#line 683 "parser.y"
     { (yyvsp[(3) - (3)].val)->next = (yyvsp[(1) - (3)].val); (yyval.val) = (yyvsp[(3) - (3)].val); }
     break;
 
   case 74:
 
 /* Line 1806 of yacc.c  */
-#line 684 "parser.y"
+#line 687 "parser.y"
     { (yyval.val) = (yyvsp[(1) - (1)].val); }
     break;
 
   case 75:
 
 /* Line 1806 of yacc.c  */
-#line 685 "parser.y"
+#line 688 "parser.y"
     { (yyval.val) = (yyvsp[(2) - (3)].val); }
     break;
 
   case 76:
 
 /* Line 1806 of yacc.c  */
-#line 689 "parser.y"
+#line 692 "parser.y"
     { (yyval.val) = (yyvsp[(1) - (1)].val); }
     break;
 
   case 77:
 
 /* Line 1806 of yacc.c  */
-#line 691 "parser.y"
+#line 694 "parser.y"
     { (yyvsp[(2) - (2)].val)->next = (yyvsp[(1) - (2)].val); (yyval.val) = (yyvsp[(2) - (2)].val); }
     break;
 
   case 78:
 
 /* Line 1806 of yacc.c  */
-#line 693 "parser.y"
+#line 696 "parser.y"
     { (yyvsp[(3) - (3)].val)->next = (yyvsp[(1) - (3)].val); (yyval.val) = (yyvsp[(3) - (3)].val); }
     break;
 
   case 79:
 
 /* Line 1806 of yacc.c  */
-#line 697 "parser.y"
+#line 700 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.val) = _gmx_selexpr_create_value_expr((yyvsp[(1) - (1)].sel));
@@ -2706,7 +2709,7 @@ yyreduce:
   case 80:
 
 /* Line 1806 of yacc.c  */
-#line 703 "parser.y"
+#line 706 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.val) = _gmx_selexpr_create_value_expr((yyvsp[(1) - (1)].sel));
@@ -2717,7 +2720,7 @@ yyreduce:
   case 81:
 
 /* Line 1806 of yacc.c  */
-#line 709 "parser.y"
+#line 712 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.val) = _gmx_selexpr_create_value_expr((yyvsp[(1) - (1)].sel));
@@ -2728,7 +2731,7 @@ yyreduce:
   case 82:
 
 /* Line 1806 of yacc.c  */
-#line 715 "parser.y"
+#line 718 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.val) = _gmx_selexpr_create_value_expr((yyvsp[(1) - (1)].sel));
@@ -2739,14 +2742,14 @@ yyreduce:
   case 83:
 
 /* Line 1806 of yacc.c  */
-#line 720 "parser.y"
+#line 723 "parser.y"
     { (yyval.val) = (yyvsp[(1) - (1)].val); }
     break;
 
   case 84:
 
 /* Line 1806 of yacc.c  */
-#line 725 "parser.y"
+#line 728 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.val) = _gmx_selexpr_create_value(INT_VALUE);
@@ -2758,7 +2761,7 @@ yyreduce:
   case 85:
 
 /* Line 1806 of yacc.c  */
-#line 732 "parser.y"
+#line 735 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.val) = _gmx_selexpr_create_value(REAL_VALUE);
@@ -2770,7 +2773,7 @@ yyreduce:
   case 86:
 
 /* Line 1806 of yacc.c  */
-#line 739 "parser.y"
+#line 742 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.val) = _gmx_selexpr_create_value(STR_VALUE);
@@ -2782,14 +2785,14 @@ yyreduce:
   case 87:
 
 /* Line 1806 of yacc.c  */
-#line 745 "parser.y"
+#line 748 "parser.y"
     { (yyval.val) = (yyvsp[(1) - (1)].val); }
     break;
 
   case 88:
 
 /* Line 1806 of yacc.c  */
-#line 750 "parser.y"
+#line 753 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.val) = _gmx_selexpr_create_value(INT_VALUE);
@@ -2801,7 +2804,7 @@ yyreduce:
   case 89:
 
 /* Line 1806 of yacc.c  */
-#line 757 "parser.y"
+#line 760 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.val) = _gmx_selexpr_create_value(REAL_VALUE);
@@ -2813,7 +2816,7 @@ yyreduce:
   case 90:
 
 /* Line 1806 of yacc.c  */
-#line 764 "parser.y"
+#line 767 "parser.y"
     {
                  BEGIN_ACTION;
                  (yyval.val) = _gmx_selexpr_create_value(REAL_VALUE);
@@ -2825,7 +2828,7 @@ yyreduce:
 
 
 /* Line 1806 of yacc.c  */
-#line 2829 "parser.cpp"
+#line 2832 "parser.cpp"
       default: break;
     }
   /* User semantic actions sometimes alter yychar, and that requires
@@ -3059,7 +3062,7 @@ yypushreturn:
 
 
 /* Line 2067 of yacc.c  */
-#line 772 "parser.y"
+#line 775 "parser.y"
 
 
 static t_selexpr_value *
@@ -3116,5 +3119,3 @@ yyerror(yyscan_t scanner, char const *s)
     _gmx_selparser_error(scanner, "%s", s);
 }
 
-
-
index bee66d53c89795013fb4b2050c2298e0526f0a6a..f42ba490213f7200b9e2c7da4b93f517a051ca4d 100644 (file)
@@ -80,7 +80,7 @@ typedef union YYSTYPE
 {
 
 /* Line 2068 of yacc.c  */
-#line 101 "parser.y"
+#line 104 "parser.y"
 
     int                         i;
     real                        r;
index f279a12ae7154a378b4da0abec779f346a48a39a..aa3ca3b4d07828cc33d733498a655a354a242e51 100644 (file)
 
 #include "scanner.h"
 
+//! Helper method to reorder a list of parameter values and to count the values.
 static t_selexpr_value *
 process_value_list(t_selexpr_value *values, int *nr);
+//! Helper method to reorder a list of parameters.
 static t_selexpr_param *
 process_param_list(t_selexpr_param *params);
 
+//! Error handler needed by Bison.
 static void
 yyerror(yyscan_t, char const *s);
 
@@ -824,5 +827,3 @@ yyerror(yyscan_t scanner, char const *s)
 {
     _gmx_selparser_error(scanner, "%s", s);
 }
-
-
index f3ddf929711c0fcce416ac6d97e742b2f2a8a2bb..4229b36f987f7f0ad2cede073b56e435a3c62b5c 100644 (file)
@@ -83,6 +83,9 @@
 #undef yytext
 #undef yyleng
 
+/*! \brief
+ * Handles initialization of method parameter token.
+ */
 static int
 init_param_token(YYSTYPE *yylval, gmx_ana_selparam_t *param, bool bBoolNo)
 {
@@ -102,6 +105,9 @@ init_param_token(YYSTYPE *yylval, gmx_ana_selparam_t *param, bool bBoolNo)
     return PARAM;
 }
 
+/*! \brief
+ * Processes a selection method token.
+ */
 static int
 init_method_token(YYSTYPE *yylval, gmx_ana_selmethod_t *method, bool bPosMod,
                   gmx_sel_lexer_t *state)
@@ -127,7 +133,9 @@ init_method_token(YYSTYPE *yylval, gmx_ana_selmethod_t *method, bool bPosMod,
                 GMX_ERROR_NORET(gmx::eeInternalError, "Unsupported keyword type");
                 return INVALID;
         }
-    } else {
+    }
+    else
+    {
         /* Method with parameters or a modifier */
         if (method->flags & SMETH_MODIFIER)
         {
index 4a8281e733ce36a0063d0810e0d7437b4cd7bb18..dbe912800b0e2c58ab6f43f5e4356b0452ecbd14 100644 (file)
@@ -254,7 +254,7 @@ init_data_compare(int npar, gmx_ana_selparam_t *param)
     return data;
 }
 
-/* \brief
+/*! \brief
  * Reverses a comparison operator.
  *
  * \param[in] type  Comparison operator to reverse.
@@ -312,7 +312,7 @@ init_comparison_value(t_compare_value *val, gmx_ana_selparam_t param[2])
     return n;
 }
 
-/* \brief
+/*! \brief
  * Converts an integer value to floating point.
  *
  * \param[in]     n   Number of values in the \p val->u array.
@@ -335,7 +335,7 @@ convert_int_real(int n, t_compare_value *val)
     val->flags |= CMP_REALVAL | CMP_ALLOCREAL;
 }
 
-/* \brief
+/*! \brief
  * Converts a floating point value to integer.
  *
  * \param[in]     n      Number of values in the \p val->u array.
index 5a497de1068b4c91b54399eed57ca4732f4baf66..c2a6903ceed0cd061a885b25dc6e4d3614416016 100644 (file)
@@ -179,8 +179,8 @@ static gmx_ana_selmethod_t sm_same_str = {
 
 /*!
  * \param[in]     npar  Not used (should be 2).
- * \param[in,out] param Method parameters (should point to 
- *   \ref smparams_same).
+ * \param[in,out] param Method parameters (should point to a copy of
+ *      ::smparams_same_int or ::smparams_same_str).
  * \returns Pointer to the allocated data (\ref t_methoddata_same).
  */
 static void *
@@ -260,7 +260,7 @@ _gmx_selelem_custom_init_same(gmx_ana_selmethod_t **method,
  * \param   top   Not used.
  * \param   npar  Not used (should be 2).
  * \param   param Initialized method parameters (should point to a copy of
- *      \ref smparams_same).
+ *      ::smparams_same_int or ::smparams_same_str).
  * \param   data  Pointer to \ref t_methoddata_same to initialize.
  * \returns 0 on success, -1 on failure.
  */
index 33bd170a21afb5117a0d9c62fb221dc4fce5ab99..ddda31a17f159ead31dc192614affae211226082 100644 (file)
@@ -372,6 +372,7 @@ Angle::initAnalysis(const TrajectoryAnalysisSettings &settings,
 }
 
 
+//! Helper method to process selections into an array of coordinates.
 static void
 copy_pos(const SelectionList &sel, bool bSplit, int natoms,
          int firstg, int first, rvec x[])
@@ -393,6 +394,7 @@ copy_pos(const SelectionList &sel, bool bSplit, int natoms,
 }
 
 
+//! Helper method to calculate a vector from two or three positions..
 static void
 calc_vec(int natoms, rvec x[], t_pbc *pbc, rvec xout, rvec cout)
 {
index 7c20a46e368049663938c28ddbe30a7f2fa3dabb..4d2a207ba9d174c3ba64fa53ce7ce2aacce2c280 100644 (file)
 
 #include "errorformat.h"
 
-// This has to match the enum in errorcodes.h
-static const char *const error_names[] =
+namespace gmx
+{
+
+namespace
+{
+
+/*! \brief
+ * Strings corresponding to gmx::ErrorCode values.
+ *
+ * This has to match the enum in errorcodes.h!
+ */
+const char *const error_names[] =
 {
     "No error",
     "Out of memory",
@@ -65,8 +75,23 @@ static const char *const error_names[] =
     "Unknown error",
 };
 
-namespace gmx
+/*! \brief
+ * The default error handler if setFatalErrorHandler() is not called.
+ */
+void standardErrorHandler(int retcode, const char *msg,
+                          const char *file, int line)
 {
+    const char *title = getErrorCodeString(retcode);
+    internal::printFatalError(stderr, title, msg, NULL, file, line);
+    std::exit(1);
+}
+
+//! Global error handler set with setFatalErrorHandler().
+ErrorHandlerFunc g_errorHandler = standardErrorHandler;
+//! Mutex for protecting access to g_errorHandler.
+tMPI::mutex handler_mutex;
+
+} // namespace
 
 const char *getErrorCodeString(int errorcode)
 {
@@ -77,23 +102,12 @@ const char *getErrorCodeString(int errorcode)
     return error_names[errorcode];
 }
 
-static void standardErrorHandler(int retcode, const char *msg,
-                                 const char *file, int line)
-{
-    const char *title = getErrorCodeString(retcode);
-    internal::printFatalError(stderr, title, msg, NULL, file, line);
-    std::exit(1);
-}
-
-static ErrorHandlerFunc error_handler = standardErrorHandler;
-static tMPI::mutex handler_mutex;
-
 ErrorHandlerFunc setFatalErrorHandler(ErrorHandlerFunc handler)
 {
     tMPI::lock_guard<tMPI::mutex> lock(handler_mutex);
-    ErrorHandlerFunc old_handler = error_handler;
-    error_handler = handler;
-    return old_handler;
+    ErrorHandlerFunc oldHandler = g_errorHandler;
+    g_errorHandler = handler;
+    return oldHandler;
 }
 
 /*! \cond internal */
@@ -105,7 +119,7 @@ void fatalError(int retcode, const char *msg, const char *file, int line)
     ErrorHandlerFunc handler = NULL;
     {
         tMPI::lock_guard<tMPI::mutex> lock(handler_mutex);
-        handler = error_handler;
+        handler = g_errorHandler;
     }
     if (handler != NULL)
     {
index 6815151226ba1a4d3325dc55015808ac1f907df6..0adbd5940f16ee974fe84e98e66a6f6ad36878ea 100644 (file)
 #include <direct.h>
 #endif
 
-static const char cDirSeparator = '/';
-static const char cDirSeparators[] = "/\\";
+namespace
+{
+
+//! Directory separator to use when joining paths.
+const char cDirSeparator = '/';
+//! Directory separators to use when parsing paths.
+const char cDirSeparators[] = "/\\";
+
+} // namespace
 
 namespace gmx
 {
index ae0bab30ec0b1188f5c9008688b2438466f70e39..c45508ddd0c9cca534a07f7800245967ac6b7543 100644 (file)
 #include "gromacs/utility/gmxassert.h"
 #include "gromacs/utility/path.h"
 
-static const char *g_testDataPath = NULL;
+namespace
+{
+
+//! Global test input data path set with gmx::test::TestFileManager::setTestDataPath().
+const char *g_testDataPath = NULL;
+
+} // namespace
 
 namespace gmx
 {
index aca0d24ffcbb962c3612f32618dd54e5de536900..2ba66fe6df715717589ee85214b347ce06449249 100644 (file)
 namespace
 {
 
+/*! \internal \brief
+ * Global test environment for freeing up libxml2 internal buffers.
+ */
 class TestReferenceDataEnvironment : public ::testing::Environment
 {
     public:
+        //! Frees internal buffers allocated by libxml2.
         virtual void TearDown()
         {
             xmlCleanupParser();
         }
 };
 
+//! Global reference data mode set with gmx::test::setReferenceDataMode().
+gmx::test::ReferenceDataMode g_referenceDataMode = gmx::test::erefdataCompare;
+
 } // namespace
 
 namespace gmx
@@ -74,8 +81,6 @@ namespace gmx
 namespace test
 {
 
-static ReferenceDataMode g_referenceDataMode = erefdataCompare;
-
 ReferenceDataMode getReferenceDataMode()
 {
     return g_referenceDataMode;
index 5fbea78a9512b654a7a1612d0d2ca847cbd93739..9601dfe66ceee7a986947d6d5b0bd397e64e881d 100644 (file)
 #include "refdata.h"
 #include "testexceptions.h"
 
-static boost::scoped_ptr<std::vector<std::string> > s_commandLine;
+namespace
+{
+
+//! Stored command line for gmx::test::parseTestOptions().
+boost::scoped_ptr<std::vector<std::string> > s_commandLine;
+
+} // namespace
 
 namespace gmx
 {