From 8bfd8dcf84d26587db444f6b00e797a6073c1d3c Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Fri, 29 Jan 2021 13:11:02 +0100 Subject: [PATCH] Remove PrivateImplPointer in favour of std::unique_ptr The single remaining advantage (help with const correctness in an unlikely corner case) is outweighed by the disadvantages of using a custom solution where a generic one would do. Fixes #3684 --- src/api/cpp/tests/restraint.cpp | 1 - src/gromacs/analysisdata/abstractdata.h | 6 +- src/gromacs/analysisdata/analysisdata.h | 4 +- src/gromacs/analysisdata/datamodulemanager.h | 7 +- src/gromacs/analysisdata/datastorage.cpp | 3 +- src/gromacs/analysisdata/datastorage.h | 5 +- src/gromacs/analysisdata/modules/average.h | 8 +- .../analysisdata/modules/displacement.h | 4 +- src/gromacs/analysisdata/modules/histogram.h | 8 +- src/gromacs/analysisdata/modules/lifetime.h | 7 +- src/gromacs/analysisdata/modules/plot.h | 5 +- .../analysisdata/tests/mock_datamodule.h | 5 +- .../densityfittingforceprovider.h | 5 +- src/gromacs/commandline/cmdlinehelpcontext.h | 5 +- src/gromacs/commandline/cmdlinehelpmodule.cpp | 1 + src/gromacs/commandline/cmdlinehelpmodule.h | 7 +- src/gromacs/commandline/cmdlinehelpwriter.h | 7 +- src/gromacs/commandline/cmdlinemodule.h | 6 +- .../commandline/cmdlinemodulemanager.h | 5 +- src/gromacs/commandline/cmdlineparser.h | 7 +- .../commandline/cmdlineprogramcontext.h | 5 +- src/gromacs/commandline/shellcompletions.h | 7 +- .../tests/cmdlinemodulemanagertest.h | 6 +- .../coordinateio/outputadaptercontainer.h | 3 +- .../tests/correlationdataset.h | 3 +- src/gromacs/domdec/builder.h | 7 +- src/gromacs/domdec/gpuhaloexchange.h | 7 +- src/gromacs/domdec/localatomsetmanager.h | 5 +- src/gromacs/essentialdynamics/edsam.h | 5 +- .../ewald/pme_coordinate_receiver_gpu.h | 7 +- src/gromacs/ewald/pme_force_sender_gpu.h | 7 +- src/gromacs/ewald/pme_gpu_program_impl.h | 4 +- src/gromacs/ewald/pme_pp_comm_gpu.h | 7 +- src/gromacs/fileio/mrcdensitymap.h | 10 +- src/gromacs/gmxpreprocess/gpp_atomtype.h | 6 +- src/gromacs/gmxpreprocess/gpp_bond_atomtype.h | 7 +- src/gromacs/gpu_utils/device_context.h | 5 +- src/gromacs/gpu_utils/device_stream.h | 5 +- src/gromacs/gpu_utils/device_stream_manager.h | 7 +- src/gromacs/imd/imd.h | 5 +- src/gromacs/listed_forces/gpubonded.h | 7 +- src/gromacs/math/coordinatetransformation.h | 9 +- src/gromacs/math/densityfit.h | 5 +- src/gromacs/math/densityfittingforce.h | 7 +- src/gromacs/math/gausstransform.h | 8 +- src/gromacs/mdlib/constr.h | 7 +- src/gromacs/mdlib/gpuforcereduction.h | 7 +- src/gromacs/mdlib/leapfrog_gpu.h | 5 +- src/gromacs/mdlib/lincs_gpu.cuh | 5 +- src/gromacs/mdlib/update.h | 7 +- src/gromacs/mdlib/update_constrain_gpu.h | 7 +- src/gromacs/mdlib/vsite.h | 5 +- src/gromacs/mdrun/mdmodules.h | 6 +- src/gromacs/mdtypes/forcebuffers.h | 5 +- src/gromacs/mdtypes/iforceprovider.h | 7 +- .../mdtypes/state_propagator_data_gpu.h | 5 +- .../mdtypes/state_propagator_data_gpu_impl.h | 6 +- src/gromacs/onlinehelp/helpformat.h | 7 +- src/gromacs/onlinehelp/helpmanager.h | 7 +- src/gromacs/onlinehelp/helptopic.h | 5 +- src/gromacs/onlinehelp/helpwritercontext.cpp | 3 +- src/gromacs/onlinehelp/helpwritercontext.h | 7 +- src/gromacs/onlinehelp/rstparser.h | 3 +- src/gromacs/options/abstractoption.h | 3 +- src/gromacs/options/abstractoptionstorage.h | 3 +- src/gromacs/options/abstractsection.h | 4 +- src/gromacs/options/filenameoptionmanager.h | 6 +- src/gromacs/options/optionmanagercontainer.h | 3 +- src/gromacs/options/options.h | 6 +- src/gromacs/options/options_impl.h | 3 +- src/gromacs/options/optionsassigner.h | 7 +- src/gromacs/options/optionsection.h | 4 +- src/gromacs/options/optionsvisitor.h | 3 +- src/gromacs/options/timeunitmanager.h | 4 +- src/gromacs/pbcutil/com.h | 4 +- src/gromacs/pulling/pull_rotation.h | 5 +- src/gromacs/random/exponentialdistribution.h | 3 +- src/gromacs/random/gammadistribution.h | 3 +- src/gromacs/random/normaldistribution.h | 3 +- .../random/tabulatednormaldistribution.h | 3 +- src/gromacs/random/threefry.h | 3 +- src/gromacs/random/uniformintdistribution.h | 3 +- src/gromacs/random/uniformrealdistribution.h | 4 +- src/gromacs/selection/nbsearch.cpp | 3 +- src/gromacs/selection/nbsearch.h | 5 +- src/gromacs/selection/poscalc.h | 6 +- src/gromacs/selection/selection.h | 3 +- src/gromacs/selection/selectioncollection.h | 6 +- .../selection/selectionoptionbehavior.h | 6 +- .../selection/selectionoptionmanager.h | 6 +- src/gromacs/selection/selhelp.cpp | 3 +- src/gromacs/selection/symrec.h | 11 +- src/gromacs/simd/simd.h | 4 +- src/gromacs/tables/cubicsplinetable.h | 3 +- src/gromacs/tables/quadraticsplinetable.h | 3 +- src/gromacs/topology/atomprop.h | 6 +- src/gromacs/topology/atomsbuilder.h | 4 +- src/gromacs/topology/residuetypes.h | 6 +- .../trajectoryanalysis/analysismodule.h | 7 +- .../trajectoryanalysis/analysissettings.h | 6 +- .../trajectoryanalysis/modules/angle.cpp | 3 +- .../trajectoryanalysis/modules/surfacearea.h | 7 +- src/gromacs/trajectoryanalysis/runnercommon.h | 6 +- .../trajectoryanalysis/tests/moduletest.h | 7 +- src/gromacs/utility.h | 9 +- src/gromacs/utility/classhelpers.h | 115 +----------------- src/gromacs/utility/datafilefinder.h | 6 +- src/gromacs/utility/directoryenumerator.h | 7 +- src/gromacs/utility/filestream.h | 8 +- src/gromacs/utility/inmemoryserializer.h | 8 +- src/gromacs/utility/keyvaluetreetransform.h | 8 +- src/gromacs/utility/loggerbuilder.h | 9 +- src/gromacs/utility/messagestringcollector.h | 5 +- src/gromacs/utility/textreader.h | 6 +- src/gromacs/utility/textwriter.h | 6 +- src/programs/mdrun/tests/moduletest.h | 4 +- src/testutils/include/testutils/cmdlinetest.h | 9 +- .../include/testutils/interactivetest.h | 7 +- src/testutils/include/testutils/loggertest.h | 7 +- src/testutils/include/testutils/refdata.h | 4 +- src/testutils/include/testutils/stdiohelper.h | 4 +- src/testutils/include/testutils/stringtest.h | 7 +- src/testutils/include/testutils/test_device.h | 6 +- .../include/testutils/testfilemanager.h | 7 +- .../include/testutils/testfileredirector.h | 5 +- src/testutils/testoptions.cpp | 3 +- 126 files changed, 366 insertions(+), 436 deletions(-) diff --git a/src/api/cpp/tests/restraint.cpp b/src/api/cpp/tests/restraint.cpp index 11d001db64..08ce92c084 100644 --- a/src/api/cpp/tests/restraint.cpp +++ b/src/api/cpp/tests/restraint.cpp @@ -45,7 +45,6 @@ #include "gromacs/math/vectypes.h" #include "gromacs/restraint/restraintpotential.h" #include "gromacs/utility/arrayref.h" -#include "gromacs/utility/classhelpers.h" namespace gmxapi { diff --git a/src/gromacs/analysisdata/abstractdata.h b/src/gromacs/analysisdata/abstractdata.h index ca83202be5..c8ed78454b 100644 --- a/src/gromacs/analysisdata/abstractdata.h +++ b/src/gromacs/analysisdata/abstractdata.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010,2011,2012,2013,2014 by the GROMACS development team. - * Copyright (c) 2015,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2015,2019,2020,2021, 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. @@ -46,8 +46,6 @@ #include -#include "gromacs/utility/classhelpers.h" - namespace gmx { @@ -437,7 +435,7 @@ protected: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/analysisdata/analysisdata.h b/src/gromacs/analysisdata/analysisdata.h index 0c74baf712..5b4d12a761 100644 --- a/src/gromacs/analysisdata/analysisdata.h +++ b/src/gromacs/analysisdata/analysisdata.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010-2018, The GROMACS development team. - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2021, 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. @@ -200,7 +200,7 @@ private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; friend class AnalysisDataHandle; }; diff --git a/src/gromacs/analysisdata/datamodulemanager.h b/src/gromacs/analysisdata/datamodulemanager.h index 55f15ac857..44c844b4b0 100644 --- a/src/gromacs/analysisdata/datamodulemanager.h +++ b/src/gromacs/analysisdata/datamodulemanager.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010,2011,2012,2013,2014 by the GROMACS development team. - * Copyright (c) 2015,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2015,2019,2020,2021, 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. @@ -44,8 +44,9 @@ #ifndef GMX_ANALYSISDATA_DATAMODULEMANAGER_H #define GMX_ANALYSISDATA_DATAMODULEMANAGER_H +#include + #include "gromacs/analysisdata/abstractdata.h" -#include "gromacs/utility/classhelpers.h" namespace gmx { @@ -272,7 +273,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/analysisdata/datastorage.cpp b/src/gromacs/analysisdata/datastorage.cpp index 0601192788..7f80c082a8 100644 --- a/src/gromacs/analysisdata/datastorage.cpp +++ b/src/gromacs/analysisdata/datastorage.cpp @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team. - * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2017,2018,2019,2020,2021, 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. @@ -54,6 +54,7 @@ #include "gromacs/analysisdata/dataframe.h" #include "gromacs/analysisdata/datamodulemanager.h" #include "gromacs/analysisdata/paralleloptions.h" +#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/exceptions.h" #include "gromacs/utility/gmxassert.h" diff --git a/src/gromacs/analysisdata/datastorage.h b/src/gromacs/analysisdata/datastorage.h index 789e6fc126..fad12ae58f 100644 --- a/src/gromacs/analysisdata/datastorage.h +++ b/src/gromacs/analysisdata/datastorage.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2012,2013,2014,2019, by the GROMACS development team, led by + * Copyright (c) 2012,2013,2014,2019,2021, 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. @@ -43,6 +43,7 @@ #ifndef GMX_ANALYSISDATA_DATASTORAGE_H #define GMX_ANALYSISDATA_DATASTORAGE_H +#include #include #include "gromacs/analysisdata/dataframe.h" @@ -428,7 +429,7 @@ public: private: typedef internal::AnalysisDataStorageImpl Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/analysisdata/modules/average.h b/src/gromacs/analysisdata/modules/average.h index 01e62d61e1..63abd9c69f 100644 --- a/src/gromacs/analysisdata/modules/average.h +++ b/src/gromacs/analysisdata/modules/average.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010,2011,2012,2013,2014 by the GROMACS development team. - * Copyright (c) 2015,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2015,2018,2019,2020,2021, 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. @@ -44,12 +44,12 @@ #ifndef GMX_ANALYSISDATA_MODULES_AVERAGE_H #define GMX_ANALYSISDATA_MODULES_AVERAGE_H +#include #include #include "gromacs/analysisdata/abstractdata.h" #include "gromacs/analysisdata/arraydata.h" #include "gromacs/analysisdata/datamodule.h" -#include "gromacs/utility/classhelpers.h" namespace gmx { @@ -138,7 +138,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; //! Smart pointer to manage an AnalysisDataAverageModule object. @@ -182,7 +182,7 @@ private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; //! Smart pointer to manage an AnalysisDataFrameAverageModule object. diff --git a/src/gromacs/analysisdata/modules/displacement.h b/src/gromacs/analysisdata/modules/displacement.h index 9cad05c3ca..12916d7b32 100644 --- a/src/gromacs/analysisdata/modules/displacement.h +++ b/src/gromacs/analysisdata/modules/displacement.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010,2011,2012,2013,2014 by the GROMACS development team. - * Copyright (c) 2015,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2015,2018,2019,2020,2021, 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. @@ -98,7 +98,7 @@ private: class Impl; - PrivateImplPointer _impl; + std::unique_ptr _impl; }; //! Smart pointer to manage an AnalysisDataDisplacementModule object. diff --git a/src/gromacs/analysisdata/modules/histogram.h b/src/gromacs/analysisdata/modules/histogram.h index c15844c6c3..8f4b5c39df 100644 --- a/src/gromacs/analysisdata/modules/histogram.h +++ b/src/gromacs/analysisdata/modules/histogram.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010,2011,2012,2013,2014 by the GROMACS development team. - * Copyright (c) 2015,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2015,2018,2019,2020,2021, 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. @@ -425,7 +425,7 @@ private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; // Copy and assign disallowed by base. }; @@ -487,7 +487,7 @@ private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; // Copy and assign disallowed by base. }; @@ -535,7 +535,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; // Copy and assign disallowed by base. }; diff --git a/src/gromacs/analysisdata/modules/lifetime.h b/src/gromacs/analysisdata/modules/lifetime.h index ede0b25bab..d77eb486c9 100644 --- a/src/gromacs/analysisdata/modules/lifetime.h +++ b/src/gromacs/analysisdata/modules/lifetime.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2013,2014,2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2018,2019,2021, 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. @@ -43,9 +43,10 @@ #ifndef GMX_ANALYSISDATA_MODULES_LIFETIME_H #define GMX_ANALYSISDATA_MODULES_LIFETIME_H +#include + #include "gromacs/analysisdata/arraydata.h" #include "gromacs/analysisdata/datamodule.h" -#include "gromacs/utility/classhelpers.h" namespace gmx { @@ -102,7 +103,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; //! Smart pointer to manage an AnalysisDataLifetimeModule object. diff --git a/src/gromacs/analysisdata/modules/plot.h b/src/gromacs/analysisdata/modules/plot.h index 7064a49c22..371fb8fabb 100644 --- a/src/gromacs/analysisdata/modules/plot.h +++ b/src/gromacs/analysisdata/modules/plot.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010,2011,2012,2013,2014 by the GROMACS development team. - * Copyright (c) 2015,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2015,2018,2019,2020,2021, 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. @@ -49,7 +49,6 @@ #include "gromacs/analysisdata/datamodule.h" #include "gromacs/options/timeunitmanager.h" -#include "gromacs/utility/classhelpers.h" enum class XvgFormat : int; @@ -254,7 +253,7 @@ protected: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; diff --git a/src/gromacs/analysisdata/tests/mock_datamodule.h b/src/gromacs/analysisdata/tests/mock_datamodule.h index 65eaf2b06a..1ce1025e70 100644 --- a/src/gromacs/analysisdata/tests/mock_datamodule.h +++ b/src/gromacs/analysisdata/tests/mock_datamodule.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2011,2012,2013,2014,2015 by the GROMACS development team. - * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020,2021, 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. @@ -53,7 +53,6 @@ #include "gromacs/analysisdata/dataframe.h" #include "gromacs/analysisdata/datamodule.h" #include "gromacs/analysisdata/paralleloptions.h" -#include "gromacs/utility/classhelpers.h" namespace gmx { @@ -90,7 +89,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; //! Smart pointer to manage an MockAnalysisDataModule object. diff --git a/src/gromacs/applied_forces/densityfitting/densityfittingforceprovider.h b/src/gromacs/applied_forces/densityfitting/densityfittingforceprovider.h index 98616ebd97..5896218156 100644 --- a/src/gromacs/applied_forces/densityfitting/densityfittingforceprovider.h +++ b/src/gromacs/applied_forces/densityfitting/densityfittingforceprovider.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -48,7 +48,6 @@ #include "gromacs/math/exponentialmovingaverage.h" #include "gromacs/mdspan/extensions.h" #include "gromacs/mdtypes/iforceprovider.h" -#include "gromacs/utility/classhelpers.h" enum class PbcType : int; @@ -147,7 +146,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/commandline/cmdlinehelpcontext.h b/src/gromacs/commandline/cmdlinehelpcontext.h index a2158603a9..59d82bedb3 100644 --- a/src/gromacs/commandline/cmdlinehelpcontext.h +++ b/src/gromacs/commandline/cmdlinehelpcontext.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2013,2014,2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2018,2019,2021, 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. @@ -43,6 +43,7 @@ #ifndef GMX_COMMANDLINE_CMDLINEHELPCONTEXT_H #define GMX_COMMANDLINE_CMDLINEHELPCONTEXT_H +#include #include #include "gromacs/onlinehelp/helpwritercontext.h" @@ -127,7 +128,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; GMX_DISALLOW_ASSIGN(CommandLineHelpContext); }; diff --git a/src/gromacs/commandline/cmdlinehelpmodule.cpp b/src/gromacs/commandline/cmdlinehelpmodule.cpp index cafbe45950..4518c54515 100644 --- a/src/gromacs/commandline/cmdlinehelpmodule.cpp +++ b/src/gromacs/commandline/cmdlinehelpmodule.cpp @@ -59,6 +59,7 @@ #include "gromacs/options/options.h" #include "gromacs/utility/arrayref.h" #include "gromacs/utility/baseversion.h" +#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/exceptions.h" #include "gromacs/utility/fileredirector.h" #include "gromacs/utility/gmxassert.h" diff --git a/src/gromacs/commandline/cmdlinehelpmodule.h b/src/gromacs/commandline/cmdlinehelpmodule.h index aebdf285f8..9b32961ca4 100644 --- a/src/gromacs/commandline/cmdlinehelpmodule.h +++ b/src/gromacs/commandline/cmdlinehelpmodule.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2012,2013,2014,2015,2018 by the GROMACS development team. - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -43,9 +43,10 @@ #ifndef GMX_COMMANDLINE_CMDLINEHELPMODULE_H #define GMX_COMMANDLINE_CMDLINEHELPMODULE_H +#include + #include "gromacs/commandline/cmdlinemodule.h" #include "gromacs/onlinehelp/ihelptopic.h" -#include "gromacs/utility/classhelpers.h" #include "cmdlinemodulemanager_impl.h" @@ -134,7 +135,7 @@ public: private: typedef CommandLineHelpModuleImpl Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/commandline/cmdlinehelpwriter.h b/src/gromacs/commandline/cmdlinehelpwriter.h index 051790201d..8f6ac37b27 100644 --- a/src/gromacs/commandline/cmdlinehelpwriter.h +++ b/src/gromacs/commandline/cmdlinehelpwriter.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010,2011,2012,2013,2014 by the GROMACS development team. - * Copyright (c) 2015,2017,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2015,2017,2019,2020,2021, 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. @@ -44,10 +44,9 @@ #ifndef GMX_COMMANDLINE_CMDLINEHELPWRITER_H #define GMX_COMMANDLINE_CMDLINEHELPWRITER_H +#include #include -#include "gromacs/utility/classhelpers.h" - namespace gmx { @@ -120,7 +119,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/commandline/cmdlinemodule.h b/src/gromacs/commandline/cmdlinemodule.h index f810043f5d..509993f55e 100644 --- a/src/gromacs/commandline/cmdlinemodule.h +++ b/src/gromacs/commandline/cmdlinemodule.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2012,2013,2014,2015,2019, by the GROMACS development team, led by + * Copyright (c) 2012,2013,2014,2015,2019,2021, 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. @@ -43,7 +43,7 @@ #ifndef GMX_COMMANDLINE_CMDLINEMODULE_H #define GMX_COMMANDLINE_CMDLINEMODULE_H -#include "gromacs/utility/classhelpers.h" +#include namespace gmx { @@ -78,7 +78,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \brief diff --git a/src/gromacs/commandline/cmdlinemodulemanager.h b/src/gromacs/commandline/cmdlinemodulemanager.h index 9575de0c4d..c1bca86559 100644 --- a/src/gromacs/commandline/cmdlinemodulemanager.h +++ b/src/gromacs/commandline/cmdlinemodulemanager.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team. - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -47,7 +47,6 @@ #include #include "gromacs/onlinehelp/ihelptopic.h" -#include "gromacs/utility/classhelpers.h" namespace gmx { @@ -344,7 +343,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \libinternal \brief diff --git a/src/gromacs/commandline/cmdlineparser.h b/src/gromacs/commandline/cmdlineparser.h index b2ecfe491f..ef49a13198 100644 --- a/src/gromacs/commandline/cmdlineparser.h +++ b/src/gromacs/commandline/cmdlineparser.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010,2011,2012,2013,2014 by the GROMACS development team. - * Copyright (c) 2016,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2016,2018,2019,2020,2021, 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. @@ -44,11 +44,10 @@ #ifndef GMX_COMMANDLINE_CMDLINEPARSER_H #define GMX_COMMANDLINE_CMDLINEPARSER_H +#include #include #include -#include "gromacs/utility/classhelpers.h" - namespace gmx { @@ -143,7 +142,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/commandline/cmdlineprogramcontext.h b/src/gromacs/commandline/cmdlineprogramcontext.h index 00a3699ddf..56323ddb43 100644 --- a/src/gromacs/commandline/cmdlineprogramcontext.h +++ b/src/gromacs/commandline/cmdlineprogramcontext.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2012,2013,2014,2015,2018 by the GROMACS development team. - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -53,7 +53,6 @@ #include #include -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/programcontext.h" namespace gmx @@ -213,7 +212,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/commandline/shellcompletions.h b/src/gromacs/commandline/shellcompletions.h index 28db8f9bd5..ef7d17d868 100644 --- a/src/gromacs/commandline/shellcompletions.h +++ b/src/gromacs/commandline/shellcompletions.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2019, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2019,2021, 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. @@ -44,11 +44,10 @@ #ifndef GMX_COMMANDLINE_SHELLCOMPLETIONS_H #define GMX_COMMANDLINE_SHELLCOMPLETIONS_H +#include #include #include -#include "gromacs/utility/classhelpers.h" - namespace gmx { @@ -87,7 +86,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/commandline/tests/cmdlinemodulemanagertest.h b/src/gromacs/commandline/tests/cmdlinemodulemanagertest.h index 493d1c0b33..e560eabb23 100644 --- a/src/gromacs/commandline/tests/cmdlinemodulemanagertest.h +++ b/src/gromacs/commandline/tests/cmdlinemodulemanagertest.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2012,2013,2014,2015,2018 by the GROMACS development team. - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -43,6 +43,7 @@ #ifndef GMX_COMMANDLINE_CMDLINEMODULEMANAGERTEST_H #define GMX_COMMANDLINE_CMDLINEMODULEMANAGERTEST_H +#include #include #include @@ -50,7 +51,6 @@ #include "gromacs/commandline/cmdlinehelpcontext.h" #include "gromacs/commandline/cmdlinemodule.h" #include "gromacs/commandline/cmdlineoptionsmodule.h" -#include "gromacs/utility/classhelpers.h" #include "testutils/stringtest.h" @@ -152,7 +152,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace test diff --git a/src/gromacs/coordinateio/outputadaptercontainer.h b/src/gromacs/coordinateio/outputadaptercontainer.h index f5d2fd67b2..19d6fca7bf 100644 --- a/src/gromacs/coordinateio/outputadaptercontainer.h +++ b/src/gromacs/coordinateio/outputadaptercontainer.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2021, 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. @@ -49,7 +49,6 @@ #include "gromacs/coordinateio/ioutputadapter.h" #include "gromacs/utility/arrayref.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/enumerationhelpers.h" namespace gmx diff --git a/src/gromacs/correlationfunctions/tests/correlationdataset.h b/src/gromacs/correlationfunctions/tests/correlationdataset.h index 3b49626e95..86cacc0371 100644 --- a/src/gromacs/correlationfunctions/tests/correlationdataset.h +++ b/src/gromacs/correlationfunctions/tests/correlationdataset.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2014,2019, by the GROMACS development team, led by + * Copyright (c) 2014,2019,2021, 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. @@ -42,6 +42,7 @@ #ifndef GMX_CORRELATIONDATASET_H #define GMX_CORRELATIONDATASET_H +#include #include #include diff --git a/src/gromacs/domdec/builder.h b/src/gromacs/domdec/builder.h index 01239c8058..0c6e764664 100644 --- a/src/gromacs/domdec/builder.h +++ b/src/gromacs/domdec/builder.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -46,9 +46,10 @@ #ifndef GMX_DOMDEC_BUILDER_H #define GMX_DOMDEC_BUILDER_H +#include + #include "gromacs/math/vectypes.h" #include "gromacs/utility/basedefinitions.h" -#include "gromacs/utility/classhelpers.h" struct gmx_domdec_t; struct gmx_mtop_t; @@ -91,7 +92,7 @@ public: private: class Impl; //! Pimpl to hide implementation details - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/domdec/gpuhaloexchange.h b/src/gromacs/domdec/gpuhaloexchange.h index be4a3abc8f..0f6089df2f 100644 --- a/src/gromacs/domdec/gpuhaloexchange.h +++ b/src/gromacs/domdec/gpuhaloexchange.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -42,10 +42,11 @@ #ifndef GMX_DOMDEC_GPUHALOEXCHANGE_H #define GMX_DOMDEC_GPUHALOEXCHANGE_H +#include + #include "gromacs/gpu_utils/devicebuffer_datatype.h" #include "gromacs/math/vectypes.h" #include "gromacs/utility/basedefinitions.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/gmxmpi.h" struct gmx_domdec_t; @@ -133,7 +134,7 @@ public: private: class Impl; - gmx::PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/domdec/localatomsetmanager.h b/src/gromacs/domdec/localatomsetmanager.h index bff8519745..497efd7ee6 100644 --- a/src/gromacs/domdec/localatomsetmanager.h +++ b/src/gromacs/domdec/localatomsetmanager.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020,2021, 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. @@ -47,7 +47,6 @@ #include #include "gromacs/utility/basedefinitions.h" -#include "gromacs/utility/classhelpers.h" class gmx_ga2la_t; @@ -102,7 +101,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/essentialdynamics/edsam.h b/src/gromacs/essentialdynamics/edsam.h index 502abde6be..e5d03a3f96 100644 --- a/src/gromacs/essentialdynamics/edsam.h +++ b/src/gromacs/essentialdynamics/edsam.h @@ -4,7 +4,7 @@ * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. * Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team. - * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020,2021, 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. @@ -53,7 +53,6 @@ #include "gromacs/math/vectypes.h" #include "gromacs/utility/basedefinitions.h" -#include "gromacs/utility/classhelpers.h" /*! \brief Abstract type for essential dynamics * @@ -88,7 +87,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; class MDLogger; } // namespace gmx diff --git a/src/gromacs/ewald/pme_coordinate_receiver_gpu.h b/src/gromacs/ewald/pme_coordinate_receiver_gpu.h index 144bd27fdd..0754b3a245 100644 --- a/src/gromacs/ewald/pme_coordinate_receiver_gpu.h +++ b/src/gromacs/ewald/pme_coordinate_receiver_gpu.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -42,9 +42,10 @@ #ifndef GMX_PMECOORDINATERECEIVERGPU_H #define GMX_PMECOORDINATERECEIVERGPU_H +#include + #include "gromacs/gpu_utils/devicebuffer_datatype.h" #include "gromacs/math/vectypes.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/gmxmpi.h" class DeviceStream; @@ -88,7 +89,7 @@ public: private: class Impl; - gmx::PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/ewald/pme_force_sender_gpu.h b/src/gromacs/ewald/pme_force_sender_gpu.h index df8e1873f8..bcc3b1e393 100644 --- a/src/gromacs/ewald/pme_force_sender_gpu.h +++ b/src/gromacs/ewald/pme_force_sender_gpu.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -42,8 +42,9 @@ #ifndef GMX_PMEFORCESENDERGPU_H #define GMX_PMEFORCESENDERGPU_H +#include + #include "gromacs/math/vectypes.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/gmxmpi.h" class DeviceStream; @@ -92,7 +93,7 @@ public: private: class Impl; - gmx::PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/ewald/pme_gpu_program_impl.h b/src/gromacs/ewald/pme_gpu_program_impl.h index 6255e46054..4bb3ec1a5b 100644 --- a/src/gromacs/ewald/pme_gpu_program_impl.h +++ b/src/gromacs/ewald/pme_gpu_program_impl.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020,2021, 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. @@ -44,6 +44,8 @@ #include "config.h" +#include + #include "gromacs/gpu_utils/device_context.h" #include "gromacs/utility/classhelpers.h" diff --git a/src/gromacs/ewald/pme_pp_comm_gpu.h b/src/gromacs/ewald/pme_pp_comm_gpu.h index a3e0239e58..3e56da9af3 100644 --- a/src/gromacs/ewald/pme_pp_comm_gpu.h +++ b/src/gromacs/ewald/pme_pp_comm_gpu.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -42,7 +42,8 @@ #ifndef GMX_PME_PP_COMM_GPU_H #define GMX_PME_PP_COMM_GPU_H -#include "gromacs/utility/classhelpers.h" +#include + #include "gromacs/utility/gmxmpi.h" class DeviceContext; @@ -107,7 +108,7 @@ public: private: class Impl; - gmx::PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/fileio/mrcdensitymap.h b/src/gromacs/fileio/mrcdensitymap.h index aec1d970ac..ec1c60a7a0 100644 --- a/src/gromacs/fileio/mrcdensitymap.h +++ b/src/gromacs/fileio/mrcdensitymap.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -41,12 +41,12 @@ * \inlibraryapi * \ingroup module_fileio */ +#include #include #include #include "gromacs/math/multidimarray.h" #include "gromacs/mdspan/extensions.h" -#include "gromacs/utility/classhelpers.h" namespace gmx { @@ -78,7 +78,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \libinternal \brief Read an mrc density map from a given file. @@ -118,7 +118,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \libinternal \brief Write an mrc/ccp4 file that contains float values. @@ -142,7 +142,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/gmxpreprocess/gpp_atomtype.h b/src/gromacs/gmxpreprocess/gpp_atomtype.h index 8b6c7f08de..43c51b3c1a 100644 --- a/src/gromacs/gmxpreprocess/gpp_atomtype.h +++ b/src/gromacs/gmxpreprocess/gpp_atomtype.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2011,2014,2015,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2011,2014,2015,2018,2019,2020,2021, 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. @@ -48,9 +48,9 @@ #include +#include #include -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/real.h" struct gmx_mtop_t; @@ -226,7 +226,7 @@ public: private: class Impl; //! Pimpl that holds the data. - gmx::PrivateImplPointer impl_; + std::unique_ptr impl_; }; #endif diff --git a/src/gromacs/gmxpreprocess/gpp_bond_atomtype.h b/src/gromacs/gmxpreprocess/gpp_bond_atomtype.h index 3c1220dc42..c9644afdae 100644 --- a/src/gromacs/gmxpreprocess/gpp_bond_atomtype.h +++ b/src/gromacs/gmxpreprocess/gpp_bond_atomtype.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2011,2014,2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2011,2014,2015,2018,2019,2021, 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. @@ -48,10 +48,9 @@ #include +#include #include -#include "gromacs/utility/classhelpers.h" - struct t_symtab; /*! \libinternal \brief @@ -106,7 +105,7 @@ public: private: class Impl; //! Pimpl that holds the data. - gmx::PrivateImplPointer impl_; + std::unique_ptr impl_; }; #endif diff --git a/src/gromacs/gpu_utils/device_context.h b/src/gromacs/gpu_utils/device_context.h index c4ab967b8f..d9f6150728 100644 --- a/src/gromacs/gpu_utils/device_context.h +++ b/src/gromacs/gpu_utils/device_context.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2020, by the GROMACS development team, led by + * Copyright (c) 2020,2021, 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. @@ -50,12 +50,15 @@ #include "config.h" +#include + #if GMX_GPU_OPENCL # include "gromacs/gpu_utils/gmxopencl.h" #endif #if GMX_GPU_SYCL # include "gromacs/gpu_utils/gmxsycl.h" #endif + #include "gromacs/gpu_utils/gpu_utils.h" #include "gromacs/hardware/device_management.h" #include "gromacs/utility/classhelpers.h" diff --git a/src/gromacs/gpu_utils/device_stream.h b/src/gromacs/gpu_utils/device_stream.h index d1aca30236..c93ffdce5f 100644 --- a/src/gromacs/gpu_utils/device_stream.h +++ b/src/gromacs/gpu_utils/device_stream.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2020, by the GROMACS development team, led by + * Copyright (c) 2020,2021, 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. @@ -48,6 +48,8 @@ #include "config.h" +#include + #if GMX_GPU_CUDA # include @@ -56,6 +58,7 @@ #elif GMX_GPU_SYCL # include "gromacs/gpu_utils/gmxsycl.h" #endif + #include "gromacs/utility/classhelpers.h" struct DeviceInformation; diff --git a/src/gromacs/gpu_utils/device_stream_manager.h b/src/gromacs/gpu_utils/device_stream_manager.h index 1f8366e743..036822d4e5 100644 --- a/src/gromacs/gpu_utils/device_stream_manager.h +++ b/src/gromacs/gpu_utils/device_stream_manager.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -46,10 +46,9 @@ #ifndef GMX_GPU_UTILS_GPUSTREAMMANAGER_H #define GMX_GPU_UTILS_GPUSTREAMMANAGER_H +#include #include -#include "gromacs/utility/classhelpers.h" - class DeviceContext; struct DeviceInformation; class DeviceStream; @@ -140,7 +139,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/imd/imd.h b/src/gromacs/imd/imd.h index 0ef075ae60..2b0ea59606 100644 --- a/src/gromacs/imd/imd.h +++ b/src/gromacs/imd/imd.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2014,2015,2016,2017,2018 by the GROMACS development team. - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -68,7 +68,6 @@ #include "gromacs/math/vectypes.h" #include "gromacs/utility/basedefinitions.h" -#include "gromacs/utility/classhelpers.h" struct gmx_domdec_t; struct gmx_enerdata_t; @@ -217,7 +216,7 @@ private: //! Implementation type. class Impl; //! Implementation object. - PrivateImplPointer impl_; + std::unique_ptr impl_; public: // Befriend the factory function. diff --git a/src/gromacs/listed_forces/gpubonded.h b/src/gromacs/listed_forces/gpubonded.h index 1cfeed429d..41ad20d42a 100644 --- a/src/gromacs/listed_forces/gpubonded.h +++ b/src/gromacs/listed_forces/gpubonded.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2014,2015,2016,2017,2018 by the GROMACS development team. - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -49,11 +49,12 @@ #ifndef GMX_LISTED_FORCES_GPUBONDED_H #define GMX_LISTED_FORCES_GPUBONDED_H +#include + #include "gromacs/gpu_utils/devicebuffer_datatype.h" #include "gromacs/math/vectypes.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/topology/idef.h" -#include "gromacs/utility/classhelpers.h" class DeviceContext; class DeviceStream; @@ -198,7 +199,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/math/coordinatetransformation.h b/src/gromacs/math/coordinatetransformation.h index 2451283b1f..0312878d5e 100644 --- a/src/gromacs/math/coordinatetransformation.h +++ b/src/gromacs/math/coordinatetransformation.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -43,8 +43,9 @@ #ifndef GMX_MATH_COORDINATETRANSFORMATION_H #define GMX_MATH_COORDINATETRANSFORMATION_H +#include + #include "gromacs/math/vectypes.h" -#include "gromacs/utility/classhelpers.h" #include "matrix.h" @@ -91,7 +92,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \libinternal \brief Transform coordinates in three dimensions by first @@ -134,7 +135,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \libinternal diff --git a/src/gromacs/math/densityfit.h b/src/gromacs/math/densityfit.h index 246d6610b0..0f33d62a01 100644 --- a/src/gromacs/math/densityfit.h +++ b/src/gromacs/math/densityfit.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -43,8 +43,9 @@ #ifndef GMX_MATH_DENSITYFIT_H #define GMX_MATH_DENSITYFIT_H +#include + #include "gromacs/mdspan/extensions.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/real.h" namespace gmx diff --git a/src/gromacs/math/densityfittingforce.h b/src/gromacs/math/densityfittingforce.h index 5c16dadc77..904ddea75f 100644 --- a/src/gromacs/math/densityfittingforce.h +++ b/src/gromacs/math/densityfittingforce.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2021, 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. @@ -41,11 +41,12 @@ * \ingroup module_math */ +#include + #include "gromacs/math/gausstransform.h" #include "gromacs/math/vectypes.h" #include "gromacs/mdspan/extensions.h" #include "gromacs/mdspan/mdspan.h" -#include "gromacs/utility/classhelpers.h" namespace gmx { @@ -105,7 +106,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/math/gausstransform.h b/src/gromacs/math/gausstransform.h index 40ef38d790..f00e43fd30 100644 --- a/src/gromacs/math/gausstransform.h +++ b/src/gromacs/math/gausstransform.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -43,13 +43,13 @@ #ifndef GMX_MATH_GAUSSTRANSFORM_H #define GMX_MATH_GAUSSTRANSFORM_H +#include #include #include "gromacs/math/multidimarray.h" #include "gromacs/math/vectypes.h" #include "gromacs/mdspan/extensions.h" #include "gromacs/mdspan/mdspan.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/real.h" namespace gmx @@ -121,7 +121,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \libinternal \brief Parameters for density spreading kernels. @@ -204,7 +204,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \internal \brief A 3-orthotope over integer intervals. diff --git a/src/gromacs/mdlib/constr.h b/src/gromacs/mdlib/constr.h index 1c9f41bd34..0c2dd9096f 100644 --- a/src/gromacs/mdlib/constr.h +++ b/src/gromacs/mdlib/constr.h @@ -4,7 +4,7 @@ * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. * Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team. - * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020,2021, 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. @@ -49,11 +49,12 @@ #include +#include + #include "gromacs/math/vectypes.h" #include "gromacs/topology/idef.h" #include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/gmxassert.h" #include "gromacs/utility/real.h" @@ -214,7 +215,7 @@ private: //! Implementation type. class Impl; //! Implementation object. - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \brief Generate a fatal error because of too many LINCS/SETTLE warnings. */ diff --git a/src/gromacs/mdlib/gpuforcereduction.h b/src/gromacs/mdlib/gpuforcereduction.h index 8aad5efaf3..157c4c7eca 100644 --- a/src/gromacs/mdlib/gpuforcereduction.h +++ b/src/gromacs/mdlib/gpuforcereduction.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2020, by the GROMACS development team, led by + * Copyright (c) 2020,2021, 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. @@ -43,11 +43,12 @@ #ifndef GMX_MDLIB_GPUFORCEREDUCTION_H #define GMX_MDLIB_GPUFORCEREDUCTION_H +#include + #include "gromacs/gpu_utils/devicebuffer_datatype.h" #include "gromacs/math/vectypes.h" #include "gromacs/timing/wallcycle.h" #include "gromacs/utility/arrayref.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/fixedcapacityvector.h" class GpuEventSynchronizer; @@ -120,7 +121,7 @@ public: private: class Impl; - gmx::PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/mdlib/leapfrog_gpu.h b/src/gromacs/mdlib/leapfrog_gpu.h index 7c76805d09..e802d4c8e3 100644 --- a/src/gromacs/mdlib/leapfrog_gpu.h +++ b/src/gromacs/mdlib/leapfrog_gpu.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -55,11 +55,12 @@ # include "gromacs/gpu_utils/gputraits_sycl.h" #endif +#include + #include "gromacs/gpu_utils/hostallocator.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/pbcutil/pbc_aiuc.h" #include "gromacs/utility/arrayref.h" -#include "gromacs/utility/classhelpers.h" class DeviceContext; class DeviceStream; diff --git a/src/gromacs/mdlib/lincs_gpu.cuh b/src/gromacs/mdlib/lincs_gpu.cuh index 7dfa2deb82..40433efcb7 100644 --- a/src/gromacs/mdlib/lincs_gpu.cuh +++ b/src/gromacs/mdlib/lincs_gpu.cuh @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -44,12 +44,13 @@ #ifndef GMX_MDLIB_LINCS_GPU_CUH #define GMX_MDLIB_LINCS_GPU_CUH +#include + #include "gromacs/gpu_utils/device_context.h" #include "gromacs/gpu_utils/device_stream.h" #include "gromacs/gpu_utils/gputraits.cuh" #include "gromacs/mdlib/constr.h" #include "gromacs/pbcutil/pbc_aiuc.h" -#include "gromacs/utility/classhelpers.h" class InteractionDefinitions; diff --git a/src/gromacs/mdlib/update.h b/src/gromacs/mdlib/update.h index 9c3d434ec9..207685f19e 100644 --- a/src/gromacs/mdlib/update.h +++ b/src/gromacs/mdlib/update.h @@ -4,7 +4,7 @@ * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. * Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team. - * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020,2021, 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. @@ -38,13 +38,14 @@ #ifndef GMX_MDLIB_UPDATE_H #define GMX_MDLIB_UPDATE_H +#include + #include "gromacs/math/paddedvector.h" #include "gromacs/math/vectypes.h" #include "gromacs/mdtypes/md_enums.h" #include "gromacs/timing/wallcycle.h" #include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/real.h" class ekinstate_t; @@ -208,7 +209,7 @@ private: //! Implementation type. class Impl; //! Implementation object. - PrivateImplPointer impl_; + std::unique_ptr impl_; }; }; // namespace gmx diff --git a/src/gromacs/mdlib/update_constrain_gpu.h b/src/gromacs/mdlib/update_constrain_gpu.h index 581851f9a2..3e77d8d3ce 100644 --- a/src/gromacs/mdlib/update_constrain_gpu.h +++ b/src/gromacs/mdlib/update_constrain_gpu.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -44,11 +44,12 @@ #ifndef GMX_MDLIB_UPDATE_CONSTRAIN_GPU_H #define GMX_MDLIB_UPDATE_CONSTRAIN_GPU_H +#include + #include "gromacs/gpu_utils/devicebuffer_datatype.h" #include "gromacs/mdtypes/group.h" #include "gromacs/timing/wallcycle.h" #include "gromacs/utility/arrayref.h" -#include "gromacs/utility/classhelpers.h" class DeviceContext; class DeviceStream; @@ -179,7 +180,7 @@ public: private: class Impl; - gmx::PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/mdlib/vsite.h b/src/gromacs/mdlib/vsite.h index ae7c932b5e..5fa0163d15 100644 --- a/src/gromacs/mdlib/vsite.h +++ b/src/gromacs/mdlib/vsite.h @@ -4,7 +4,7 @@ * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. * Copyright (c) 2013,2014,2015,2016,2017 The GROMACS development team. - * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020,2021, 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. @@ -52,7 +52,6 @@ #include "gromacs/topology/idef.h" #include "gromacs/utility/arrayref.h" #include "gromacs/utility/basedefinitions.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/real.h" struct gmx_domdec_t; @@ -138,7 +137,7 @@ private: //! Implementation type. class Impl; //! Implementation object. - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \brief Create positions of vsite atoms based for the local system diff --git a/src/gromacs/mdrun/mdmodules.h b/src/gromacs/mdrun/mdmodules.h index 6fabb761cd..5665701e33 100644 --- a/src/gromacs/mdrun/mdmodules.h +++ b/src/gromacs/mdrun/mdmodules.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2016,2017,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2016,2017,2018,2019,2020,2021, 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. @@ -43,7 +43,7 @@ #ifndef GMX_MDRUN_MDMODULES_H #define GMX_MDRUN_MDMODULES_H -#include "gromacs/utility/classhelpers.h" +#include struct t_inputrec; @@ -191,7 +191,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/mdtypes/forcebuffers.h b/src/gromacs/mdtypes/forcebuffers.h index fe7c8d5899..c23f02be81 100644 --- a/src/gromacs/mdtypes/forcebuffers.h +++ b/src/gromacs/mdtypes/forcebuffers.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2020, by the GROMACS development team, led by + * Copyright (c) 2020,2021, 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. @@ -47,11 +47,12 @@ #ifndef GMX_MDTYPES_FORCEBUFFERS_H #define GMX_MDTYPES_FORCEBUFFERS_H +#include + #include "gromacs/gpu_utils/hostallocator.h" #include "gromacs/math/arrayrefwithpadding.h" #include "gromacs/math/vectypes.h" #include "gromacs/utility/arrayref.h" -#include "gromacs/utility/classhelpers.h" namespace gmx { diff --git a/src/gromacs/mdtypes/iforceprovider.h b/src/gromacs/mdtypes/iforceprovider.h index f15de6adb7..748241617b 100644 --- a/src/gromacs/mdtypes/iforceprovider.h +++ b/src/gromacs/mdtypes/iforceprovider.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2016,2017,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2016,2017,2018,2019,2021, 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. @@ -46,9 +46,10 @@ #ifndef GMX_MDTYPES_IFORCEPROVIDER_H #define GMX_MDTYPES_IFORCEPROVIDER_H +#include + #include "gromacs/math/vec.h" #include "gromacs/utility/arrayref.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/gmxassert.h" struct gmx_enerdata_t; @@ -200,7 +201,7 @@ public: private: class Impl; - gmx::PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/mdtypes/state_propagator_data_gpu.h b/src/gromacs/mdtypes/state_propagator_data_gpu.h index 89e6d622ac..82b3378551 100644 --- a/src/gromacs/mdtypes/state_propagator_data_gpu.h +++ b/src/gromacs/mdtypes/state_propagator_data_gpu.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -50,6 +50,7 @@ #ifndef GMX_MDTYPES_STATE_PROPAGATOR_DATA_GPU_H #define GMX_MDTYPES_STATE_PROPAGATOR_DATA_GPU_H +#include #include #include "gromacs/gpu_utils/devicebuffer_datatype.h" @@ -326,7 +327,7 @@ public: private: class Impl; - gmx::PrivateImplPointer impl_; + std::unique_ptr impl_; GMX_DISALLOW_COPY_AND_ASSIGN(StatePropagatorDataGpu); }; diff --git a/src/gromacs/mdtypes/state_propagator_data_gpu_impl.h b/src/gromacs/mdtypes/state_propagator_data_gpu_impl.h index 17737b5477..84035e4f91 100644 --- a/src/gromacs/mdtypes/state_propagator_data_gpu_impl.h +++ b/src/gromacs/mdtypes/state_propagator_data_gpu_impl.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -47,6 +47,8 @@ #include "config.h" +#include + #include "gromacs/gpu_utils/devicebuffer.h" #if GMX_GPU_CUDA # include "gromacs/gpu_utils/gpueventsynchronizer.cuh" @@ -55,9 +57,9 @@ #elif GMX_GPU_SYCL # include "gromacs/gpu_utils/gpueventsynchronizer_sycl.h" #endif + #include "gromacs/math/vectypes.h" #include "gromacs/mdtypes/state_propagator_data_gpu.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/enumerationhelpers.h" struct gmx_wallcycle; diff --git a/src/gromacs/onlinehelp/helpformat.h b/src/gromacs/onlinehelp/helpformat.h index 8ce680719b..c5cc667404 100644 --- a/src/gromacs/onlinehelp/helpformat.h +++ b/src/gromacs/onlinehelp/helpformat.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2012,2013,2014,2015,2019, by the GROMACS development team, led by + * Copyright (c) 2012,2013,2014,2015,2019,2021, 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. @@ -43,10 +43,9 @@ #ifndef GMX_ONLINEHELP_HELPFORMAT_H #define GMX_ONLINEHELP_HELPFORMAT_H +#include #include -#include "gromacs/utility/classhelpers.h" - namespace gmx { @@ -227,7 +226,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/onlinehelp/helpmanager.h b/src/gromacs/onlinehelp/helpmanager.h index 7c68743224..03a4ec37cf 100644 --- a/src/gromacs/onlinehelp/helpmanager.h +++ b/src/gromacs/onlinehelp/helpmanager.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2012,2014,2015,2019, by the GROMACS development team, led by + * Copyright (c) 2012,2014,2015,2019,2021, 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. @@ -43,10 +43,9 @@ #ifndef GMX_ONLINEHELP_HELPMANAGER_H #define GMX_ONLINEHELP_HELPMANAGER_H +#include #include -#include "gromacs/utility/classhelpers.h" - namespace gmx { @@ -98,7 +97,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/onlinehelp/helptopic.h b/src/gromacs/onlinehelp/helptopic.h index 044a15c0d0..875c1c0bed 100644 --- a/src/gromacs/onlinehelp/helptopic.h +++ b/src/gromacs/onlinehelp/helptopic.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2012,2014,2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2012,2014,2015,2018,2019,2021, 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. @@ -46,7 +46,6 @@ #include #include "gromacs/onlinehelp/ihelptopic.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/stringutil.h" namespace gmx @@ -175,7 +174,7 @@ protected: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \cond libapi */ diff --git a/src/gromacs/onlinehelp/helpwritercontext.cpp b/src/gromacs/onlinehelp/helpwritercontext.cpp index 68f5ab8edd..940d0a9440 100644 --- a/src/gromacs/onlinehelp/helpwritercontext.cpp +++ b/src/gromacs/onlinehelp/helpwritercontext.cpp @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team. - * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2017,2018,2019,2020,2021, 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. @@ -52,6 +52,7 @@ #include #include "gromacs/onlinehelp/helpformat.h" +#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/exceptions.h" #include "gromacs/utility/gmxassert.h" #include "gromacs/utility/programcontext.h" diff --git a/src/gromacs/onlinehelp/helpwritercontext.h b/src/gromacs/onlinehelp/helpwritercontext.h index 4ce7b4fff6..cf16c066cf 100644 --- a/src/gromacs/onlinehelp/helpwritercontext.h +++ b/src/gromacs/onlinehelp/helpwritercontext.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2012,2013,2014,2015,2019, by the GROMACS development team, led by + * Copyright (c) 2012,2013,2014,2015,2019,2021, 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. @@ -43,6 +43,7 @@ #ifndef GMX_ONLINEHELP_HELPWRITERCONTEXT_H #define GMX_ONLINEHELP_HELPWRITERCONTEXT_H +#include #include #include @@ -106,7 +107,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; //! Allows the context to use the links. friend class HelpWriterContext; @@ -297,7 +298,7 @@ private: */ explicit HelpWriterContext(Impl* impl); - PrivateImplPointer impl_; + std::unique_ptr impl_; GMX_DISALLOW_ASSIGN(HelpWriterContext); }; diff --git a/src/gromacs/onlinehelp/rstparser.h b/src/gromacs/onlinehelp/rstparser.h index 52eda481e1..3ac9998433 100644 --- a/src/gromacs/onlinehelp/rstparser.h +++ b/src/gromacs/onlinehelp/rstparser.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2015,2018,2019,2021, 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. @@ -42,6 +42,7 @@ #ifndef GMX_ONLINEHELP_RSTPARSER_H #define GMX_ONLINEHELP_RSTPARSER_H +#include #include #include "gromacs/utility/classhelpers.h" diff --git a/src/gromacs/options/abstractoption.h b/src/gromacs/options/abstractoption.h index 06883d6db9..fa34c5dae4 100644 --- a/src/gromacs/options/abstractoption.h +++ b/src/gromacs/options/abstractoption.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010-2017, The GROMACS development team. - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2021, 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. @@ -55,6 +55,7 @@ #ifndef GMX_OPTIONS_ABSTRACTOPTION_H #define GMX_OPTIONS_ABSTRACTOPTION_H +#include #include #include diff --git a/src/gromacs/options/abstractoptionstorage.h b/src/gromacs/options/abstractoptionstorage.h index f6dd415181..b99946639f 100644 --- a/src/gromacs/options/abstractoptionstorage.h +++ b/src/gromacs/options/abstractoptionstorage.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010,2011,2012,2014,2015 by the GROMACS development team. - * Copyright (c) 2016,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2016,2019,2020,2021, 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. @@ -44,6 +44,7 @@ #ifndef GMX_OPTIONS_ABSTRACTOPTIONSTORAGE_H #define GMX_OPTIONS_ABSTRACTOPTIONSTORAGE_H +#include #include #include diff --git a/src/gromacs/options/abstractsection.h b/src/gromacs/options/abstractsection.h index 975176954d..d1f3f98ac2 100644 --- a/src/gromacs/options/abstractsection.h +++ b/src/gromacs/options/abstractsection.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2016,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2016,2018,2019,2021, 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. @@ -46,6 +46,8 @@ #ifndef GMX_OPTIONS_ABSTRACTSECTION_H #define GMX_OPTIONS_ABSTRACTSECTION_H +#include + #include "gromacs/options/ioptionscontainerwithsections.h" #include "gromacs/utility/classhelpers.h" #include "gromacs/utility/gmxassert.h" diff --git a/src/gromacs/options/filenameoptionmanager.h b/src/gromacs/options/filenameoptionmanager.h index 3fe2f075e9..642426ca9d 100644 --- a/src/gromacs/options/filenameoptionmanager.h +++ b/src/gromacs/options/filenameoptionmanager.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2014,2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2014,2015,2018,2019,2021, 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. @@ -43,10 +43,10 @@ #ifndef GMX_OPTIONS_FILENAMEOPTIONMANAGER_H #define GMX_OPTIONS_FILENAMEOPTIONMANAGER_H +#include #include #include "gromacs/options/options.h" -#include "gromacs/utility/classhelpers.h" namespace gmx { @@ -171,7 +171,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/options/optionmanagercontainer.h b/src/gromacs/options/optionmanagercontainer.h index 0914a10173..cfd343bddc 100644 --- a/src/gromacs/options/optionmanagercontainer.h +++ b/src/gromacs/options/optionmanagercontainer.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2014,2015,2017,2019, by the GROMACS development team, led by + * Copyright (c) 2014,2015,2017,2019,2021, 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. @@ -43,6 +43,7 @@ #ifndef GMX_OPTIONS_OPTIONMANAGERCONTAINER_H #define GMX_OPTIONS_OPTIONMANAGERCONTAINER_H +#include #include #include "gromacs/utility/classhelpers.h" diff --git a/src/gromacs/options/options.h b/src/gromacs/options/options.h index 69dcb4c525..b2ef29668f 100644 --- a/src/gromacs/options/options.h +++ b/src/gromacs/options/options.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010,2011,2012,2014,2015 by the GROMACS development team. - * Copyright (c) 2016,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2016,2018,2019,2020,2021, 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. @@ -47,10 +47,10 @@ #ifndef GMX_OPTIONS_OPTIONS_H #define GMX_OPTIONS_OPTIONS_H +#include #include #include "gromacs/options/ioptionscontainerwithsections.h" -#include "gromacs/utility/classhelpers.h" namespace gmx { @@ -159,7 +159,7 @@ private: // From IOptionsContainer OptionInfo* addOptionImpl(const AbstractOption& settings) override; - PrivateImplPointer impl_; + std::unique_ptr impl_; //! Needed to be able to extend the interface of this object. friend class OptionsAssigner; diff --git a/src/gromacs/options/options_impl.h b/src/gromacs/options/options_impl.h index b72219faa0..cd0c3574d2 100644 --- a/src/gromacs/options/options_impl.h +++ b/src/gromacs/options/options_impl.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010-2018, The GROMACS development team. - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2021, 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. @@ -56,6 +56,7 @@ #include "gromacs/options/optionmanagercontainer.h" #include "gromacs/options/options.h" #include "gromacs/options/optionsection.h" +#include "gromacs/utility/classhelpers.h" #include "isectionstorage.h" diff --git a/src/gromacs/options/optionsassigner.h b/src/gromacs/options/optionsassigner.h index 3892140566..0ab59fe541 100644 --- a/src/gromacs/options/optionsassigner.h +++ b/src/gromacs/options/optionsassigner.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010,2011,2012,2013,2014 by the GROMACS development team. - * Copyright (c) 2015,2016,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2015,2016,2019,2020,2021, 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. @@ -46,10 +46,9 @@ #ifndef GMX_OPTIONS_OPTIONSASSIGNER_H #define GMX_OPTIONS_OPTIONSASSIGNER_H +#include #include -#include "gromacs/utility/classhelpers.h" - namespace gmx { @@ -207,7 +206,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/options/optionsection.h b/src/gromacs/options/optionsection.h index 0af38875c7..e7f6ed9a65 100644 --- a/src/gromacs/options/optionsection.h +++ b/src/gromacs/options/optionsection.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2016,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2016,2018,2019,2021, 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. @@ -43,7 +43,7 @@ #ifndef GMX_OPTIONS_OPTIONSECTION_H #define GMX_OPTIONS_OPTIONSECTION_H -#include "gromacs/utility/classhelpers.h" +#include #include "abstractsection.h" diff --git a/src/gromacs/options/optionsvisitor.h b/src/gromacs/options/optionsvisitor.h index 5a47d077c2..64b888a262 100644 --- a/src/gromacs/options/optionsvisitor.h +++ b/src/gromacs/options/optionsvisitor.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010,2011,2012,2014,2016 by the GROMACS development team. - * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2017,2018,2019,2020,2021, 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. @@ -46,6 +46,7 @@ #include +#include #include #include "gromacs/options/abstractoption.h" diff --git a/src/gromacs/options/timeunitmanager.h b/src/gromacs/options/timeunitmanager.h index 222771b3e2..ad62d206cc 100644 --- a/src/gromacs/options/timeunitmanager.h +++ b/src/gromacs/options/timeunitmanager.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2012,2014,2015,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2012,2014,2015,2018,2019,2020,2021, 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. @@ -43,6 +43,8 @@ #ifndef GMX_OPTIONS_TIMEUNITMANAGER_H #define GMX_OPTIONS_TIMEUNITMANAGER_H +#include + #include "gromacs/fileio/oenv.h" #include "gromacs/options/ioptionsbehavior.h" #include "gromacs/utility/classhelpers.h" diff --git a/src/gromacs/pbcutil/com.h b/src/gromacs/pbcutil/com.h index 870db8ca52..e2456e30e3 100644 --- a/src/gromacs/pbcutil/com.h +++ b/src/gromacs/pbcutil/com.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -44,10 +44,10 @@ #define GMX_PBCUTIL_COM_H #include +#include #include "gromacs/math/vec.h" #include "gromacs/utility/arrayref.h" -#include "gromacs/utility/classhelpers.h" #include "pbcenums.h" diff --git a/src/gromacs/pulling/pull_rotation.h b/src/gromacs/pulling/pull_rotation.h index b8af04c51e..56cb190755 100644 --- a/src/gromacs/pulling/pull_rotation.h +++ b/src/gromacs/pulling/pull_rotation.h @@ -4,7 +4,7 @@ * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2008, The GROMACS development team. * Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team. - * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020,2021, 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. @@ -55,7 +55,6 @@ #include "gromacs/math/vectypes.h" #include "gromacs/utility/basedefinitions.h" -#include "gromacs/utility/classhelpers.h" struct gmx_domdec_t; struct gmx_enfrot; @@ -88,7 +87,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/random/exponentialdistribution.h b/src/gromacs/random/exponentialdistribution.h index 7df6fa1d34..f8cd205d58 100644 --- a/src/gromacs/random/exponentialdistribution.h +++ b/src/gromacs/random/exponentialdistribution.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2016,2019, by the GROMACS development team, led by + * Copyright (c) 2015,2016,2019,2021, 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. @@ -52,6 +52,7 @@ #include #include +#include #include "gromacs/random/uniformrealdistribution.h" #include "gromacs/utility/classhelpers.h" diff --git a/src/gromacs/random/gammadistribution.h b/src/gromacs/random/gammadistribution.h index 24e7fd3b09..68f3f88bdb 100644 --- a/src/gromacs/random/gammadistribution.h +++ b/src/gromacs/random/gammadistribution.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2016,2019, by the GROMACS development team, led by + * Copyright (c) 2015,2016,2019,2021, 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. @@ -55,6 +55,7 @@ #include #include +#include #include "gromacs/random/exponentialdistribution.h" #include "gromacs/random/uniformrealdistribution.h" diff --git a/src/gromacs/random/normaldistribution.h b/src/gromacs/random/normaldistribution.h index 5242e97d1c..13bcfb1636 100644 --- a/src/gromacs/random/normaldistribution.h +++ b/src/gromacs/random/normaldistribution.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2016,2019, by the GROMACS development team, led by + * Copyright (c) 2015,2016,2019,2021, 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. @@ -51,6 +51,7 @@ #include #include +#include #include "gromacs/random/uniformrealdistribution.h" #include "gromacs/utility/classhelpers.h" diff --git a/src/gromacs/random/tabulatednormaldistribution.h b/src/gromacs/random/tabulatednormaldistribution.h index 29b16faffd..f8217226fa 100644 --- a/src/gromacs/random/tabulatednormaldistribution.h +++ b/src/gromacs/random/tabulatednormaldistribution.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2016,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2015,2016,2018,2019,2021, 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. @@ -50,6 +50,7 @@ #include #include +#include #include "gromacs/math/functions.h" #include "gromacs/math/utilities.h" diff --git a/src/gromacs/random/threefry.h b/src/gromacs/random/threefry.h index 4946a3092e..9ff38a7aa2 100644 --- a/src/gromacs/random/threefry.h +++ b/src/gromacs/random/threefry.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2016,2017,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2015,2016,2017,2018,2019,2021, 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. @@ -46,6 +46,7 @@ #include #include +#include #include "gromacs/math/functions.h" #include "gromacs/random/seed.h" diff --git a/src/gromacs/random/uniformintdistribution.h b/src/gromacs/random/uniformintdistribution.h index bde17a2dae..468902646c 100644 --- a/src/gromacs/random/uniformintdistribution.h +++ b/src/gromacs/random/uniformintdistribution.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2016,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2015,2016,2018,2019,2021, 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. @@ -49,6 +49,7 @@ #define GMX_RANDOM_UNIFORMINTDISTRIBUTION_H #include +#include #include "gromacs/math/functions.h" #include "gromacs/utility/basedefinitions.h" diff --git a/src/gromacs/random/uniformrealdistribution.h b/src/gromacs/random/uniformrealdistribution.h index 17a1e9240f..7c7c387203 100644 --- a/src/gromacs/random/uniformrealdistribution.h +++ b/src/gromacs/random/uniformrealdistribution.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2016,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2015,2016,2018,2019,2020,2021, 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. @@ -52,9 +52,11 @@ #include #include +#include #include #include "gromacs/math/functions.h" + #include "gromacs/utility/basedefinitions.h" #include "gromacs/utility/classhelpers.h" #include "gromacs/utility/gmxassert.h" diff --git a/src/gromacs/selection/nbsearch.cpp b/src/gromacs/selection/nbsearch.cpp index c1d26ed296..da36743f82 100644 --- a/src/gromacs/selection/nbsearch.cpp +++ b/src/gromacs/selection/nbsearch.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 2009,2010,2011,2012,2013 by the GROMACS development team. * Copyright (c) 2014,2015,2016,2017,2018 by the GROMACS development team. - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -65,6 +65,7 @@ #include "gromacs/math/vec.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/utility/arrayref.h" +#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/exceptions.h" #include "gromacs/utility/gmxassert.h" #include "gromacs/utility/listoflists.h" diff --git a/src/gromacs/selection/nbsearch.h b/src/gromacs/selection/nbsearch.h index 7066cafd12..97edcc5731 100644 --- a/src/gromacs/selection/nbsearch.h +++ b/src/gromacs/selection/nbsearch.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2009-2018, The GROMACS development team. - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2021, 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. @@ -55,7 +55,6 @@ #include "gromacs/math/vec.h" #include "gromacs/math/vectypes.h" #include "gromacs/utility/arrayref.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/gmxassert.h" #include "gromacs/utility/real.h" @@ -317,7 +316,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \brief diff --git a/src/gromacs/selection/poscalc.h b/src/gromacs/selection/poscalc.h index 224a4be226..f17c859c28 100644 --- a/src/gromacs/selection/poscalc.h +++ b/src/gromacs/selection/poscalc.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2009-2016, The GROMACS development team. - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2021, 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. @@ -55,7 +55,7 @@ #include -#include "gromacs/utility/classhelpers.h" +#include /*! \name Flags for position calculation. * \anchor poscalc_flags @@ -340,7 +340,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; /*! \brief * Needed to access the implementation class from the C code. diff --git a/src/gromacs/selection/selection.h b/src/gromacs/selection/selection.h index 733e37628a..7119ea3fff 100644 --- a/src/gromacs/selection/selection.h +++ b/src/gromacs/selection/selection.h @@ -3,7 +3,7 @@ * * Copyright (c) 2009,2010,2011,2012,2013 by the GROMACS development team. * Copyright (c) 2014,2015,2016,2017,2018 by the GROMACS development team. - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -45,6 +45,7 @@ #ifndef GMX_SELECTION_SELECTION_H #define GMX_SELECTION_SELECTION_H +#include #include #include diff --git a/src/gromacs/selection/selectioncollection.h b/src/gromacs/selection/selectioncollection.h index a168aaa1b2..7e3c135607 100644 --- a/src/gromacs/selection/selectioncollection.h +++ b/src/gromacs/selection/selectioncollection.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010,2011,2012,2013,2014 by the GROMACS development team. - * Copyright (c) 2015,2016,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2015,2016,2019,2020,2021, 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. @@ -46,11 +46,11 @@ #include +#include #include #include #include "gromacs/selection/selection.h" // For gmx::SelectionList -#include "gromacs/utility/classhelpers.h" struct gmx_ana_indexgrps_t; struct gmx_mtop_t; @@ -414,7 +414,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; // Needed for the compiler to freely modify the collection. friend void compileSelection(SelectionCollection* coll); diff --git a/src/gromacs/selection/selectionoptionbehavior.h b/src/gromacs/selection/selectionoptionbehavior.h index 16f1a572c2..cc26a90726 100644 --- a/src/gromacs/selection/selectionoptionbehavior.h +++ b/src/gromacs/selection/selectionoptionbehavior.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2016,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2015,2016,2018,2019,2021, 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. @@ -43,10 +43,10 @@ #ifndef GMX_SELECTION_SELECTIONOPTIONBEHAVIOR_H #define GMX_SELECTION_SELECTIONOPTIONBEHAVIOR_H +#include #include #include "gromacs/options/ioptionsbehavior.h" -#include "gromacs/utility/classhelpers.h" struct gmx_mtop_t; @@ -173,7 +173,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; diff --git a/src/gromacs/selection/selectionoptionmanager.h b/src/gromacs/selection/selectionoptionmanager.h index 96baec9eff..2bdcc5fe0e 100644 --- a/src/gromacs/selection/selectionoptionmanager.h +++ b/src/gromacs/selection/selectionoptionmanager.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2012,2013,2014,2015,2018 by the GROMACS development team. - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -44,10 +44,10 @@ #ifndef GMX_SELECTION_SELECTIONOPTIONMANAGER_H #define GMX_SELECTION_SELECTIONOPTIONMANAGER_H +#include #include #include "gromacs/options/options.h" -#include "gromacs/utility/classhelpers.h" namespace gmx { @@ -216,7 +216,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; /*! \brief * Needed for handling delayed selection parsing requests. diff --git a/src/gromacs/selection/selhelp.cpp b/src/gromacs/selection/selhelp.cpp index ec96ec50fd..9e6362b579 100644 --- a/src/gromacs/selection/selhelp.cpp +++ b/src/gromacs/selection/selhelp.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 2009,2010,2011,2012,2013 by the GROMACS development team. * Copyright (c) 2014,2015,2016,2017,2018 by the GROMACS development team. - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -53,6 +53,7 @@ #include "gromacs/onlinehelp/helptopic.h" #include "gromacs/onlinehelp/helpwritercontext.h" +#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/exceptions.h" #include "gromacs/utility/gmxassert.h" #include "gromacs/utility/stringutil.h" diff --git a/src/gromacs/selection/symrec.h b/src/gromacs/selection/symrec.h index 5feeeac876..21e6fbc684 100644 --- a/src/gromacs/selection/symrec.h +++ b/src/gromacs/selection/symrec.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2009,2010,2011,2012,2013 by the GROMACS development team. - * Copyright (c) 2014,2015,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2014,2015,2019,2020,2021, 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. @@ -46,12 +46,11 @@ #define GMX_SELECTION_SYMREC_H #include +#include #include #include -#include "gromacs/utility/classhelpers.h" - #include "selelem.h" struct gmx_ana_selmethod_t; @@ -118,7 +117,7 @@ private: */ explicit SelectionParserSymbol(Impl* impl); - PrivateImplPointer impl_; + std::unique_ptr impl_; /*! \brief * Needed to call the constructor and for other initialization. @@ -179,7 +178,7 @@ private: */ explicit SelectionParserSymbolIterator(Impl* impl); - PrivateImplPointer impl_; + std::unique_ptr impl_; /*! \brief * Needed to access the constructor. @@ -260,7 +259,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; /*! \brief * Needed to access implementation types. diff --git a/src/gromacs/simd/simd.h b/src/gromacs/simd/simd.h index 55fd89f55f..3e562079f4 100644 --- a/src/gromacs/simd/simd.h +++ b/src/gromacs/simd/simd.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team. - * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020,2021, 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. @@ -77,10 +77,10 @@ #include #include +#include #include #include "gromacs/utility/basedefinitions.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/real.h" //! \cond libapi diff --git a/src/gromacs/tables/cubicsplinetable.h b/src/gromacs/tables/cubicsplinetable.h index 4cbc4d330c..01bca6c60c 100644 --- a/src/gromacs/tables/cubicsplinetable.h +++ b/src/gromacs/tables/cubicsplinetable.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2016,2017,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2016,2017,2018,2019,2020,2021, 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. @@ -45,6 +45,7 @@ #define GMX_TABLES_CUBICSPLINETABLE_H #include +#include #include #include "gromacs/simd/simd.h" diff --git a/src/gromacs/tables/quadraticsplinetable.h b/src/gromacs/tables/quadraticsplinetable.h index 4a494dd5ca..776ee426a0 100644 --- a/src/gromacs/tables/quadraticsplinetable.h +++ b/src/gromacs/tables/quadraticsplinetable.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2016,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2016,2019,2020,2021, 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. @@ -59,6 +59,7 @@ #include #include +#include #include #include "gromacs/simd/simd.h" diff --git a/src/gromacs/topology/atomprop.h b/src/gromacs/topology/atomprop.h index 7e112b07ae..5cea3899f0 100644 --- a/src/gromacs/topology/atomprop.h +++ b/src/gromacs/topology/atomprop.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2010,2014,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2010,2014,2018,2019,2021, 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. @@ -37,10 +37,10 @@ #ifndef GMX_TOPOLOGY_ATOMPROP_H #define GMX_TOPOLOGY_ATOMPROP_H +#include #include #include "gromacs/utility/basedefinitions.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/real.h" enum @@ -115,7 +115,7 @@ private: //! Implementation pointer. class Impl; - gmx::PrivateImplPointer impl_; + std::unique_ptr impl_; }; #endif diff --git a/src/gromacs/topology/atomsbuilder.h b/src/gromacs/topology/atomsbuilder.h index e1616ee318..2212203b45 100644 --- a/src/gromacs/topology/atomsbuilder.h +++ b/src/gromacs/topology/atomsbuilder.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2014,2015,2016,2019, by the GROMACS development team, led by + * Copyright (c) 2014,2015,2016,2019,2021, 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. @@ -42,9 +42,11 @@ #ifndef GMX_TOPOLOGY_ATOMSBUILDER_H #define GMX_TOPOLOGY_ATOMSBUILDER_H +#include #include #include "gromacs/math/vectypes.h" + #include "gromacs/utility/classhelpers.h" #include "gromacs/utility/real.h" diff --git a/src/gromacs/topology/residuetypes.h b/src/gromacs/topology/residuetypes.h index 104101d4b7..7cd5beba12 100644 --- a/src/gromacs/topology/residuetypes.h +++ b/src/gromacs/topology/residuetypes.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2010,2014,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2010,2014,2018,2019,2020,2021, 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. @@ -35,11 +35,11 @@ #ifndef GMX_TOPOLOGY_RESIDUETYPES_H #define GMX_TOPOLOGY_RESIDUETYPES_H +#include #include #include #include "gromacs/utility/basedefinitions.h" -#include "gromacs/utility/classhelpers.h" struct ResidueTypeEntry; @@ -111,7 +111,7 @@ private: //! Implementation pointer. class Impl; - gmx::PrivateImplPointer impl_; + std::unique_ptr impl_; }; #endif diff --git a/src/gromacs/trajectoryanalysis/analysismodule.h b/src/gromacs/trajectoryanalysis/analysismodule.h index 7462f19bad..76da72fea8 100644 --- a/src/gromacs/trajectoryanalysis/analysismodule.h +++ b/src/gromacs/trajectoryanalysis/analysismodule.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010,2011,2012,2013,2014 by the GROMACS development team. - * Copyright (c) 2015,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2015,2018,2019,2020,2021, 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. @@ -50,7 +50,6 @@ #include #include "gromacs/selection/selection.h" // For gmx::SelectionList -#include "gromacs/utility/classhelpers.h" struct t_pbc; struct t_trxframe; @@ -175,7 +174,7 @@ protected: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; //! Smart pointer to manage a TrajectoryAnalysisModuleData object. @@ -483,7 +482,7 @@ protected: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; /*! \brief * Needed to access the registered analysis data sets. diff --git a/src/gromacs/trajectoryanalysis/analysissettings.h b/src/gromacs/trajectoryanalysis/analysissettings.h index e3ac3799a8..7e7d47e591 100644 --- a/src/gromacs/trajectoryanalysis/analysissettings.h +++ b/src/gromacs/trajectoryanalysis/analysissettings.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010-2018, The GROMACS development team. - * Copyright (c) 2019, by the GROMACS development team, led by + * Copyright (c) 2019,2021, 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. @@ -44,10 +44,10 @@ #ifndef GMX_TRAJECTORYANALYSIS_ANALYSISSETTINGS_H #define GMX_TRAJECTORYANALYSIS_ANALYSISSETTINGS_H +#include #include #include "gromacs/options/timeunitmanager.h" -#include "gromacs/utility/classhelpers.h" namespace gmx { @@ -238,7 +238,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; friend class TrajectoryAnalysisRunnerCommon; }; diff --git a/src/gromacs/trajectoryanalysis/modules/angle.cpp b/src/gromacs/trajectoryanalysis/modules/angle.cpp index fb1039a43a..b0a215cf65 100644 --- a/src/gromacs/trajectoryanalysis/modules/angle.cpp +++ b/src/gromacs/trajectoryanalysis/modules/angle.cpp @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2011-2018, The GROMACS development team. - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -64,6 +64,7 @@ #include "gromacs/trajectory/trajectoryframe.h" #include "gromacs/trajectoryanalysis/analysissettings.h" #include "gromacs/utility/arrayref.h" +#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/enumerationhelpers.h" #include "gromacs/utility/exceptions.h" #include "gromacs/utility/gmxassert.h" diff --git a/src/gromacs/trajectoryanalysis/modules/surfacearea.h b/src/gromacs/trajectoryanalysis/modules/surfacearea.h index cdfab3e7e2..8129d3c1e1 100644 --- a/src/gromacs/trajectoryanalysis/modules/surfacearea.h +++ b/src/gromacs/trajectoryanalysis/modules/surfacearea.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2017,2019, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2017,2019,2021, 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. @@ -37,9 +37,10 @@ #ifndef GMX_TRAJECTORYANALYSIS_SURFACEAREA_H #define GMX_TRAJECTORYANALYSIS_SURFACEAREA_H +#include + #include "gromacs/math/vectypes.h" #include "gromacs/utility/arrayref.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/real.h" struct t_pbc; @@ -181,7 +182,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/trajectoryanalysis/runnercommon.h b/src/gromacs/trajectoryanalysis/runnercommon.h index beb63214aa..91d936df93 100644 --- a/src/gromacs/trajectoryanalysis/runnercommon.h +++ b/src/gromacs/trajectoryanalysis/runnercommon.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010,2011,2012,2013,2014 by the GROMACS development team. - * Copyright (c) 2015,2016,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2015,2016,2019,2020,2021, 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. @@ -43,7 +43,7 @@ #ifndef GMX_TRAJECTORYANALYSIS_RUNNERCOMMON_H #define GMX_TRAJECTORYANALYSIS_RUNNERCOMMON_H -#include "gromacs/utility/classhelpers.h" +#include struct t_trxframe; @@ -129,7 +129,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/trajectoryanalysis/tests/moduletest.h b/src/gromacs/trajectoryanalysis/tests/moduletest.h index 6791b70ce0..dc3a0a6449 100644 --- a/src/gromacs/trajectoryanalysis/tests/moduletest.h +++ b/src/gromacs/trajectoryanalysis/tests/moduletest.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2012,2013,2014,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2012,2013,2014,2018,2019,2021, 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. @@ -42,10 +42,11 @@ #ifndef GMX_TRAJECTORYANALYSIS_TESTS_MODULETEST_H #define GMX_TRAJECTORYANALYSIS_TESTS_MODULETEST_H +#include + #include #include "gromacs/trajectoryanalysis/analysismodule.h" -#include "gromacs/utility/classhelpers.h" #include "testutils/cmdlinetest.h" @@ -180,7 +181,7 @@ protected: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \internal \brief diff --git a/src/gromacs/utility.h b/src/gromacs/utility.h index 99bfd43eea..f04c1c515e 100644 --- a/src/gromacs/utility.h +++ b/src/gromacs/utility.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010-2018, The GROMACS development team. - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -111,10 +111,9 @@ * compiler-specific attributes, and ::GMX_UNUSED_VALUE and ::GMX_IGNORE_RETURN_VALUE * for handling warnings about unused values. * - * The header classhelpers.h implements a gmx::PrivateImplPointer template for easily - * writing classes that use the private implementation idiom. This header also - * declares ::GMX_DISALLOW_COPY_AND_ASSIGN and ::GMX_DISALLOW_ASSIGN macros for - * class declarations. + * The header classhelpers.h declares ::GMX_DISALLOW_COPY_AND_ASSIGN, + * ::GMX_DISALLOW_COPY_MOVE_AND_ASSIGN, ::GMX_DISALLOW_ASSIGN, and + * ::GMX_DEFAULT_CONSTRUCTORS macros for class declarations. * * The header flags.h implements a gmx::FlagsTemplate template for better type * safety when using bit flag fields. diff --git a/src/gromacs/utility/classhelpers.h b/src/gromacs/utility/classhelpers.h index ae4458fdda..ccee1e2dca 100644 --- a/src/gromacs/utility/classhelpers.h +++ b/src/gromacs/utility/classhelpers.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team. - * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020,2021, 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. @@ -48,8 +48,6 @@ #ifndef GMX_UTILITY_CLASSHELPERS_H #define GMX_UTILITY_CLASSHELPERS_H -#include - namespace gmx { @@ -114,117 +112,6 @@ namespace gmx #endif //clang-format on -/*! \brief - * Helper class to manage a pointer to a private implementation class. - * - * This helper provides the following benefits (all but the last could also be - * achieved with std::unique_ptr): - * - Automatic memory management: the implementation pointer is freed in - * the destructor automatically. If the destructor is not declared or is - * defined inline in the header file, a compilation error occurs instead - * of a memory leak or undefined behavior. - * - Exception safety in constructors: the implementation pointer is freed - * correctly even if the constructor of the containing class throws after - * the implementation class is constructed. - * - Copy and/or assignment is automatically disallowed if explicit copy - * constructor and/or assignment operator is not provided. - * - Compiler helps to manage const-correctness: in const methods, it is not - * possible to change the implementation class. - * - * Move construction and assignment are also disallowed, but can be enabled by - * providing explicit move constructor and/or assignment. - * - * Intended use: - * \code - // In exampleclass.h - class ExampleClass - { - public: - ExampleClass(); - ~ExampleClass(); // Must be defined, must not be defined inline - - // <...> - - private: - class Impl; - - PrivateImplPointer impl_; - }; - - // In exampleclass.cpp - - // - - ExampleClass::ExampleClass() - : impl_(new Impl) - { - } - - ExampleClass::~ExampleClass() - { - } - \endcode - * - * Note that ExampleClass::~ExampleClass cannot be declared inline (or - * generated by the compiler) because the implementation of impl_ - * requires that ExampleClass::Impl be known in size, whereas it has - * only been forward declared. Only the translation unit where - * ExampleClass::Impl is declared can define the destructor for - * ExampleClass (which may be defaulted). - * - * \inlibraryapi - * \ingroup module_utility - */ -template -class PrivateImplPointer -{ -public: - //! Allow implicit initialization from nullptr to support comparison. - PrivateImplPointer(std::nullptr_t) : ptr_(nullptr) {} - //! Initialize with the given implementation class. - explicit PrivateImplPointer(Impl* ptr) : ptr_(ptr) {} - //! \cond - // Explicitly declared to work around MSVC problems. - PrivateImplPointer(PrivateImplPointer&& other) noexcept : ptr_(std::move(other.ptr_)) {} - PrivateImplPointer& operator=(PrivateImplPointer&& other) noexcept - { - ptr_ = std::move(other.ptr_); - return *this; - } - //! \endcond - - /*! \brief - * Sets a new implementation class and destructs the previous one. - * - * Needed, e.g., to implement lazily initializable or copy-assignable - * classes. - */ - void reset(Impl* ptr) { ptr_.reset(ptr); } - //! Access the raw pointer. - Impl* get() { return ptr_.get(); } - //! Access the implementation class as with a raw pointer. - Impl* operator->() { return ptr_.get(); } - //! Access the implementation class as with a raw pointer. - Impl& operator*() { return *ptr_; } - //! Access the implementation class as with a raw pointer. - const Impl* operator->() const { return ptr_.get(); } - //! Access the implementation class as with a raw pointer. - const Impl& operator*() const { return *ptr_; } - - //! Allows testing whether the implementation is initialized. - explicit operator bool() const { return ptr_ != nullptr; } - - //! Tests for equality (mainly useful against nullptr). - bool operator==(const PrivateImplPointer& other) const { return ptr_ == other.ptr_; } - //! Tests for inequality (mainly useful against nullptr). - bool operator!=(const PrivateImplPointer& other) const { return ptr_ != other.ptr_; } - -private: - std::unique_ptr ptr_; - - // Copy construction and assignment disabled by the unique_ptr member. -}; - } // namespace gmx #endif diff --git a/src/gromacs/utility/datafilefinder.h b/src/gromacs/utility/datafilefinder.h index 43c95e21b1..4eda8b3afd 100644 --- a/src/gromacs/utility/datafilefinder.h +++ b/src/gromacs/utility/datafilefinder.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2014,2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2014,2015,2018,2019,2021, 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. @@ -45,10 +45,10 @@ #include +#include #include #include -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/fileptr.h" namespace gmx @@ -254,7 +254,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/utility/directoryenumerator.h b/src/gromacs/utility/directoryenumerator.h index 18bf791982..36dec8b24f 100644 --- a/src/gromacs/utility/directoryenumerator.h +++ b/src/gromacs/utility/directoryenumerator.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2016,2019, by the GROMACS development team, led by + * Copyright (c) 2015,2016,2019,2021, 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. @@ -43,11 +43,10 @@ #ifndef GMX_UTILITY_DIRECTORYENUMERATOR_H #define GMX_UTILITY_DIRECTORYENUMERATOR_H +#include #include #include -#include "gromacs/utility/classhelpers.h" - namespace gmx { @@ -123,7 +122,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/utility/filestream.h b/src/gromacs/utility/filestream.h index 5309fb2178..9e24a1c8d2 100644 --- a/src/gromacs/utility/filestream.h +++ b/src/gromacs/utility/filestream.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2015,2018,2019,2020,2021, 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. @@ -45,9 +45,9 @@ #include +#include #include -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/fileptr.h" #include "gromacs/utility/textstream.h" @@ -142,7 +142,7 @@ public: void close() override; private: - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \libinternal \brief @@ -181,7 +181,7 @@ public: static TextOutputFile& standardError(); private: - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/utility/inmemoryserializer.h b/src/gromacs/utility/inmemoryserializer.h index 252eeae886..c289c249d4 100644 --- a/src/gromacs/utility/inmemoryserializer.h +++ b/src/gromacs/utility/inmemoryserializer.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2016,2017,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2016,2017,2018,2019,2020,2021, 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. @@ -45,10 +45,10 @@ #include +#include #include #include "gromacs/utility/arrayref.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/iserializer.h" namespace gmx @@ -96,7 +96,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; class InMemoryDeserializer : public ISerializer @@ -130,7 +130,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/utility/keyvaluetreetransform.h b/src/gromacs/utility/keyvaluetreetransform.h index 9c2a2f5acd..27b6f7dc42 100644 --- a/src/gromacs/utility/keyvaluetreetransform.h +++ b/src/gromacs/utility/keyvaluetreetransform.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2016,2017,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2016,2017,2018,2019,2021, 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. @@ -46,12 +46,12 @@ #define GMX_UTILITY_KEYVALUETREETRANSFORM_H #include +#include #include #include #include #include "gromacs/utility/any.h" -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/keyvaluetree.h" namespace gmx @@ -137,7 +137,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \libinternal \brief @@ -351,7 +351,7 @@ public: IKeyValueTreeErrorHandler* errorHandler) const; private: - PrivateImplPointer impl_; + std::unique_ptr impl_; }; class IKeyValueTreeBackMapping diff --git a/src/gromacs/utility/loggerbuilder.h b/src/gromacs/utility/loggerbuilder.h index 5948a01e6c..499f5878ed 100644 --- a/src/gromacs/utility/loggerbuilder.h +++ b/src/gromacs/utility/loggerbuilder.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2016,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2016,2018,2019,2020,2021, 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. @@ -47,7 +47,6 @@ #include #include -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/logger.h" namespace gmx @@ -103,7 +102,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \libinternal \brief @@ -138,8 +137,8 @@ private: LoggerOwner(std::unique_ptr impl); - PrivateImplPointer impl_; - const MDLogger* logger_; + std::unique_ptr impl_; + const MDLogger* logger_; friend class LoggerBuilder; }; diff --git a/src/gromacs/utility/messagestringcollector.h b/src/gromacs/utility/messagestringcollector.h index ee56774f86..dff7895b57 100644 --- a/src/gromacs/utility/messagestringcollector.h +++ b/src/gromacs/utility/messagestringcollector.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2011,2012,2013,2014,2019, by the GROMACS development team, led by + * Copyright (c) 2011,2012,2013,2014,2019,2021, 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. @@ -43,6 +43,7 @@ #ifndef GMX_UTILITY_MESSAGESTRINGCOLLECTOR_H #define GMX_UTILITY_MESSAGESTRINGCOLLECTOR_H +#include #include #include "gromacs/utility/classhelpers.h" @@ -115,7 +116,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \libinternal \brief diff --git a/src/gromacs/utility/textreader.h b/src/gromacs/utility/textreader.h index 55020da404..f6c3f58c53 100644 --- a/src/gromacs/utility/textreader.h +++ b/src/gromacs/utility/textreader.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2017,2019, by the GROMACS development team, led by + * Copyright (c) 2015,2017,2019,2021, 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. @@ -43,9 +43,9 @@ #ifndef GMX_UTILITY_TEXTREADER_H #define GMX_UTILITY_TEXTREADER_H +#include #include -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/textstream.h" namespace gmx @@ -180,7 +180,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/gromacs/utility/textwriter.h b/src/gromacs/utility/textwriter.h index 89b7eccf1c..e1ddd78f6a 100644 --- a/src/gromacs/utility/textwriter.h +++ b/src/gromacs/utility/textwriter.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2015,2018,2019,2021, 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. @@ -45,9 +45,9 @@ #include +#include #include -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/textstream.h" namespace gmx @@ -196,7 +196,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace gmx diff --git a/src/programs/mdrun/tests/moduletest.h b/src/programs/mdrun/tests/moduletest.h index d29ebe15d3..516bb8b5c0 100644 --- a/src/programs/mdrun/tests/moduletest.h +++ b/src/programs/mdrun/tests/moduletest.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team. - * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020,2021, 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. @@ -50,6 +50,8 @@ #include +#include + #include "gromacs/utility/classhelpers.h" #include "gromacs/utility/gmxmpi.h" diff --git a/src/testutils/include/testutils/cmdlinetest.h b/src/testutils/include/testutils/cmdlinetest.h index a06ddc913e..3dfcd4eac3 100644 --- a/src/testutils/include/testutils/cmdlinetest.h +++ b/src/testutils/include/testutils/cmdlinetest.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team. - * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2017,2018,2019,2020,2021, 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. @@ -53,7 +53,6 @@ // arrayref.h is not strictly necessary for this header, but nearly all // callers will need it to use the constructor that takes ArrayRef. #include "gromacs/utility/arrayref.h" -#include "gromacs/utility/classhelpers.h" namespace gmx { @@ -194,7 +193,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \libinternal \brief @@ -354,7 +353,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; /*! \libinternal \brief @@ -489,7 +488,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace test diff --git a/src/testutils/include/testutils/interactivetest.h b/src/testutils/include/testutils/interactivetest.h index eeed955928..074455ae06 100644 --- a/src/testutils/include/testutils/interactivetest.h +++ b/src/testutils/include/testutils/interactivetest.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2017,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2015,2017,2019,2020,2021, 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. @@ -43,8 +43,9 @@ #ifndef GMX_TESTUTILS_INTERACTIVETEST_H #define GMX_TESTUTILS_INTERACTIVETEST_H +#include + #include "gromacs/utility/arrayref.h" -#include "gromacs/utility/classhelpers.h" namespace gmx { @@ -118,7 +119,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace test } // namespace gmx diff --git a/src/testutils/include/testutils/loggertest.h b/src/testutils/include/testutils/loggertest.h index 29c5ee5335..37389893e3 100644 --- a/src/testutils/include/testutils/loggertest.h +++ b/src/testutils/include/testutils/loggertest.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2016,2017,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2016,2017,2019,2020,2021, 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. @@ -43,7 +43,8 @@ #ifndef GMX_TESTUTILS_LOGGERTEST_H #define GMX_TESTUTILS_LOGGERTEST_H -#include "gromacs/utility/classhelpers.h" +#include + #include "gromacs/utility/logger.h" namespace gmx @@ -82,7 +83,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace test diff --git a/src/testutils/include/testutils/refdata.h b/src/testutils/include/testutils/refdata.h index 78b0449b84..e57b967690 100644 --- a/src/testutils/include/testutils/refdata.h +++ b/src/testutils/include/testutils/refdata.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2011-2018, The GROMACS development team. - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -594,7 +594,7 @@ private: */ explicit TestReferenceChecker(Impl* impl); - PrivateImplPointer impl_; + std::unique_ptr impl_; /*! \brief * Needed to expose the constructor only to TestReferenceData. diff --git a/src/testutils/include/testutils/stdiohelper.h b/src/testutils/include/testutils/stdiohelper.h index c46df9bf5f..0c632b834d 100644 --- a/src/testutils/include/testutils/stdiohelper.h +++ b/src/testutils/include/testutils/stdiohelper.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2013,2014,2017,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2017,2019,2020,2021, 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. @@ -43,6 +43,8 @@ #ifndef GMX_TESTUTILS_STDIOHELPER_H #define GMX_TESTUTILS_STDIOHELPER_H +#include + #include "gromacs/utility/classhelpers.h" namespace gmx diff --git a/src/testutils/include/testutils/stringtest.h b/src/testutils/include/testutils/stringtest.h index 597078d536..08441dd3f4 100644 --- a/src/testutils/include/testutils/stringtest.h +++ b/src/testutils/include/testutils/stringtest.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2012,2013,2014,2015,2017 by the GROMACS development team. - * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020,2021, 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. @@ -44,12 +44,11 @@ #ifndef GMX_TESTUTILS_STRINGTEST_H #define GMX_TESTUTILS_STRINGTEST_H +#include #include #include -#include "gromacs/utility/classhelpers.h" - namespace gmx { @@ -125,7 +124,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace test diff --git a/src/testutils/include/testutils/test_device.h b/src/testutils/include/testutils/test_device.h index 3fa7915fcf..0b1f011c76 100644 --- a/src/testutils/include/testutils/test_device.h +++ b/src/testutils/include/testutils/test_device.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2020, by the GROMACS development team, led by + * Copyright (c) 2020,2021, 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. @@ -46,10 +46,10 @@ */ #include +#include #include #include -#include "gromacs/utility/classhelpers.h" #include "gromacs/utility/gmxassert.h" class DeviceContext; @@ -85,7 +85,7 @@ private: //! Implementation type. class Impl; //! Implementation object. - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace test diff --git a/src/testutils/include/testutils/testfilemanager.h b/src/testutils/include/testutils/testfilemanager.h index 53dbba16c6..d9b8e7c2b1 100644 --- a/src/testutils/include/testutils/testfilemanager.h +++ b/src/testutils/include/testutils/testfilemanager.h @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2012,2013,2014,2015,2018 by the GROMACS development team. - * Copyright (c) 2019,2020, by the GROMACS development team, led by + * Copyright (c) 2019,2020,2021, 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. @@ -44,10 +44,9 @@ #ifndef GMX_TESTUTILS_TESTFILEMANAGER_H #define GMX_TESTUTILS_TESTFILEMANAGER_H +#include #include -#include "gromacs/utility/classhelpers.h" - namespace gmx { /*! \libinternal \brief @@ -235,7 +234,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace test diff --git a/src/testutils/include/testutils/testfileredirector.h b/src/testutils/include/testutils/testfileredirector.h index 19dfa499f4..1574d7a000 100644 --- a/src/testutils/include/testutils/testfileredirector.h +++ b/src/testutils/include/testutils/testfileredirector.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2015,2018,2019,2020,2021, 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. @@ -43,6 +43,7 @@ #ifndef GMX_TESTUTILS_TESTFILEREDIRECTOR_H #define GMX_TESTUTILS_TESTFILEREDIRECTOR_H +#include #include #include @@ -120,7 +121,7 @@ public: private: class Impl; - PrivateImplPointer impl_; + std::unique_ptr impl_; }; } // namespace test diff --git a/src/testutils/testoptions.cpp b/src/testutils/testoptions.cpp index f2805afe24..9e5b47f5dc 100644 --- a/src/testutils/testoptions.cpp +++ b/src/testutils/testoptions.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2012,2013,2014,2015,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2012,2013,2014,2015,2019,2020,2021, 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. @@ -45,6 +45,7 @@ #include +#include #include "gromacs/utility/classhelpers.h" #include "gromacs/utility/mutex.h" -- 2.22.0