HDF5 C++ API  1.8.13
 All Classes Namespaces Functions Variables Typedefs Pages
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:
30  static const FileAccPropList DEFAULT;
31 
32  // Creates a file access property list.
34 
35  // Modifies this property list to use the H5FD_STDIO driver
36  void setStdio() const;
37 
38  // Set file driver for this property list
39  void setDriver(hid_t new_driver_id, const void *new_driver_info) const;
40 
41  // Returns a low-level file driver identifier.
42  hid_t getDriver() const;
43 
44  // Sets offset for family driver.
45  void setFamilyOffset(hsize_t offset) const;
46 
47  // Gets offset for family driver.
48  hsize_t getFamilyOffset() const;
49 
50  // Modifies this file access property list to use the sec2 driver.
51  void setSec2() const;
52 
53  // Modifies this file access property list to use the H5FD_CORE
54  // driver.
55  void setCore (size_t increment, hbool_t backing_store) const;
56 
57  // Queries H5FD_CORE driver properties.
58  void getCore (size_t& increment, hbool_t& backing_store) const;
59 
60  // Sets this file access properties list to the family driver.
61  void setFamily( hsize_t memb_size, const FileAccPropList& memb_plist ) const;
62 
63  // Returns information about the family file access property list.
64  void getFamily(hsize_t& memb_size, FileAccPropList& memb_plist) const;
65  FileAccPropList getFamily(hsize_t& memb_size) const;
66 
67  // Emulates the old split file driver,
68  void setSplit(const FileAccPropList& meta_plist,
69  const FileAccPropList& raw_plist,
70  const char* meta_ext = ".meta",
71  const char* raw_ext = ".raw" ) const;
72  void setSplit(const FileAccPropList& meta_plist,
73  const FileAccPropList& raw_plist,
74  const H5std_string& meta_ext = ".meta",
75  const H5std_string& raw_ext = ".raw") const;
76  // These two overloaded functions are kept for backward compatibility
77  // only; they missed the const's and will be removed in future release.
78  void setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist,
79  const char* meta_ext=".meta", const char* raw_ext=".raw") const;
80  void setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist,
81  const H5std_string& meta_ext=".meta",
82  const H5std_string& raw_ext=".raw") const;
83 
84  // Sets the maximum size of the data sieve buffer.
85  void setSieveBufSize(size_t bufsize) const;
86 
87  // Returns the current settings for the data sieve buffer size
88  // property
89  size_t getSieveBufSize() const;
90 
91  // Sets the minimum size of metadata block allocations.
92  void setMetaBlockSize(hsize_t &block_size) const;
93 
94  // Returns the current metadata block size setting.
95  hsize_t getMetaBlockSize() const;
96 
97  // Modifies this file access property list to use the logging driver.
98  void setLog(const char *logfile, unsigned flags, size_t buf_size) const;
99  void setLog(const H5std_string& logfile, unsigned flags, size_t buf_size) const;
100 
101  // Sets alignment properties of this file access property list
102  void setAlignment( hsize_t threshold = 1, hsize_t alignment = 1 ) const;
103 
104  // Retrieves the current settings for alignment properties from
105  // this property list.
106  void getAlignment( hsize_t& threshold, hsize_t& alignment ) const;
107 
108  // Sets data type for multi driver.
109  void setMultiType(H5FD_mem_t dtype) const;
110 
111  // Returns the data type property for MULTI driver.
112  H5FD_mem_t getMultiType() const;
113 
114  // Sets the meta data cache and raw data chunk cache parameters.
115  void setCache( int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0 ) const;
116 
117  // Queries the meta data cache and raw data chunk cache parameters.
118  void getCache( int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rdcc_nbytes, double& rdcc_w0 ) const;
119 
120  // Sets the degree for the file close behavior.
121  void setFcloseDegree(H5F_close_degree_t degree);
122 
123  // Returns the degree for the file close behavior.
124  H5F_close_degree_t getFcloseDegree();
125 
126  // Sets garbage collecting references flag.
127  void setGcReferences( unsigned gc_ref = 0 ) const;
128 
129  // Returns garbage collecting references setting.
130  unsigned getGcReferences() const;
131 
133  virtual H5std_string fromClass () const { return("FileAccPropList"); }
134 
135  // Copy constructor: creates a copy of a FileAccPropList object.
136  FileAccPropList( const FileAccPropList& original );
137 
138  // Creates a copy of an existing file access property list
139  // using the property list id.
140  FileAccPropList (const hid_t plist_id);
141 
142  // Noop destructor
143  virtual ~FileAccPropList();
144 };
145 #ifndef H5_NO_NAMESPACE
146 }
147 #endif
148 #endif // __H5FileAccPropList_H
Definition: H5AbstractDs.cpp:29
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:133
static const FileAccPropList DEFAULT
Constant for default property.
Definition: H5FaccProp.h:30