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


The HDF Group Help Desk:
  Copyright by The HDF Group