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


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