My Project 1.10.10
Loading...
Searching...
No Matches
H5Group.h
1// C++ informative line for the emacs editor: -*- C++ -*-
2/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3 * Copyright by The HDF Group. *
4 * All rights reserved. *
5 * *
6 * This file is part of HDF5. The full HDF5 copyright notice, including *
7 * terms governing use, modification, and redistribution, is contained in *
8 * the COPYING file, which can be found at the root of the source code *
9 * distribution tree, or in https://www.hdfgroup.org/licenses. *
10 * If you do not have access to either file, you may request a copy from *
11 * help@hdfgroup.org. *
12 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13
14#ifndef H5Group_H
15#define H5Group_H
16
17namespace H5 {
18
22// Inheritance: CommonFG/H5Object -> H5Location -> IdComponent
23class H5_DLLCPP Group : public H5Object, public CommonFG {
24 public:
25 // Close this group.
26 virtual void close() H5_OVERRIDE;
27
29 virtual H5std_string
30 fromClass() const H5_OVERRIDE
31 {
32 return ("Group");
33 }
34
35 // Throw group exception.
36 virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const H5_OVERRIDE;
37
38 // for CommonFG to get the file id.
39 virtual hid_t getLocId() const H5_OVERRIDE;
40
41 // Creates a group by way of dereference.
42 Group(const H5Location &loc, const void *ref, H5R_type_t ref_type = H5R_OBJECT,
43 const PropList &plist = PropList::DEFAULT);
44 // Removed in 1.10.1, because H5Location is baseclass
45 // Group(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList&
46 // plist = PropList::DEFAULT);
47
48 // Returns the number of objects in this group.
49 hsize_t getNumObjs() const;
50
51 // Opens an object within a group or a file, i.e., root group.
52 hid_t getObjId(const char *name, const PropList &plist = PropList::DEFAULT) const;
53 hid_t getObjId(const H5std_string &name, const PropList &plist = PropList::DEFAULT) const;
54
55 // Closes an object opened by getObjId().
56 void closeObjId(hid_t obj_id) const;
57
58 // default constructor
59 Group();
60
61 // Copy constructor: same as the original Group.
62 Group(const Group &original);
63
64 // Gets the group id.
65 virtual hid_t getId() const H5_OVERRIDE;
66
67 // Destructor
68 virtual ~Group() H5_OVERRIDE;
69
70 // Creates a copy of an existing group using its id.
71 Group(const hid_t group_id);
72
73 protected:
74#ifndef DOXYGEN_SHOULD_SKIP_THIS
75 // Sets the group id.
76 virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
77#endif // DOXYGEN_SHOULD_SKIP_THIS
78
79 private:
80 hid_t id; // HDF5 group id
81
82}; // end of Group
83} // namespace H5
84
85#endif // H5Group_H
CommonFG is an abstract base class of H5Group.
Definition H5CommonFG.h:29
Class Group represents an HDF5 group.
Definition H5Group.h:23
virtual H5std_string fromClass() const H5_OVERRIDE
Returns this class name.
Definition H5Group.h:30
H5Location is an abstract base class, added in version 1.8.12.
Definition H5Location.h:30
Class H5Object is a bridge between H5Location and DataSet, DataType, and Group.
Definition H5Object.h:64
Class PropList inherits from IdComponent and provides wrappers for the HDF5 generic property list.
Definition H5PropList.h:24
Definition H5AbstractDs.cpp:33


The HDF Group Help Desk:
  Copyright by The HDF Group