HDF5 C++ API  1.8.18
 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 files COPYING and Copyright.html. COPYING can be found at the root *
10  * of the source code distribution tree; Copyright.html can be found at the *
11  * root level of an installed copy of the electronic HDF5 document set and *
12  * is linked from the top-level documents page. It can also be found at *
13  * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
14  * access to either file, you may request a copy from help@hdfgroup.org. *
15  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
16 
17 // Class DSetCreatPropList represents the HDF5 dataset creation property list
18 // and inherits from PropList.
19 
20 #ifndef __H5DSCreatPropList_H
21 #define __H5DSCreatPropList_H
22 
23 namespace H5 {
24 
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 
119  virtual H5std_string fromClass () const { return("DSetCreatPropList"); }
120 
121  // Copy constructor: creates a copy of a DSetCreatPropList object.
123 
124  // Creates a copy of an existing dataset creation property list
125  // using the property list id.
126  DSetCreatPropList(const hid_t plist_id);
127 
128  // Noop destructor.
129  virtual ~DSetCreatPropList();
130 
131 #ifndef DOXYGEN_SHOULD_SKIP_THIS
132 
133  // Deletes the global constant, should only be used by the library
134  static void deleteConstants();
135 
136  private:
137  static DSetCreatPropList* DEFAULT_;
138 
139  // Creates the global constant, should only be used by the library
140  static DSetCreatPropList* getConstant();
141 
142 #endif // DOXYGEN_SHOULD_SKIP_THIS
143 };
144 }
145 #endif // __H5DSCreatPropList_H
Class DSetCreatPropList represents the dataset creation property list.
Definition: H5DcreatProp.h:29
Class DataType provides generic operations on HDF5 datatypes.
Definition: H5DataType.h:32
virtual H5std_string fromClass() const
Returns this class name.
Definition: H5DcreatProp.h:119
static const DSetCreatPropList & DEFAULT
Default dataset creation property list.
Definition: H5DcreatProp.h:32
Class ObjCreatPropList represents the HDF5 object creation property list.
Definition: H5OcreatProp.h:23


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