From: Daniel Garcia-Sanchez Date: Thu, 4 Oct 2018 15:59:41 +0000 (+0200) Subject: Move enum Mode X-Git-Tag: v9.1.0-rc1~453^2~44 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9340867d57ffcdef386c1ca0cee655097c4e99d;p=dealii.git Move enum Mode --- diff --git a/include/deal.II/base/hdf5.h b/include/deal.II/base/hdf5.h index 06d7a5216b..8301af3b7b 100644 --- a/include/deal.II/base/hdf5.h +++ b/include/deal.II/base/hdf5.h @@ -268,12 +268,6 @@ namespace HDF5 HDF5Object(const std::string name, const bool mpi); public: - enum class Mode - { - create, - open - }; - /** * Reads an attribute. `T` can be `float`, `double`, `std::complex`, * `std::complex`, `int`, `unsigned int`, `bool` or `std::string`. @@ -704,10 +698,27 @@ namespace HDF5 class Group : public HDF5Object { protected: + /** + * Group access mode + */ + enum class Mode + { + /** + * Creates a new group + */ + create, + /** + * Opens an existing group + */ + open + }; + Group(const std::string name, const Group & parent_group, const bool mpi, const Mode mode); + + // This constructor is used by File Group(const std::string name, const bool mpi); public: @@ -766,6 +777,22 @@ namespace HDF5 */ class File : public Group { + public: + /** + * File access mode + */ + enum class Mode + { + /** + * Create file, truncate if exists + */ + create, + /** + * Read/write, file must exist + */ + open + }; + private: File(const std::string name, const bool mpi,