h5cpp  0.5.1
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 
87 
92 
97 
101  void close_degree(CloseDegree degree) const;
102 
107 
111  void driver(const hdf5::file::Driver &file_driver) const;
112 };
113 
114 } // namespace property
115 } // namespace hdf5
Wrapper for hid_t object identifiers.
Definition: object_handle.hpp:67
abstract class for file drivers
Definition: driver.hpp:70
file access property list
Definition: file_access.hpp:68
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
void library_version_bounds(LibVersion high, LibVersion low) const
setting library version boundaries
FileAccessList(const FileAccessList &)=default
FileAccessList(ObjectHandle &&handle)
LibVersion library_version_bound_low() const
get library version low bound
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:57
std::ostream & operator<<(std::ostream &stream, const VirtualDataView &view)
std::underlying_type< LibVersion >::type LibVersionBase
Definition: file_access.hpp:55
CloseDegree
close degree enumeration
Definition: file_access.hpp:48
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