MISR Toolkit  1.5.1
H5CommonFG.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 __CommonFG_H
16 #define __CommonFG_H
17 
18 namespace H5 {
19 
26 class ArrayType;
27 class VarLenType;
28 
30  public:
31  // Creates a new group at this location which can be a file
32  // or another group.
33  Group createGroup(const char* name, size_t size_hint = 0, const LinkCreatPropList& lc_plist = LinkCreatPropList::DEFAULT) const;
34  Group createGroup(const H5std_string& name, size_t size_hint = 0, const LinkCreatPropList& lc_plist = LinkCreatPropList::DEFAULT) const;
35 
36  // Opens an existing group in a location which can be a file
37  // or another group.
38  Group openGroup(const char* name) const;
39  Group openGroup(const H5std_string& name) const;
40 
41  // Creates a new dataset at this location.
42  DataSet createDataSet(const char* name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT) const;
43  DataSet createDataSet(const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist = DSetCreatPropList::DEFAULT) const;
44 
45  // Opens an existing dataset at this location.
46  DataSet openDataSet(const char* name) const;
47  DataSet openDataSet(const H5std_string& name) const;
48 
49  // Returns the value of a symbolic link.
50  // Moved to H5Location in 1.8.21.
51  //H5std_string getLinkval(const char* link_name, size_t size=0) const;
52  //H5std_string getLinkval(const H5std_string& link_name, size_t size=0) const;
53 
54  // Returns the number of objects in this group.
55  hsize_t getNumObjs() const;
56 
57  // Retrieves the name of an object in this group, given the
58  // object's index.
59  H5std_string getObjnameByIdx(hsize_t idx) const;
60  ssize_t getObjnameByIdx(hsize_t idx, char* name, size_t size) const;
61  ssize_t getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) const;
62 
63  // Retrieves the type of an object in this file or group, given the
64  // object's name
65  H5O_type_t childObjType(const H5std_string& objname) const;
66  H5O_type_t childObjType(const char* objname) const;
67  H5O_type_t childObjType(hsize_t index, H5_index_t index_type=H5_INDEX_NAME, H5_iter_order_t order=H5_ITER_INC, const char* objname=".") const;
68 
69  // Returns the object header version of an object in this file or group,
70  // given the object's name.
71  unsigned childObjVersion(const char* objname) const;
72  unsigned childObjVersion(const H5std_string& objname) const;
73 
74 #ifndef H5_NO_DEPRECATED_SYMBOLS
75  // Returns the type of an object in this group, given the
76  // object's index.
77  H5G_obj_t getObjTypeByIdx(hsize_t idx) const;
78  H5G_obj_t getObjTypeByIdx(hsize_t idx, char* type_name) const;
79  H5G_obj_t getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const;
80 
81  // Returns information about an HDF5 object, given by its name,
82  // at this location.
83  void getObjinfo(const char* name, hbool_t follow_link, H5G_stat_t& statbuf) const;
84  void getObjinfo(const H5std_string& name, hbool_t follow_link, H5G_stat_t& statbuf) const;
85  void getObjinfo(const char* name, H5G_stat_t& statbuf) const;
86  void getObjinfo(const H5std_string& name, H5G_stat_t& statbuf) const;
87 
88  // Iterates over the elements of this group - not implemented in
89  // C++ style yet.
90  int iterateElems(const char* name, int *idx, H5G_iterate_t op, void *op_data);
91  int iterateElems(const H5std_string& name, int *idx, H5G_iterate_t op, void *op_data);
92 #endif /* H5_NO_DEPRECATED_SYMBOLS */
93 
94  // Creates a link of the specified type from new_name to current_name;
95  // both names are interpreted relative to the specified location id.
96  // Deprecated in favor of H5Location::link overloaded (1.8.21)
97  void link(H5L_type_t link_type, const char* curr_name, const char* new_name) const;
98  void link(H5L_type_t link_type, const H5std_string& curr_name, const H5std_string& new_name) const;
99 
100  // Removes the specified name at this location.
101  // Deprecated in favor of H5Location::unlink overloaded (1.8.21)
102  // These functions can be removed immediately because their replacements
103  // have a default argument out of two.
104  //void unlink(const char* name) const;
105  //void unlink(const H5std_string& name) const;
106 
107  // Mounts the file 'child' onto this location.
108  void mount(const char* name, const H5File& child, const PropList& plist) const;
109  void mount(const H5std_string& name, const H5File& child, const PropList& plist) const;
110 
111  // Unmounts the file named 'name' from this parent location.
112  void unmount(const char* name) const;
113  void unmount(const H5std_string& name) const;
114 
115  // Renames an object at this location.
116  // Deprecated in favor of H5Location::moveLink (1.8.21)
117  void move(const char* src, const char* dst) const;
118  void move(const H5std_string& src, const H5std_string& dst) const;
119 
120  // Opens a generic named datatype in this location.
121  DataType openDataType(const char* name) const;
122  DataType openDataType(const H5std_string& name) const;
123 
124  // Opens a named array datatype in this location.
125  ArrayType openArrayType(const char* name) const;
126  ArrayType openArrayType(const H5std_string& name) const;
127 
128  // Opens a named compound datatype in this location.
129  CompType openCompType(const char* name) const;
130  CompType openCompType(const H5std_string& name) const;
131 
132  // Opens a named enumeration datatype in this location.
133  EnumType openEnumType(const char* name) const;
134  EnumType openEnumType(const H5std_string& name) const;
135 
136  // Opens a named integer datatype in this location.
137  IntType openIntType(const char* name) const;
138  IntType openIntType(const H5std_string& name) const;
139 
140  // Opens a named floating-point datatype in this location.
141  FloatType openFloatType(const char* name) const;
142  FloatType openFloatType(const H5std_string& name) const;
143 
144  // Opens a named string datatype in this location.
145  StrType openStrType(const char* name) const;
146  StrType openStrType(const H5std_string& name) const;
147 
148  // Opens a named variable length datatype in this location.
149  VarLenType openVarLenType(const char* name) const;
150  VarLenType openVarLenType(const H5std_string& name) const;
151 
152 #ifndef DOXYGEN_SHOULD_SKIP_THIS
153  virtual hid_t getLocId() const = 0;
156 
157 
159  virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const = 0;
160 
161  // Default constructor.
162  CommonFG();
163 
164  // Noop destructor.
165  virtual ~CommonFG();
166 
167  protected:
168  virtual void p_setId(const hid_t new_id) = 0;
169 
170 #endif // DOXYGEN_SHOULD_SKIP_THIS
171 
172 }; // end of CommonFG
173 } // namespace H5
174 
175 #endif // __CommonFG_H
#define H5_DLLCPP
Definition: H5api_adpt.h:262
Class Group represents an HDF5 group.
Definition: H5Group.h:24
unsigned int hbool_t
Definition: H5public.h:142
HDFFCLIBAPI intf * idx
H5_index_t
Definition: H5public.h:305
EnumType is a derivative of a DataType and operates on HDF5 enum datatypes.
Definition: H5EnumType.h:25
long long ssize_t
Definition: H5public.h:156
Class DataSpace inherits from IdComponent and provides wrappers for the HDF5's dataspaces.
Definition: H5DataSpace.h:25
IntType is a derivative of a DataType and operates on HDF5 integer datatype.
Definition: H5IntType.h:27
Class DSetCreatPropList inherits from ObjCreatPropList and provides wrappers for the HDF5 dataset cre...
Definition: H5DcreatProp.h:28
Class DataType provides generic operations on HDF5 datatypes.
Definition: H5DataType.h:28
unsigned long long hsize_t
Definition: H5public.h:169
VarLenType is a derivative of a DataType and operates on HDF5 C's Variable-length Datatypes...
Definition: H5VarLenType.h:25
H5O_type_t
Definition: H5Opublic.h:81
Class DataSet operates on HDF5 datasets.
Definition: H5DataSet.h:28
Class ArrayType inherits from DataType and provides wrappers for the HDF5's Array Datatypes...
Definition: H5ArrayType.h:25
HDFFCLIBAPI _fcd name
#define H5std_string
Definition: H5Exception.h:25
H5_iter_order_t
Definition: H5public.h:284
HDFFCLIBAPI _fcd intf intf * order
HDFFCLIBAPI intf * size
int hid_t
Definition: H5Ipublic.h:54
herr_t(* H5G_iterate_t)(hid_t group, const char *name, void *op_data)
Definition: H5Gpublic.h:130
Class PropList provides operations for generic property lists.
Definition: H5PropList.h:26
FloatType is a derivative of a DataType and operates on HDF5 floating point datatype.
Definition: H5FloatType.h:25
static const DSetCreatPropList & DEFAULT
Default dataset creation property list.
Definition: H5DcreatProp.h:31
H5L_type_t
Definition: H5Lpublic.h:62
Class H5File represents an HDF5 file.
Definition: H5File.h:30
StrType is a derivative of a DataType and operates on HDF5 string datatype.
Definition: H5StrType.h:25
H5G_obj_t
Definition: H5Gpublic.h:117
HDFFCLIBAPI intf * index
CompType is a derivative of a DataType and operates on HDF5 compound datatypes.
Definition: H5CompType.h:29
CommonFG is an abstract base class of H5File and H5Group.
Definition: H5CommonFG.h:29

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