Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / selection / sm_same.cpp
index df2bb67a461edec0fda0415a2b34a58512a84020..cb8126171bb215283086f6f3dc560c3458187d5d 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012, by the GROMACS development team, led by
- * David van der Spoel, Berk Hess, Erik Lindahl, and including many
- * others, as listed in the AUTHORS file in the top-level source
- * directory and at http://www.gromacs.org.
+ * Copyright (c) 2009,2010,2011,2012,2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
  *
  * GROMACS is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
  * \author Teemu Murtola <teemu.murtola@gmail.com>
  * \ingroup module_selection
  */
+#include "gmxpre.h"
+
 #include <stdlib.h>
 
 #include "gromacs/legacyheaders/macros.h"
-#include "gromacs/legacyheaders/smalloc.h"
-#include "gromacs/legacyheaders/string2.h"
-
-#include "gromacs/selection/selmethod.h"
 #include "gromacs/utility/exceptions.h"
+#include "gromacs/utility/smalloc.h"
 
 #include "keywords.h"
 #include "parsetree.h"
 #include "selelem.h"
+#include "selmethod.h"
 
-/*! \internal \brief
+/*! \internal
+ * \brief
  * Data structure for the \p same selection method.
  *
  * To avoid duplicate initialization code, the same data structure is used
  * for matching both integer and string keywords; hence the unions.
+ *
+ * \ingroup module_selection
  */
 typedef struct
 {
@@ -94,28 +97,64 @@ typedef struct
     bool                     bSorted;
 } t_methoddata_same;
 
-/** Allocates data for the \p same selection method. */
+/*! \brief
+ * Allocates data for the \p same selection method.
+ *
+ * \param[in]     npar  Not used (should be 2).
+ * \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 *
 init_data_same(int npar, gmx_ana_selparam_t *param);
-/** Initializes the \p same selection method. */
+/*! \brief
+ * Initializes the \p same selection method.
+ *
+ * \param   top   Not used.
+ * \param   npar  Not used (should be 2).
+ * \param   param Initialized method parameters (should point to a copy of
+ *      ::smparams_same_int or ::smparams_same_str).
+ * \param   data  Pointer to \ref t_methoddata_same to initialize.
+ * \returns 0 on success, -1 on failure.
+ */
 static void
 init_same(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
 /** Frees the data allocated for the \p same selection method. */
 static void
 free_data_same(void *data);
-/** Initializes the evaluation of the \p same selection method for a frame. */
+/*! \brief
+ * Initializes the evaluation of the \p same selection method for a frame.
+ *
+ * \param[in]  top  Not used.
+ * \param[in]  fr   Current frame.
+ * \param[in]  pbc  PBC structure.
+ * \param      data Should point to a \ref t_methoddata_same.
+ *
+ * Sorts the \c data->as.i array and removes identical values for faster and
+ * simpler lookup.
+ */
 static void
 init_frame_same_int(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data);
 /** Evaluates the \p same selection method. */
 static void
-evaluate_same_int(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_same_int(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                   gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data);
-/** Initializes the evaluation of the \p same selection method for a frame. */
+/*! \brief
+ * Initializes the evaluation of the \p same selection method for a frame.
+ *
+ * \param[in]  top  Not used.
+ * \param[in]  fr   Current frame.
+ * \param[in]  pbc  PBC structure.
+ * \param      data Should point to a \ref t_methoddata_same.
+ *
+ * Sorts the \c data->as.s array and removes identical values for faster and
+ * simpler lookup.
+ */
 static void
 init_frame_same_str(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data);
 /** Evaluates the \p same selection method. */
 static void
-evaluate_same_str(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_same_str(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                   gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data);
 
 /** Parameters for the \p same selection method. */
@@ -177,14 +216,8 @@ static gmx_ana_selmethod_t sm_same_str = {
     {"same KEYWORD as ATOM_EXPR", asize(help_same), help_same},
 };
 
-/*!
- * \param[in]     npar  Not used (should be 2).
- * \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 *
-init_data_same(int npar, gmx_ana_selparam_t *param)
+init_data_same(int /* npar */, gmx_ana_selparam_t *param)
 {
     t_methoddata_same *data;
 
@@ -255,16 +288,8 @@ _gmx_selelem_custom_init_same(gmx_ana_selmethod_t                           **me
     return 0;
 }
 
-/*!
- * \param   top   Not used.
- * \param   npar  Not used (should be 2).
- * \param   param Initialized method parameters (should point to a copy of
- *      ::smparams_same_int or ::smparams_same_str).
- * \param   data  Pointer to \ref t_methoddata_same to initialize.
- * \returns 0 on success, -1 on failure.
- */
 static void
-init_same(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+init_same(t_topology * /* top */, int /* npar */, gmx_ana_selparam_t *param, void *data)
 {
     t_methoddata_same *d = (t_methoddata_same *)data;
 
@@ -311,17 +336,8 @@ cmp_int(const void *a, const void *b)
     return 0;
 }
 
-/*!
- * \param[in]  top  Not used.
- * \param[in]  fr   Current frame.
- * \param[in]  pbc  PBC structure.
- * \param      data Should point to a \ref t_methoddata_same.
- *
- * Sorts the \c data->as.i array and removes identical values for faster and
- * simpler lookup.
- */
 static void
-init_frame_same_int(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data)
+init_frame_same_int(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */, void *data)
 {
     t_methoddata_same *d = (t_methoddata_same *)data;
     int                i, j;
@@ -369,7 +385,7 @@ init_frame_same_int(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data)
  * \c data->val.
  */
 static void
-evaluate_same_int(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_same_int(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                   gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_same     *d = (t_methoddata_same *)data;
@@ -444,17 +460,8 @@ cmp_str(const void *a, const void *b)
     return strcmp(*(char **)a, *(char **)b);
 }
 
-/*!
- * \param[in]  top  Not used.
- * \param[in]  fr   Current frame.
- * \param[in]  pbc  PBC structure.
- * \param      data Should point to a \ref t_methoddata_same.
- *
- * Sorts the \c data->as.s array and removes identical values for faster and
- * simpler lookup.
- */
 static void
-init_frame_same_str(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data)
+init_frame_same_str(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */, void *data)
 {
     t_methoddata_same *d = (t_methoddata_same *)data;
     int                i, j;
@@ -497,7 +504,7 @@ init_frame_same_str(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data)
  * \c data->val.
  */
 static void
-evaluate_same_str(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_same_str(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                   gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_same     *d = (t_methoddata_same *)data;