HDF5 C++ API  1.8.16
H5FaccProp.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 FileAccPropList represents the HDF5 file access property list and
18 // inherits from DataType.
19 
20 #ifndef __H5FileAccPropList_H
21 #define __H5FileAccPropList_H
22 
23 #ifndef H5_NO_NAMESPACE
24 namespace H5 {
25 #endif
26 
28 class H5_DLLCPP FileAccPropList : public PropList {
29  public:
31  static const FileAccPropList& DEFAULT;
32 
33  // Creates a file access property list.
35 
36  // Modifies this property list to use the H5FD_STDIO driver
37  void setStdio() const;
38 
39  // Set file driver for this property list
40  void setDriver(hid_t new_driver_id, const void *new_driver_info) const;
41 
42  // Returns a low-level file driver identifier.
43  hid_t getDriver() const;
44 
45  // Sets offset for family driver.
46  void setFamilyOffset(hsize_t offset) const;
47 
48  // Gets offset for family driver.
49  hsize_t getFamilyOffset() const;
50 
51  // Modifies this file access property list to use the sec2 driver.
52  void setSec2() const;
53 
54  // Modifies this file access property list to use the H5FD_CORE
55  // driver.
56  void setCore (size_t increment, hbool_t backing_store) const;
57 
58  // Queries H5FD_CORE driver properties.
59  void getCore (size_t& increment, hbool_t& backing_store) const;
60 
61  // Sets this file access properties list to the family driver.
62  void setFamily( hsize_t memb_size, const FileAccPropList& memb_plist ) const;
63 
64  // Returns information about the family file access property list.
65  void getFamily(hsize_t& memb_size, FileAccPropList& memb_plist) const;
66  FileAccPropList getFamily(hsize_t& memb_size) const;
67 
68  // Emulates the old split file driver,
69  void setSplit(const FileAccPropList& meta_plist,
70  const FileAccPropList& raw_plist,
71  const char* meta_ext = ".meta",
72  const char* raw_ext = ".raw" ) const;
73  void setSplit(const FileAccPropList& meta_plist,
74  const FileAccPropList& raw_plist,
75  const H5std_string& meta_ext = ".meta",
76  const H5std_string& raw_ext = ".raw") const;
77  // These two overloaded functions are kept for backward compatibility
78  // only; they missed the const's and will be removed in future release.
79  void setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist,
80  const char* meta_ext=".meta", const char* raw_ext=".raw") const;
81  void setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist,
82  const H5std_string& meta_ext=".meta",
83  const H5std_string& raw_ext=".raw") const;
84 
85  // Sets the maximum size of the data sieve buffer.
86  void setSieveBufSize(size_t bufsize) const;
87 
88  // Returns the current settings for the data sieve buffer size
89  // property
90  size_t getSieveBufSize() const;
91 
92  // Sets the minimum size of metadata block allocations.
93  void setMetaBlockSize(hsize_t &block_size) const;
94 
95  // Returns the current metadata block size setting.
96  hsize_t getMetaBlockSize() const;
97 
98  // Modifies this file access property list to use the logging driver.
99  void setLog(const char *logfile, unsigned flags, size_t buf_size) const;
100  void setLog(const H5std_string& logfile, unsigned flags, size_t buf_size) const;
101 
102  // Sets alignment properties of this file access property list
103  void setAlignment( hsize_t threshold = 1, hsize_t alignment = 1 ) const;
104 
105  // Retrieves the current settings for alignment properties from
106  // this property list.
107  void getAlignment( hsize_t& threshold, hsize_t& alignment ) const;
108 
109  // Sets data type for multi driver.
110  void setMultiType(H5FD_mem_t dtype) const;
111 
112  // Returns the data type property for MULTI driver.
113  H5FD_mem_t getMultiType() const;
114 
115  // Sets the meta data cache and raw data chunk cache parameters.
116  void setCache( int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0 ) const;
117 
118  // Queries the meta data cache and raw data chunk cache parameters.
119  void getCache( int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rdcc_nbytes, double& rdcc_w0 ) const;
120 
121  // Sets the degree for the file close behavior.
122  void setFcloseDegree(H5F_close_degree_t degree);
123 
124  // Returns the degree for the file close behavior.
125  H5F_close_degree_t getFcloseDegree();
126 
127  // Sets garbage collecting references flag.
128  void setGcReferences( unsigned gc_ref = 0 ) const;
129 
130  // Returns garbage collecting references setting.
131  unsigned getGcReferences() const;
132 
133  // Sets bounds on versions of library format to be used when creating
134  // or writing objects.
135  void setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libver_high) const;
136 
137  // Gets the current settings for the library version format bounds.
138  void getLibverBounds(H5F_libver_t& libver_low, H5F_libver_t& libver_high) const;
139 
141  virtual H5std_string fromClass () const { return("FileAccPropList"); }
142 
143  // Copy constructor: creates a copy of a FileAccPropList object.
144  FileAccPropList( const FileAccPropList& original );
145 
146  // Creates a copy of an existing file access property list
147  // using the property list id.
148  FileAccPropList (const hid_t plist_id);
149 
150  // Noop destructor
151  virtual ~FileAccPropList();
152 
153 #ifndef DOXYGEN_SHOULD_SKIP_THIS
154 
155  // Deletes the global constant, should only be used by the library
156  static void deleteConstants();
157 
158  private:
159  static FileAccPropList* DEFAULT_;
160 
161  // Creates the global constant, should only be used by the library
162  static FileAccPropList* getConstant();
163 
164 #endif // DOXYGEN_SHOULD_SKIP_THIS
165 
166 };
167 #ifndef H5_NO_NAMESPACE
168 }
169 #endif
170 #endif // __H5FileAccPropList_H
Definition: H5AbstractDs.cpp:31
static const FileAccPropList & DEFAULT
Default file access property list.
Definition: H5FaccProp.h:31
Class FileAccPropList represents the HDF5 file access property list.
Definition: H5FaccProp.h:28
Class PropList provides operations for generic property lists.
Definition: H5PropList.h:25
virtual H5std_string fromClass() const
Returns this class name.
Definition: H5FaccProp.h:141


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