HDF5 C++ API  1.10.1
 All Classes Namespaces Functions Variables Typedefs Friends Pages
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://support.hdfgroup.org/ftp/HDF5/releases. *
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, size_t namelen, char name[], unsigned int &filter_config) const;
73 
74  // Returns information about a filter in a pipeline given the filter id.
75  void getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values, size_t namelen, char name[], unsigned int &filter_config) const;
76 
77  // Gets the layout of the raw data storage of the data that uses this
78  // property list.
79  H5D_layout_t getLayout() const;
80 
81  // Sets the type of storage used to store the raw data for the
82  // dataset that uses this property list.
83  void setLayout(H5D_layout_t layout) const;
84 
85  // Returns the number of filters in the pipeline.
86  int getNfilters() const;
87 
88  // Checks if fill value has been defined for this property.
89  H5D_fill_value_t isFillValueDefined() const;
90 
91  // Modifies the specified filter.
92  void modifyFilter(H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[]) const;
93 
94  // Remove one or all filters from the filter pipeline.
95  void removeFilter(H5Z_filter_t filter_id) const;
96 
97  // Sets compression method and compression level.
98  void setDeflate(int level) const;
99 
100  // Adds an external file to the list of external files.
101  void setExternal(const char* name, off_t offset, hsize_t size) const;
102 
103  // Adds a filter to the filter pipeline.
104  void setFilter(H5Z_filter_t filter, unsigned int flags = 0, size_t cd_nelmts = 0, const unsigned int cd_values[] = NULL) const;
105 
106  // Sets Fletcher32 checksum of EDC for this property list.
107  void setFletcher32() const;
108 
109  // Sets method of the shuffle filter.
110  void setShuffle() const;
111 
112  // Sets SZIP compression method.
113  void setSzip(unsigned int options_mask, unsigned int pixels_per_block) const;
114 
115  // Sets N-bit compression method.
116  void setNbit() const;
117 
118  // Maps elements of a virtual dataset to elements of the source dataset.
119  void setVirtual(const DataSpace& vspace, const char *src_fname, const char *src_dsname, const DataSpace& sspace) const;
120  void setVirtual(const DataSpace& vspace, const H5std_string src_fname, const H5std_string src_dsname, const DataSpace& sspace) const;
121 
123  virtual H5std_string fromClass () const { return("DSetCreatPropList"); }
124 
125  // Copy constructor: creates a copy of a DSetCreatPropList object.
127 
128  // Creates a copy of an existing dataset creation property list
129  // using the property list id.
130  DSetCreatPropList(const hid_t plist_id);
131 
132  // Noop destructor.
133  virtual ~DSetCreatPropList();
134 
135 #ifndef DOXYGEN_SHOULD_SKIP_THIS
136 
137  // Deletes the global constant, should only be used by the library
138  static void deleteConstants();
139 
140  private:
141  static DSetCreatPropList* DEFAULT_;
142 
143  // Creates the global constant, should only be used by the library
144  static DSetCreatPropList* getConstant();
145 
146 #endif // DOXYGEN_SHOULD_SKIP_THIS
147 
148 }; // end of DSetCreatPropList
149 } // namespace H5
150 
151 #endif // __H5DSCreatPropList_H
Class DataSpace inherits from IdComponent and provides wrappers for the HDF5's dataspaces.
Definition: H5DataSpace.h:24
Class DSetCreatPropList inherits from ObjCreatPropList and provides wrappers for the HDF5 dataset cre...
Definition: H5DcreatProp.h:29
Class DataType provides generic operations on HDF5 datatypes.
Definition: H5DataType.h:28
virtual H5std_string fromClass() const
Returns this class name.
Definition: H5DcreatProp.h:123
static const DSetCreatPropList & DEFAULT
Default dataset creation property list.
Definition: H5DcreatProp.h:32
Class ObjCreatPropList inherits from PropList and provides wrappers for the HDF5 object create proper...
Definition: H5OcreatProp.h:25


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