HDF5 C++ API  1.8.12
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
H5DcreatProp.h
Go to the documentation of this file.
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 #ifndef H5_NO_NAMESPACE
24 namespace H5 {
25 #endif
26 
31 class H5_DLLCPP DSetCreatPropList : public PropList {
32  public:
33  // Default dataset creation property list.
34  static const DSetCreatPropList DEFAULT;
35 
36  // Creates a dataset creation property list.
38 
39  // Queries whether all the filters set in this property list are
40  // available currently.
41  bool allFiltersAvail();
42 
43  // Get space allocation time for this property.
44  H5D_alloc_time_t getAllocTime();
45 
46  // Set space allocation time for dataset during creation.
47  void setAllocTime(H5D_alloc_time_t alloc_time);
48 
49  // Retrieves the size of the chunks used to store a chunked layout dataset.
50  int getChunk( int max_ndims, hsize_t* dim ) const;
51 
52  // Sets the size of the chunks used to store a chunked layout dataset.
53  void setChunk( int ndims, const hsize_t* dim ) const;
54 
55  // Returns information about an external file.
56  void getExternal( unsigned idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const;
57 
58  // Returns the number of external files for a dataset.
59  int getExternalCount() const;
60 
61  // Gets fill value writing time.
62  H5D_fill_time_t getFillTime();
63 
64  // Sets fill value writing time for dataset.
65  void setFillTime(H5D_fill_time_t fill_time);
66 
67  // Retrieves a dataset fill value.
68  void getFillValue( const DataType& fvalue_type, void* value ) const;
69 
70  // Sets a dataset fill value.
71  void setFillValue( const DataType& fvalue_type, const void* value ) const;
72 
73  // Returns information about a filter in a pipeline.
74  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;
75 
76  // Returns information about a filter in a pipeline given the filter id.
77  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;
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();
92 
93  // Modifies the specified filter.
94  void modifyFilter( H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const;
95 
96  // Remove one or all filters from the filter pipeline.
97  void removeFilter( H5Z_filter_t filter_id) const;
98 
99  // Sets compression method and compression level.
100  void setDeflate( int level ) const;
101 
102  // Adds an external file to the list of external files.
103  void setExternal( const char* name, off_t offset, hsize_t size ) const;
104 
105  // Adds a filter to the filter pipeline.
106  void setFilter( H5Z_filter_t filter, unsigned int flags = 0, size_t cd_nelmts = 0, const unsigned int cd_values[] = NULL) const;
107 
108  // Sets Fletcher32 checksum of EDC for this property list.
109  void setFletcher32() const;
110 
111  // Sets method of the shuffle filter.
112  void setShuffle() const;
113 
114  // Sets SZIP compression method.
115  void setSzip(unsigned int options_mask, unsigned int pixels_per_block) const;
116 
118  virtual H5std_string fromClass () const { return("DSetCreatPropList"); }
119 
120  // Copy constructor: creates a copy of a DSetCreatPropList object.
122 
123  // Creates a copy of an existing dataset creation property list
124  // using the property list id.
125  DSetCreatPropList(const hid_t plist_id);
126 
127  // Noop destructor.
128  virtual ~DSetCreatPropList();
129 };
130 #ifndef H5_NO_NAMESPACE
131 }
132 #endif
133 #endif // __H5DSCreatPropList_H
Class PropList provides operations for generic property lists.
Definition: H5PropList.h:25
static const DSetCreatPropList DEFAULT
Constant for dataset creation default property.
Definition: H5DcreatProp.h:34
Class DSetCreatPropList represents the dataset creation property list.
Definition: H5DcreatProp.h:31
#define H5std_string
Definition: H5Exception.h:29
virtual H5std_string fromClass() const
Returns this class name.
Definition: H5DcreatProp.h:118
Class DataType provides generic operations on HDF5 datatypes.
Definition: H5DataType.h:34