h5cpp 0.7.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
32#include <h5cpp/file/driver.hpp>
33
34namespace hdf5 {
35namespace property {
36
40enum class LibVersion : std::underlying_type<H5F_libver_t>::type {
41 Latest = H5F_LIBVER_LATEST,
42#if H5_VERSION_GE(1,10,2)
43 V18 = H5F_LIBVER_V18,
44 V110 = H5F_LIBVER_V110,
45#endif
46#if H5_VERSION_GE(1,12,0)
47 V112 = H5F_LIBVER_V112,
48#endif
49#if H5_VERSION_GE(1,13,0)
50 V114 = H5F_LIBVER_V114,
51#endif
52 Earliest = H5F_LIBVER_EARLIEST
53};
54
58enum class CloseDegree : std::underlying_type<H5F_close_degree_t>::type {
59 Weak = H5F_CLOSE_WEAK,
60 Semi = H5F_CLOSE_SEMI,
61 Strong = H5F_CLOSE_STRONG,
62 Default = H5F_CLOSE_DEFAULT
63};
64
65using LibVersionBase = std::underlying_type<LibVersion>::type;
66
67using CloseDegreeBase = std::underlying_type<CloseDegree>::type;
68
69DLL_EXPORT std::ostream &operator<<(std::ostream &stream, const LibVersion &version);
70
71DLL_EXPORT std::ostream &operator<<(std::ostream &stream, const CloseDegree &version);
72
79 public:
84 FileAccessList(const FileAccessList &) = default;
85
89 ~FileAccessList() override;
90
91 explicit FileAccessList(ObjectHandle &&handle);
92
97
102
107
111 void close_degree(CloseDegree degree) const;
112
117
121 void driver(const hdf5::file::Driver &file_driver) const;
122};
123
124} // namespace property
125} // namespace hdf5
Wrapper for hid_t object identifiers.
Definition: object_handle.hpp:67
abstract class for file drivers
Definition: driver.hpp:71
file access property list
Definition: file_access.hpp:78
CloseDegree close_degree() const
get lfile close degree
void close_degree(CloseDegree degree) const
set file close degree
FileAccessList()
default constructor
void driver(const hdf5::file::Driver &file_driver) const
set the file driver
FileAccessList(const FileAccessList &)=default
FileAccessList(ObjectHandle &&handle)
LibVersion library_version_bound_low() const
get library version low bound
void library_version_bounds(LibVersion low, LibVersion high) const
setting library version boundaries
LibVersion library_version_bound_high() const
get library version high bound
~FileAccessList() override
destructor
base class for property lists
Definition: property_list.hpp:54
std::underlying_type< CloseDegree >::type CloseDegreeBase
Definition: file_access.hpp:67
std::underlying_type< LibVersion >::type LibVersionBase
Definition: file_access.hpp:65
CloseDegree
close degree enumeration
Definition: file_access.hpp:58
std::ostream & operator<<(std::ostream &stream, const VirtualDataView &view)
LibVersion
library version enumeration
Definition: file_access.hpp:40
top-level namespace of the entire library
Definition: attribute.hpp:45
#define DLL_EXPORT
Definition: windows.hpp:29