Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / options / optionsassigner.h
index 506ba395cfa8766495f2d3710ec4bd62046ead46..d56529e7074dd456457914effea8b983ae98645a 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 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) 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
@@ -47,7 +47,7 @@
 
 #include <string>
 
-#include "../utility/common.h"
+#include "gromacs/utility/common.h"
 
 namespace gmx
 {
@@ -62,10 +62,10 @@ class Options;
  * to assign values to options in subsections within the Options object.
  * Typical use (without error handling):
  * \code
-   gmx::options::Options options("name", "Title");
+   gmx::Options options("name", "Title");
    // Set up options
 
-   gmx::options::OptionsAssigner assigner(&options);
+   gmx::OptionsAssigner assigner(&options);
    assigner.start();
    assigner.startOption("opt1");
    assigner.appendValue("3");
@@ -127,13 +127,13 @@ class OptionsAssigner
         void setNoStrictSectioning(bool bEnabled);
 
         /*! \brief
-         * Start assigning values.
+         * Starts assigning values.
          *
          * Does not throw.
          */
         void start();
         /*! \brief
-         * Start assigning values to options in a subsection.
+         * Starts assigning values to options in a subsection.
          *
          * \param[in] name  Name of the subsection to start assigning to.
          * \throws InvalidInputError if such a subsection is not found.
@@ -142,15 +142,22 @@ class OptionsAssigner
          */
         void startSubSection(const char *name);
         /*! \brief
-         * Start assigning values for an option.
+         * Starts assigning values for an option.
          *
          * \param[in] name  Name of the option to start assigning to.
          * \throws InvalidInputError if such an option is not found, or if the
          *      option is specified more than once but doesn't support it.
-         *
-         * Strong exception safety guarantee.
          */
         void startOption(const char *name);
+        /*! \brief
+         * Starts assigning values for an option.
+         *
+         * \param[in] name  Name of the option to start assigning to.
+         * \returns   true if \p name is a valid option name.
+         * \throws InvalidInputError if the option is specified more than once
+         *      but doesn't support it.
+         */
+        bool tryStartOption(const char *name);
         /*! \brief
          * Appends a value to the value list of the current option.
          *