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


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