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


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