HDF5 C++ API  1.8.12
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
H5FaccProp.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 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( FileAccPropList& meta_plist, FileAccPropList& raw_plist,
69  const char* meta_ext = ".meta", const char* raw_ext = ".raw" ) const;
70  void setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist,
71  const H5std_string& meta_ext, const H5std_string& raw_ext ) const;
72 
73 #ifdef H5_HAVE_STREAM // for Stream Virtual File Driver
74  // Modifies this file access property list to use the Stream driver.
75  void setStream(H5FD_stream_fapl_t &fapl) const;
76 
77  // Retrieves the streaming I/O driver settings
78  H5FD_stream_fapl_t getStream() const;
79 #endif
80 
81  // Sets the maximum size of the data sieve buffer.
82  void setSieveBufSize(size_t bufsize) const;
83 
84  // Returns the current settings for the data sieve buffer size
85  // property
86  size_t getSieveBufSize() const;
87 
88  // Sets the minimum size of metadata block allocations.
89  void setMetaBlockSize(hsize_t &block_size) const;
90 
91  // Returns the current metadata block size setting.
92  hsize_t getMetaBlockSize() const;
93 
94  // Modifies this file access property list to use the logging driver.
95  void setLog(const char *logfile, unsigned flags, size_t buf_size) const;
96  void setLog(const H5std_string& logfile, unsigned flags, size_t buf_size) const;
97 
98  // Sets alignment properties of this file access property list
99  void setAlignment( hsize_t threshold = 1, hsize_t alignment = 1 ) const;
100 
101  // Retrieves the current settings for alignment properties from
102  // this property list.
103  void getAlignment( hsize_t& threshold, hsize_t& alignment ) const;
104 
105  // Sets data type for multi driver.
106  void setMultiType(H5FD_mem_t dtype) const;
107 
108  // Returns the data type property for MULTI driver.
109  H5FD_mem_t getMultiType() const;
110 
111  // Sets the meta data cache and raw data chunk cache parameters.
112  void setCache( int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0 ) const;
113 
114  // Queries the meta data cache and raw data chunk cache parameters.
115  void getCache( int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rdcc_nbytes, double& rdcc_w0 ) const;
116 
117  // Sets the degree for the file close behavior.
118  void setFcloseDegree(H5F_close_degree_t degree);
119 
120  // Returns the degree for the file close behavior.
121  H5F_close_degree_t getFcloseDegree();
122 
123  // Sets garbage collecting references flag.
124  void setGcReferences( unsigned gc_ref = 0 ) const;
125 
126  // Returns garbage collecting references setting.
127  unsigned getGcReferences() const;
128 
130  virtual H5std_string fromClass () const { return("FileAccPropList"); }
131 
132  // Copy constructor: creates a copy of a FileAccPropList object.
133  FileAccPropList( const FileAccPropList& original );
134 
135  // Creates a copy of an existing file access property list
136  // using the property list id.
137  FileAccPropList (const hid_t plist_id);
138 
139  // Noop destructor
140  virtual ~FileAccPropList();
141 };
142 #ifndef H5_NO_NAMESPACE
143 }
144 #endif
145 #endif // __H5FileAccPropList_H
static const FileAccPropList DEFAULT
Constant for default property.
Definition: H5FaccProp.h:30
Class PropList provides operations for generic property lists.
Definition: H5PropList.h:25
Class FileAccPropList represents the HDF5 file access property list.
Definition: H5FaccProp.h:28
#define H5std_string
Definition: H5Exception.h:29
virtual H5std_string fromClass() const
Returns this class name.
Definition: H5FaccProp.h:130