h5cpp  0.5.0
A modern C++ wrapper for the HDF5 C library
file_access.hpp
Go to the documentation of this file.
1 //
2 // (c) Copyright 2017 DESY,ESS
3 //
4 // This file is part of h5cpp.
5 //
6 // This library is free software; you can redistribute it and/or modify it
7 // under the terms of the GNU Lesser General Public License as published
8 // by the Free Software Foundation; either version 2.1 of the License, or
9 // (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful, but
12 // WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY
13 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 // License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public License
17 // along with this library; if not, write to the
18 // Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
19 // Boston, MA 02110-1301 USA
20 // ===========================================================================
21 //
22 // Authors:
23 // Eugen Wintersberger <eugen.wintersberger@desy.de>
24 // Martin Shetty <martin.shetty@esss.se>
25 // Jan Kotanski <jan.kotanski@desy.de>
26 // Created on: Aug 18, 2017
27 //
28 #pragma once
29 
31 #include <h5cpp/core/windows.hpp>
32 #include <h5cpp/file/driver.hpp>
33 
34 namespace hdf5 {
35 namespace property {
36 
40 enum class LibVersion : std::underlying_type<H5F_libver_t>::type {
41  Latest = H5F_LIBVER_LATEST,
42  Earliest = H5F_LIBVER_EARLIEST
43 };
44 
48 enum class CloseDegree : std::underlying_type<H5F_close_degree_t>::type {
49  Weak = H5F_CLOSE_WEAK,
50  Semi = H5F_CLOSE_SEMI,
51  Strong = H5F_CLOSE_STRONG,
52  Default = H5F_CLOSE_DEFAULT
53 };
54 
55 using LibVersionBase = std::underlying_type<LibVersion>::type;
56 
57 using CloseDegreeBase = std::underlying_type<CloseDegree>::type;
58 
59 DLL_EXPORT std::ostream &operator<<(std::ostream &stream, const LibVersion &version);
60 
61 DLL_EXPORT std::ostream &operator<<(std::ostream &stream, const CloseDegree &version);
62 
68 class DLL_EXPORT FileAccessList : public List {
69  public:
74  FileAccessList(const FileAccessList &) = default;
75 
79  ~FileAccessList() override;
80 
81  explicit FileAccessList(ObjectHandle &&handle);
82 
86  void library_version_bounds(LibVersion high, LibVersion low) const;
87 
91  LibVersion library_version_bound_high() const;
92 
96  LibVersion library_version_bound_low() const;
97 
101  void close_degree(CloseDegree degree) const;
102 
106  CloseDegree close_degree() const;
107 
111  void driver(const hdf5::file::Driver &file_driver) const;
112 };
113 
114 } // namespace property
115 } // namespace hdf5
hdf5::property::FileAccessList
file access property list
Definition: file_access.hpp:68
property_list.hpp
hdf5::property::List
base class for property lists
Definition: property_list.hpp:54
hdf5::property::CloseDegree::Strong
@ Strong
hdf5::property::LibVersionBase
std::underlying_type< LibVersion >::type LibVersionBase
Definition: file_access.hpp:55
hdf5::property::CloseDegree::Default
@ Default
hdf5::property::CloseDegreeBase
std::underlying_type< CloseDegree >::type CloseDegreeBase
Definition: file_access.hpp:57
hdf5::property::LibVersion
LibVersion
library version enumeration
Definition: file_access.hpp:40
hdf5::property::LibVersion::Earliest
@ Earliest
windows.hpp
driver.hpp
hdf5::property::CloseDegree::Semi
@ Semi
hdf5::property::operator<<
std::ostream & operator<<(std::ostream &stream, const VirtualDataView &view)
hdf5::ObjectHandle
Wrapper for hid_t object identifiers.
Definition: object_handle.hpp:66
hdf5::property::CloseDegree
CloseDegree
close degree enumeration
Definition: file_access.hpp:48
DLL_EXPORT
#define DLL_EXPORT
Definition: windows.hpp:29
hdf5::property::LibVersion::Latest
@ Latest
hdf5::file::Driver
abstract class for file drivers
Definition: driver.hpp:69
hdf5::property::CloseDegree::Weak
@ Weak
hdf5
top-level namespace of the entire library
Definition: attribute.hpp:45