h5cpp 0.7
A modern C++ wrapper for the HDF5 C library
Loading...
Searching...
No Matches
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#if H5_VERSION_GE(2,0,0)
53 V200 = H5F_LIBVER_V200,
54#endif
55 Earliest = H5F_LIBVER_EARLIEST
56};
57
61enum class CloseDegree : std::underlying_type<H5F_close_degree_t>::type {
62 Weak = H5F_CLOSE_WEAK,
63 Semi = H5F_CLOSE_SEMI,
64 Strong = H5F_CLOSE_STRONG,
65 Default = H5F_CLOSE_DEFAULT
66};
67
68using LibVersionBase = std::underlying_type<LibVersion>::type;
69
70using CloseDegreeBase = std::underlying_type<CloseDegree>::type;
71
72DLL_EXPORT std::ostream &operator<<(std::ostream &stream, const LibVersion &version);
73
74DLL_EXPORT std::ostream &operator<<(std::ostream &stream, const CloseDegree &version);
75
82 public:
87 FileAccessList(const FileAccessList &) = default;
88
92 ~FileAccessList() override;
93
94 explicit FileAccessList(ObjectHandle &&handle);
95
100
105
110
114 void close_degree(CloseDegree degree) const;
115
120
124 void driver(const hdf5::file::Driver &file_driver) const;
125};
126
127} // namespace property
128} // 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:81
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:70
std::underlying_type< LibVersion >::type LibVersionBase
Definition file_access.hpp:68
CloseDegree
close degree enumeration
Definition file_access.hpp:61
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