H5PropertyList.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c), 2017-2018, Adrien Devresse <adrien.devresse@epfl.ch>
3  * Juan Hernando <juan.hernando@epfl.ch>
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 H5PROPERTY_LIST_HPP
10 #define H5PROPERTY_LIST_HPP
11 
12 #include "H5Object.hpp"
13 
14 #include <H5Ppublic.h>
15 
16 namespace HighFive {
17 
21 class Properties {
22  public:
23  enum Type
24  {
28  };
29 
30  ~Properties();
31 
32 #ifdef H5_USE_CXX11
33  Properties(Properties&& other);
35 #endif
36 
37  Type getType() const { return _type; }
38 
39  hid_t getId() const { return _hid; }
40 
46  template <typename Property>
47  void add(const Property& property);
48 
49  protected:
50 
51  // protected constructor
52  explicit Properties(Type type);
53 
54  private:
55 #ifdef H5_USE_CXX11
56  Properties(const Properties&) = delete;
57  Properties& operator=(const Properties&) = delete;
58 #else
59  Properties(const Properties&);
61 #endif
62 
64  hid_t _hid;
65 };
66 
68 public:
70 };
71 
73 public:
75 };
76 
77 class Chunking
78 {
79  public:
80  Chunking(const std::vector<hsize_t>& dims) : _dims(dims) {}
81 
82  Chunking(std::initializer_list<hsize_t> items) : Chunking(std::vector<hsize_t>{items}) {}
83 
84  template<typename... Args>
85  Chunking(hsize_t item, Args... args) : Chunking(std::vector<hsize_t>{item, static_cast<hsize_t>(args)...}) {}
86 
87  const std::vector<hsize_t>& getDimensions() const {return _dims;}
88 
89  private:
90  friend class Properties;
91  void apply(hid_t hid) const;
92  const std::vector<hsize_t> _dims;
93 };
94 
95 class Deflate
96 {
97  public:
98  Deflate(int level) : _level(level) {}
99 
100  private:
101  friend class Properties;
102  void apply(hid_t hid) const;
103  const int _level;
104 };
105 
106 class Shuffle
107 {
108  public:
109  Shuffle() {}
110 
111  private:
112  friend class Properties;
113  void apply(hid_t hid) const;
114 };
115 
118 class Caching
119 {
120  public:
123  Caching(const size_t numSlots, const size_t cacheSize,
124  const double w0 = H5D_CHUNK_CACHE_W0_DEFAULT)
125  : _numSlots(numSlots)
126  , _cacheSize(cacheSize)
127  , _w0(w0)
128  {}
129 
130  private:
131  friend class Properties;
132  void apply(hid_t hid) const;
133  const unsigned int _numSlots;
134  const size_t _cacheSize;
135  const double _w0;
136 };
137 
138 } // HighFive
139 
141 
142 #endif // H5PROPERTY_LIST_HPP
HighFive::Caching::Caching
Caching(const size_t numSlots, const size_t cacheSize, const double w0=H5D_CHUNK_CACHE_W0_DEFAULT)
Definition: H5PropertyList.hpp:123
HighFive::Caching::_numSlots
const unsigned int _numSlots
Definition: H5PropertyList.hpp:133
H5Object.hpp
HighFive::Caching::_w0
const double _w0
Definition: H5PropertyList.hpp:135
HighFive::Deflate::apply
void apply(hid_t hid) const
Definition: H5PropertyList_misc.hpp:94
H5PropertyList_misc.hpp
HighFive::Properties::Type
Type
Definition: H5PropertyList.hpp:23
HighFive::Chunking::Chunking
Chunking(hsize_t item, Args... args)
Definition: H5PropertyList.hpp:85
HighFive::Caching::apply
void apply(hid_t hid) const
Definition: H5PropertyList_misc.hpp:124
HighFive::Deflate::_level
const int _level
Definition: H5PropertyList.hpp:103
HighFive::Properties::operator=
Properties & operator=(Properties &&other)
Definition: H5PropertyList_misc.hpp:32
HighFive::Chunking::apply
void apply(hid_t hid) const
Definition: H5PropertyList_misc.hpp:85
HighFive::Properties::DATASET_ACCESS
@ DATASET_ACCESS
Definition: H5PropertyList.hpp:27
HighFive::Properties::_type
Type _type
Definition: H5PropertyList.hpp:63
HighFive::Properties::~Properties
~Properties()
Definition: H5PropertyList_misc.hpp:43
HighFive::Properties::_hid
hid_t _hid
Definition: H5PropertyList.hpp:64
HighFive::Chunking::_dims
const std::vector< hsize_t > _dims
Definition: H5PropertyList.hpp:92
HighFive::Shuffle::Shuffle
Shuffle()
Definition: H5PropertyList.hpp:109
HighFive::DataSetCreateProps
Definition: H5PropertyList.hpp:67
HighFive::Deflate
Definition: H5PropertyList.hpp:95
HighFive::Chunking::Chunking
Chunking(std::initializer_list< hsize_t > items)
Definition: H5PropertyList.hpp:82
HighFive::Chunking
Definition: H5PropertyList.hpp:77
HighFive::Chunking::getDimensions
const std::vector< hsize_t > & getDimensions() const
Definition: H5PropertyList.hpp:87
HighFive::Caching::_cacheSize
const size_t _cacheSize
Definition: H5PropertyList.hpp:134
HighFive::Properties::add
void add(const Property &property)
Definition: H5PropertyList_misc.hpp:51
HighFive::DataSetAccessProps
Definition: H5PropertyList.hpp:72
HighFive::DataSetCreateProps::DataSetCreateProps
DataSetCreateProps()
Definition: H5PropertyList.hpp:69
HighFive::Properties::getId
hid_t getId() const
Definition: H5PropertyList.hpp:39
std
Definition: HalfEdge.hpp:124
HighFive::Properties::getType
Type getType() const
Definition: H5PropertyList.hpp:37
HighFive::Properties::DATASET_CREATE
@ DATASET_CREATE
Definition: H5PropertyList.hpp:26
HighFive::Deflate::Deflate
Deflate(int level)
Definition: H5PropertyList.hpp:98
HighFive::Shuffle
Definition: H5PropertyList.hpp:106
HighFive::Properties::Properties
Properties(Properties &&other)
Definition: H5PropertyList_misc.hpp:25
HighFive::Properties
Generic HDF5 property List.
Definition: H5PropertyList.hpp:21
HighFive::Shuffle::apply
void apply(hid_t hid) const
Definition: H5PropertyList_misc.hpp:109
HighFive::Properties::FILE_ACCESS
@ FILE_ACCESS
Definition: H5PropertyList.hpp:25
HighFive
Definition: H5Annotate_traits.hpp:14
HighFive::Chunking::Chunking
Chunking(const std::vector< hsize_t > &dims)
Definition: H5PropertyList.hpp:80
HighFive::Caching
Definition: H5PropertyList.hpp:118
HighFive::DataSetAccessProps::DataSetAccessProps
DataSetAccessProps()
Definition: H5PropertyList.hpp:74


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:23