My Project  1.10.8
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 COPYING file, which can be found at the root of the source code *
10  * distribution tree, or in https://www.hdfgroup.org/licenses. *
11  * If you do not have access to either file, you may request a copy from *
12  * help@hdfgroup.org. *
13  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
14 
15 #ifndef H5FileAccPropList_H
16 #define H5FileAccPropList_H
17 
18 namespace H5 {
19 
24 // Inheritance: PropList -> IdComponent
25 class H5_DLLCPP FileAccPropList : public PropList {
26  public:
28  static const FileAccPropList &DEFAULT;
29 
30  // Creates a file access property list.
32 
33  // Modifies this property list to use the H5FD_STDIO driver
34  void setStdio() const;
35 
36  // Set file driver for this property list
37  void setDriver(hid_t new_driver_id, const void *new_driver_info) const;
38 
39  // Returns a low-level file driver identifier.
40  hid_t getDriver() const;
41 
42  // Sets offset for family driver.
43  void setFamilyOffset(hsize_t offset) const;
44 
45  // Gets offset for family driver.
46  hsize_t getFamilyOffset() const;
47 
48  // Modifies this file access property list to use the sec2 driver.
49  void setSec2() const;
50 
51  // Modifies this file access property list to use the H5FD_CORE
52  // driver.
53  void setCore(size_t increment, hbool_t backing_store) const;
54 
55  // Queries H5FD_CORE driver properties.
56  void getCore(size_t &increment, hbool_t &backing_store) const;
57 
58  // Sets this file access properties list to the family driver.
59  void setFamily(hsize_t memb_size, const FileAccPropList &memb_plist) const;
60 
61  // Returns information about the family file access property list.
62  void getFamily(hsize_t &memb_size, FileAccPropList &memb_plist) const;
63  FileAccPropList getFamily(hsize_t &memb_size) const;
64 
65  // Emulates the old split file driver,
66  void setSplit(const FileAccPropList &meta_plist, const FileAccPropList &raw_plist,
67  const char *meta_ext = ".meta", const char *raw_ext = ".raw") const;
68  void setSplit(const FileAccPropList &meta_plist, const FileAccPropList &raw_plist,
69  const H5std_string &meta_ext = ".meta", const H5std_string &raw_ext = ".raw") const;
70 
71  // Sets the maximum size of the data sieve buffer.
72  void setSieveBufSize(size_t bufsize) const;
73 
74  // Returns the current settings for the data sieve buffer size
75  // property
76  size_t getSieveBufSize() const;
77 
78  // Sets the minimum size of metadata block allocations.
79  void setMetaBlockSize(hsize_t &block_size) const;
80 
81  // Returns the current metadata block size setting.
82  hsize_t getMetaBlockSize() const;
83 
84  // Modifies this file access property list to use the logging driver.
85  void setLog(const char *logfile, unsigned flags, size_t buf_size) const;
86  void setLog(const H5std_string &logfile, unsigned flags, size_t buf_size) const;
87 
88  // Sets alignment properties of this file access property list
89  void setAlignment(hsize_t threshold = 1, hsize_t alignment = 1) const;
90 
91  // Retrieves the current settings for alignment properties from
92  // this property list.
93  void getAlignment(hsize_t &threshold, hsize_t &alignment) const;
94 
95  // Sets data type for multi driver.
96  void setMultiType(H5FD_mem_t dtype) const;
97 
98  // Returns the data type property for MULTI driver.
99  H5FD_mem_t getMultiType() const;
100 
101  // Sets the meta data cache and raw data chunk cache parameters.
102  void setCache(int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0) const;
103 
104  // Queries the meta data cache and raw data chunk cache parameters.
105  void getCache(int &mdc_nelmts, size_t &rdcc_nelmts, size_t &rdcc_nbytes, double &rdcc_w0) const;
106 
107  // Sets the degree for the file close behavior.
108  void setFcloseDegree(H5F_close_degree_t degree) const;
109 
110  // Returns the degree for the file close behavior.
111  H5F_close_degree_t getFcloseDegree() const;
112 
113  // Sets file access property list to use the H5FD_DIRECT driver.
114  void setFileAccDirect(size_t boundary, size_t block_size, size_t cbuf_size) const;
115 
116  // Retrieves information about the direct file access property list.
117  void getFileAccDirect(size_t &boundary, size_t &block_size, size_t &cbuf_size) const;
118 
119  // Sets garbage collecting references flag.
120  void setGcReferences(unsigned gc_ref = 0) const;
121 
122  // Returns garbage collecting references setting.
123  unsigned getGcReferences() const;
124 
125  // Sets file locking parameters.
126  void setFileLocking(hbool_t use_file_locking, hbool_t ignore_when_disabled) const;
127 
128  // Gets file locking parameters.
129  void getFileLocking(hbool_t &use_file_locking, hbool_t &ignore_when_disabled) const;
130 
131  // Sets bounds on versions of library format to be used when creating
132  // or writing objects.
133  void setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libver_high) const;
134 
135  // Gets the current settings for the library version format bounds.
136  void getLibverBounds(H5F_libver_t &libver_low, H5F_libver_t &libver_high) const;
137 
139  virtual H5std_string
140  fromClass() const
141  {
142  return ("FileAccPropList");
143  }
144 
145  // Copy constructor: same as the original FileAccPropList.
146  FileAccPropList(const FileAccPropList &original);
147 
148  // Creates a copy of an existing file access property list
149  // using the property list id.
150  FileAccPropList(const hid_t plist_id);
151 
152  // Noop destructor
153  virtual ~FileAccPropList();
154 
155 #ifndef DOXYGEN_SHOULD_SKIP_THIS
156 
157  // Deletes the global constant, should only be used by the library
158  static void deleteConstants();
159 
160  private:
161  static FileAccPropList *DEFAULT_;
162 
163  // Creates the global constant, should only be used by the library
164  static FileAccPropList *getConstant();
165 
166 #endif // DOXYGEN_SHOULD_SKIP_THIS
167 
168 }; // end of FileAccPropList
169 } // namespace H5
170 
171 #endif // H5FileAccPropList_H
Class FileAccPropList inherits from PropList and provides wrappers for the HDF5 file access property ...
Definition: H5FaccProp.h:25
static const FileAccPropList & DEFAULT
Default file access property list.
Definition: H5FaccProp.h:28
void setFileAccDirect(size_t boundary, size_t block_size, size_t cbuf_size) const
virtual H5std_string fromClass() const
Returns this class name.
Definition: H5FaccProp.h:140
void getFileAccDirect(size_t &boundary, size_t &block_size, size_t &cbuf_size) const
Class PropList inherits from IdComponent and provides wrappers for the HDF5 generic property list.
Definition: H5PropList.h:25
Definition: H5AbstractDs.cpp:34


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