hops
H5File.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c), 2017, Adrien Devresse <adrien.devresse@epfl.ch>
3  *
4  * Distributed under the Boost Software License, Version 1.0.
5  * (See accompanying file LICENSE_1_0.txt or copy at
6  * http://www.boost.org/LICENSE_1_0.txt)
7  *
8  */
9 #ifndef H5FILE_HPP
10 #define H5FILE_HPP
11 
12 #include <string>
13 
14 #include "H5FileDriver.hpp"
15 #include "H5Object.hpp"
17 #include "bits/H5Node_traits.hpp"
18 
19 namespace HighFive {
20 
24 class File : public Object,
25  public NodeTraits<File>,
26  public AnnotateTraits<File> {
27  public:
28 
30 
31  enum : unsigned {
33  ReadOnly = 0x00u,
35  ReadWrite = 0x01u,
37  Truncate = 0x02u,
39  Excl = 0x04u,
41  Debug = 0x08u,
43  Create = 0x10u,
48  };
49 
57  explicit File(const std::string& filename, unsigned openFlags = ReadOnly,
58  const FileAccessProps& fileAccessProps = FileDriver());
59 
63  const std::string& getName() const noexcept;
64 
70  void flush();
71 
72  private:
73  std::string _filename;
74 };
75 
76 } // namespace HighFive
77 
78 // H5File is the main user constructible -> bring in implementation headers
79 #include "bits/H5Annotate_traits_misc.hpp"
80 #include "bits/H5File_misc.hpp"
82 
83 #endif // H5FILE_HPP
H5Object.hpp
HighFive::AnnotateTraits
Definition: H5_definitions.hpp:39
HighFive::File::File
File(const std::string &filename, unsigned openFlags=ReadOnly, const FileAccessProps &fileAccessProps=FileDriver())
File.
Definition: H5File_misc.hpp:41
HighFive::File::Excl
@ Excl
Open flag: Open will fail if file already exist.
Definition: H5File.hpp:39
HighFive::PropertyList
Base HDF5 property List.
Definition: H5_definitions.hpp:48
HighFive::File::Create
@ Create
Open flag: Create non existing file.
Definition: H5File.hpp:43
HighFive::File::type
const static ObjectType type
Definition: H5File.hpp:29
HighFive::Object
Definition: H5Object.hpp:36
HighFive::NodeTraits
NodeTraits: Base class for Group and File.
Definition: H5_definitions.hpp:45
H5Node_traits_misc.hpp
H5FileDriver.hpp
HighFive::ObjectType
ObjectType
Enum of the types of objects (H5O api)
Definition: H5Object.hpp:25
HighFive::File::OpenOrCreate
@ OpenOrCreate
Derived open flag: Opens RW or exclusively creates.
Definition: H5File.hpp:47
H5File_misc.hpp
H5Node_traits.hpp
HighFive::FileDriver
file driver base concept
Definition: H5FileDriver.hpp:19
H5Annotate_traits.hpp
HighFive::File
File class.
Definition: H5File.hpp:24
HighFive::File::Truncate
@ Truncate
Open flag: Truncate a file if already existing.
Definition: H5File.hpp:37
HighFive::File::Debug
@ Debug
Open flag: Open in debug mode.
Definition: H5File.hpp:41
HighFive::File::ReadWrite
@ ReadWrite
Open flag: Read Write access.
Definition: H5File.hpp:35
HighFive::ObjectType::File
@ File
string
NAME string(REPLACE ".cpp" "_bin" example_name ${example_filename}) if($
Definition: hops/Third-party/HighFive/src/examples/CMakeLists.txt:6
HighFive::File::ReadOnly
@ ReadOnly
Open flag: Read only access.
Definition: H5File.hpp:33
HighFive::File::Overwrite
@ Overwrite
Derived open flag: common write mode (=ReadWrite|Create|Truncate)
Definition: H5File.hpp:45
HighFive::File::flush
void flush()
flush
Definition: H5File_misc.hpp:83
HighFive::File::getName
const std::string & getName() const noexcept
Return the name of the file.
Definition: H5File_misc.hpp:79
HighFive
Definition: H5_definitions.hpp:15