Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / options / tests / abstractoptionstorage.cpp
index 4631aff79335f4186aea5ebbe39f08bcf17dc695..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"
@@ -119,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 "";
@@ -151,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);
         }
 };