All Classes Namespaces Functions Variables Typedefs Friends Pages
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://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 __Group_H
16 #define __Group_H
17 
18 namespace H5 {
19 
23 // Inheritance: CommonFG/H5Object -> H5Location -> IdComponent
24 class H5_DLLCPP Group : public H5Object, public CommonFG {
25  public:
26  // Close this group.
27  virtual void close();
28 
30  virtual H5std_string fromClass () const { return("Group"); }
31 
32  // Throw group exception.
33  virtual void throwException(const H5std_string& func_name, const H5std_string& msg) const;
34 
35  // for CommonFG to get the file id.
36  virtual hid_t getLocId() const;
37 
38  // Creates a group by way of dereference.
39  Group(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
40  // Removed in 1.10.1, because H5Location is baseclass
41 // Group(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
42 
43  // Returns the number of objects in this group.
44  hsize_t getNumObjs() const;
45 
46  // Opens an object within a group or a file, i.e., root group.
47  hid_t getObjId(const char* name, const PropList& plist = PropList::DEFAULT) const;
48  hid_t getObjId(const H5std_string& name, const PropList& plist = PropList::DEFAULT) const;
49 
50  // Closes an object opened by getObjId().
51  void closeObjId(hid_t obj_id) const;
52 
53  // default constructor
54  Group();
55 
56  // Copy constructor: same as the original Group.
57  Group(const Group& original);
58 
59  // Gets the group id.
60  virtual hid_t getId() const;
61 
62  // Destructor
63  virtual ~Group();
64 
65  // Creates a copy of an existing group using its id.
66  Group(const hid_t group_id);
67 
68  protected:
69 #ifndef DOXYGEN_SHOULD_SKIP_THIS
70  // Sets the group id.
71  virtual void p_setId(const hid_t new_id);
72 #endif // DOXYGEN_SHOULD_SKIP_THIS
73 
74  private:
75  hid_t id; // HDF5 group id
76 
77 }; // end of Group
78 } // namespace H5
79 
80 #endif // __Group_H
Class Group represents an HDF5 group.
Definition: H5Group.h:24
virtual H5std_string fromClass() const
Returns this class name.
Definition: H5Group.h:30
Class H5Object is a bridge between H5Location and DataSet, DataType, and Group.
Definition: H5Object.h:69
H5Location is an abstract base class, added in version 1.8.12.
Definition: H5Location.h:31
Class PropList inherits from IdComponent and provides wrappers for the HDF5 generic property list...
Definition: H5PropList.h:25
static const PropList & DEFAULT
Default property list.
Definition: H5PropList.h:28
CommonFG is an abstract base class of H5Group.
Definition: H5CommonFG.h:30


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