MISR Toolkit  1.5.1
H5PropList.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 COPYING file, which can be found at the root of the source code *
10  * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
11  * If you do not have access to either file, you may request a copy from *
12  * help@hdfgroup.org. *
13  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
14 
15 #ifndef __H5PropList_H
16 #define __H5PropList_H
17 
18 namespace H5 {
19 
21 
25 // Inheritance: IdComponent
26 class H5_DLLCPP PropList : public IdComponent {
27  public:
29  static const PropList& DEFAULT;
30 
31  // Creates a property list of a given type or creates a copy of an
32  // existing property list giving the property list id.
33  PropList(const hid_t plist_id);
34 
35  // Make a copy of the given property list using assignment statement
36  PropList& operator=(const PropList& rhs);
37 
38  // Compares this property list or class against the given list or class.
39  bool operator==(const PropList& rhs) const;
40 
41  // Close this property list.
42  virtual void close();
43 
44  // Close a property list class.
45  void closeClass() const;
46 
47  // Makes a copy of the given property list.
48  void copy(const PropList& like_plist);
49 
50  // Copies a property from this property list or class to another
51  void copyProp(PropList& dest, const char* name) const;
52  void copyProp(PropList& dest, const H5std_string& name) const;
53 
54  // Copies a property from one property list or property class to another
55  void copyProp(PropList& dest, PropList& src, const char* name) const;
56  void copyProp(PropList& dest, PropList& src, const H5std_string& name) const;
57 
58  // Gets the class of this property list, i.e. H5P_FILE_CREATE,
59  // H5P_FILE_ACCESS, ...
60  hid_t getClass() const;
61 
62  // Return the name of a generic property list class.
63  H5std_string getClassName() const;
64 
65  // Returns the parent class of a generic property class.
66  PropList getClassParent() const;
67 
68  // Returns the number of properties in this property list or class.
69  size_t getNumProps() const;
70 
71  // Query the value of a property in a property list.
72  void getProperty(const char* name, void* value) const;
73  void getProperty(const H5std_string& name, void* value) const;
74  H5std_string getProperty(const char* name) const;
75  H5std_string getProperty(const H5std_string& name) const;
76 
77  // Set a property's value in a property list.
78  void setProperty(const char* name, void* value) const;
79  void setProperty(const char* name, const char* charptr) const;
80  void setProperty(const char* name, H5std_string& strg) const;
81  void setProperty(const H5std_string& name, void* value) const;
82  void setProperty(const H5std_string& name, H5std_string& strg) const;
83 
84  // Query the size of a property in a property list or class.
85  size_t getPropSize(const char *name) const;
86  size_t getPropSize(const H5std_string& name) const;
87 
88  // Determines whether a property list is a certain class.
89  bool isAClass(const PropList& prop_class) const;
90 
92  bool propExist(const char* name) const;
93  bool propExist(const H5std_string& name) const;
94 
95  // Removes a property from a property list.
96  void removeProp(const char *name) const;
97  void removeProp(const H5std_string& name) const;
98 
100  virtual H5std_string fromClass () const { return("PropList"); }
101 
102  // Default constructor: creates a stub PropList object.
103  PropList();
104 
105  // Copy constructor: creates a copy of a PropList object.
106  PropList(const PropList& original);
107 
108  // Gets the property list id.
109  virtual hid_t getId() const;
110 
111  // Destructor: properly terminates access to this property list.
112  virtual ~PropList();
113 
114 #ifndef DOXYGEN_SHOULD_SKIP_THIS
115 
116  // Deletes the PropList global constant
117  static void deleteConstants();
118 
119  protected:
120  hid_t id; // HDF5 property list id
121 
122  // Sets the property list id.
123  virtual void p_setId(const hid_t new_id);
124 
125  private:
127 
128  // Dynamically allocates the PropList global constant
129  static PropList* getConstant();
130 
131  // Friend function to set PropList id. For library use only.
132  friend void f_PropList_setId(PropList* plist, hid_t new_id);
133 
134 #endif // DOXYGEN_SHOULD_SKIP_THIS
135 
136 }; // end of PropList
137 } // namespace H5
138 
139 #endif // __H5PropList_H
#define H5_DLLCPP
Definition: H5api_adpt.h:262
Class IdComponent provides wrappers of the C functions that operate on an HDF5 identifier.
Definition: H5IdComponent.h:27
static PropList * DEFAULT_
Definition: H5PropList.h:126
virtual H5std_string fromClass() const
Returns this class name.
Definition: H5PropList.h:100
HDFFCLIBAPI _fcd name
#define H5std_string
Definition: H5Exception.h:25
int hid_t
Definition: H5Ipublic.h:54
Class PropList provides operations for generic property lists.
Definition: H5PropList.h:26
static const PropList & DEFAULT
Default property list.
Definition: H5PropList.h:29

MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:53