Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / options / tests / abstractoptionstorage.cpp
index 60b39afc28fa4f474c36c32d9b2c2edfda05d1fb..1682129575a0eec6f53c8cd1fd2ef746797d64d5 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012,2013, 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
  * \author Teemu Murtola <teemu.murtola@gmail.com>
  * \ingroup module_options
  */
-#include <vector>
+#include "gmxpre.h"
+
 #include <string>
+#include <vector>
 
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
 #include "gromacs/options/abstractoption.h"
 #include "gromacs/options/options.h"
-#include "gromacs/options/optionstoragetemplate.h"
 #include "gromacs/options/optionsassigner.h"
+#include "gromacs/options/optionstoragetemplate.h"
 #include "gromacs/utility/exceptions.h"
 
 #include "testutils/testasserts.h"
@@ -72,7 +74,7 @@ class MockOptionInfo : public gmx::OptionInfo
         MockOptionStorage &option();
 };
 
-/*! \internal \brief
+/*! \brief
  * Mock implementation of an option storage class for unit testing.
  *
  * Provides facilities for checking that correct methods are called, and for
@@ -101,14 +103,17 @@ class MockOptionStorage : public gmx::OptionStorageTemplate<std::string>
         // using MyBase::addValue;
         // using MyBase::commitValues;
         // "using" is correct but MSVC gives error C2248. Workaround:
+        //! \copydoc gmx::OptionStorageTemplate::markAsSet()
         void markAsSet()
         {
             MyBase::markAsSet();
         }
+        //! \copydoc gmx::OptionStorageTemplate::addValue()
         void addValue(const std::string &value)
         {
             MyBase::addValue(value);
         }
+        //! \copydoc gmx::OptionStorageTemplate::commitValues()
         void commitValues()
         {
             MyBase::commitValues();
@@ -116,7 +121,7 @@ class MockOptionStorage : public gmx::OptionStorageTemplate<std::string>
 
         virtual gmx::OptionInfo &optionInfo() { return info_; }
         // These are not used.
-        virtual const char *typeString() const { return "mock"; }
+        virtual std::string typeString() const { return "mock"; }
         virtual std::string formatSingleValue(const std::string & /*value*/) const
         {
             return "";
@@ -148,9 +153,10 @@ class MockOption : public gmx::OptionTemplate<std::string, MockOption>
         }
 
     private:
-        virtual gmx::AbstractOptionStoragePointer createStorage() const
+        virtual gmx::AbstractOptionStorage *createStorage(
+            const gmx::OptionManagerContainer & /*managers*/) const
         {
-            return gmx::AbstractOptionStoragePointer(new MockOptionStorage(*this));
+            return new MockOptionStorage(*this);
         }
 };