My Project  1.12.2
H5DcreatProp.h
1 // C++ informative line for the emacs editor: -*- C++ -*-
2 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3  * Copyright by The HDF Group. *
4  * Copyright by the Board of Trustees of the University of Illinois. *
5  * All rights reserved. *
6  * *
7  * This file is part of HDF5. The full HDF5 copyright notice, including *
8  * terms governing use, modification, and redistribution, is contained in *
9  * the COPYING file, which can be found at the root of the source code *
10  * distribution tree, or in https://www.hdfgroup.org/licenses. *
11  * If you do not have access to either file, you may request a copy from *
12  * help@hdfgroup.org. *
13  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
14 
15 #ifndef H5DSCreatPropList_H
16 #define H5DSCreatPropList_H
17 
18 namespace H5 {
19 
20 // Class forwarding
21 class DataType;
22 class DataSpace;
23 
28 // Inheritance: ObjCreatPropList -> PropList -> IdComponent
29 class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList {
30  public:
32  static const DSetCreatPropList &DEFAULT;
33 
34  // Creates a dataset creation property list.
36 
37  // Queries whether all the filters set in this property list are
38  // available currently.
39  bool allFiltersAvail() const;
40 
41  // Get space allocation time for this property.
42  H5D_alloc_time_t getAllocTime() const;
43 
44  // Set space allocation time for dataset during creation.
45  void setAllocTime(H5D_alloc_time_t alloc_time) const;
46 
47  // Retrieves the size of the chunks used to store a chunked layout dataset.
48  int getChunk(int max_ndims, hsize_t *dim) const;
49 
50  // Sets the size of the chunks used to store a chunked layout dataset.
51  void setChunk(int ndims, const hsize_t *dim) const;
52 
53  // Returns information about an external file.
54  void getExternal(unsigned idx, size_t name_size, char *name, off_t &offset, hsize_t &size) const;
55 
56  // Returns the number of external files for a dataset.
57  int getExternalCount() const;
58 
59  // Gets fill value writing time.
60  H5D_fill_time_t getFillTime() const;
61 
62  // Sets fill value writing time for dataset.
63  void setFillTime(H5D_fill_time_t fill_time) const;
64 
65  // Retrieves a dataset fill value.
66  void getFillValue(const DataType &fvalue_type, void *value) const;
67 
68  // Sets a dataset fill value.
69  void setFillValue(const DataType &fvalue_type, const void *value) const;
70 
71  // Returns information about a filter in a pipeline.
72  H5Z_filter_t getFilter(int filter_number, unsigned int &flags, size_t &cd_nelmts, unsigned int *cd_values,
73  size_t namelen, char name[], unsigned int &filter_config) const;
74 
75  // Returns information about a filter in a pipeline given the filter id.
76  void getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts,
77  unsigned int *cd_values, size_t namelen, char name[],
78  unsigned int &filter_config) const;
79 
80  // Gets the layout of the raw data storage of the data that uses this
81  // property list.
82  H5D_layout_t getLayout() const;
83 
84  // Sets the type of storage used to store the raw data for the
85  // dataset that uses this property list.
86  void setLayout(H5D_layout_t layout) const;
87 
88  // Returns the number of filters in the pipeline.
89  int getNfilters() const;
90 
91  // Checks if fill value has been defined for this property.
92  H5D_fill_value_t isFillValueDefined() const;
93 
94  // Modifies the specified filter.
95  void modifyFilter(H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts,
96  const unsigned int cd_values[]) const;
97 
98  // Remove one or all filters from the filter pipeline.
99  void removeFilter(H5Z_filter_t filter_id) const;
100 
101  // Sets compression method and compression level.
102  void setDeflate(int level) const;
103 
104  // Adds an external file to the list of external files.
105  void setExternal(const char *name, off_t offset, hsize_t size) const;
106 
107  // Adds a filter to the filter pipeline.
108  void setFilter(H5Z_filter_t filter, unsigned int flags = 0, size_t cd_nelmts = 0,
109  const unsigned int cd_values[] = NULL) const;
110 
111  // Sets Fletcher32 checksum of EDC for this property list.
112  void setFletcher32() const;
113 
114  // Sets method of the shuffle filter.
115  void setShuffle() const;
116 
117  // Sets SZIP compression method.
118  void setSzip(unsigned int options_mask, unsigned int pixels_per_block) const;
119 
120  // Sets N-bit compression method.
121  void setNbit() const;
122 
123  // Maps elements of a virtual dataset to elements of the source dataset.
124  void setVirtual(const DataSpace &vspace, const char *src_fname, const char *src_dsname,
125  const DataSpace &sspace) const;
126  void setVirtual(const DataSpace &vspace, const H5std_string src_fname, const H5std_string src_dsname,
127  const DataSpace &sspace) const;
128 
130  virtual H5std_string
131  fromClass() const H5_OVERRIDE
132  {
133  return ("DSetCreatPropList");
134  }
135 
136  // Copy constructor - same as the original DSetCreatPropList.
138 
139  // Creates a copy of an existing dataset creation property list
140  // using the property list id.
141  DSetCreatPropList(const hid_t plist_id);
142 
143  // Noop destructor.
144  virtual ~DSetCreatPropList() H5_OVERRIDE;
145 
146 #ifndef DOXYGEN_SHOULD_SKIP_THIS
147 
148  // Deletes the global constant, should only be used by the library
149  static void deleteConstants();
150 
151  private:
152  static DSetCreatPropList *DEFAULT_;
153 
154  // Creates the global constant, should only be used by the library
155  static DSetCreatPropList *getConstant();
156 
157 #endif // DOXYGEN_SHOULD_SKIP_THIS
158 
159 }; // end of DSetCreatPropList
160 } // namespace H5
161 
162 #endif // H5DSCreatPropList_H
Class DSetCreatPropList inherits from ObjCreatPropList and provides wrappers for the HDF5 dataset cre...
Definition: H5DcreatProp.h:29
virtual H5std_string fromClass() const H5_OVERRIDE
Returns this class name.
Definition: H5DcreatProp.h:131
static const DSetCreatPropList & DEFAULT
Default dataset creation property list.
Definition: H5DcreatProp.h:32
Class DataSpace inherits from IdComponent and provides wrappers for the HDF5's dataspaces.
Definition: H5DataSpace.h:25
Class DataType provides generic operations on HDF5 datatypes.
Definition: H5DataType.h:28
Class ObjCreatPropList inherits from PropList and provides wrappers for the HDF5 object create proper...
Definition: H5OcreatProp.h:25
Definition: H5AbstractDs.cpp:34


The HDF Group Help Desk:
  Copyright by The HDF Group
and the Board of Trustees of the University of Illinois