My Project  1.10.11
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 
17 namespace H5 {
18 
22 // Inheritance: CommonFG/H5Object -> H5Location -> IdComponent
23 class 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
H5::Exception
Exception provides wrappers of HDF5 error handling functions.
Definition: H5Exception.h:27
H5::CommonFG
CommonFG is an abstract base class of H5Group.
Definition: H5CommonFG.h:29
H5::IdComponent::incRefCount
void incRefCount() const
Increment reference counter for the id of this object.
Definition: H5IdComponent.cpp:54
H5::Group::getObjId
hid_t getObjId(const char *name, const PropList &plist=PropList::DEFAULT) const
Opens an object via object header.
Definition: H5Group.cpp:159
H5::Group::close
virtual void close() H5_OVERRIDE
Closes this group.
Definition: H5Group.cpp:238
H5::Group::getLocId
virtual hid_t getLocId() const H5_OVERRIDE
Definition: H5Group.cpp:92
H5::Group
Class Group represents an HDF5 group.
Definition: H5Group.h:23
H5::Group::throwException
virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const H5_OVERRIDE
Throws H5::GroupIException.
Definition: H5Group.cpp:264
H5::Group::Group
Group()
Default constructor: creates a stub Group.
Definition: H5Group.cpp:48
H5::Exception::getDetailMsg
H5std_string getDetailMsg() const
Returns the detailed message set at the time the exception is thrown.
Definition: H5Exception.cpp:264
H5::Group::getNumObjs
hsize_t getNumObjs() const
Returns the number of objects in this group.
Definition: H5Group.cpp:135
H5::PropList::getId
virtual hid_t getId() const
Get the id of this property list.
Definition: H5PropList.cpp:292
H5::H5Object
Class H5Object is a bridge between H5Location and DataSet, DataType, and Group.
Definition: H5Object.h:64
H5
Definition: H5AbstractDs.cpp:33
H5::Group::fromClass
virtual H5std_string fromClass() const H5_OVERRIDE
Returns this class name.
Definition: H5Group.h:30
H5::GroupIException
Definition: H5Exception.h:95
H5::Group::closeObjId
void closeObjId(hid_t obj_id) const
Closes an object, which was opened with Group::getObjId.
Definition: H5Group.cpp:71
H5::H5Location
H5Location is an abstract base class, added in version 1.8.12.
Definition: H5Location.h:30
H5::Group::~Group
virtual ~Group() H5_OVERRIDE
Properly terminates access to this group.
Definition: H5Group.cpp:281
H5::PropList
Class PropList inherits from IdComponent and provides wrappers for the HDF5 generic property list.
Definition: H5PropList.h:24
H5::Group::getId
virtual hid_t getId() const H5_OVERRIDE
Get the id of this group.
Definition: H5Group.cpp:197


The HDF Group Help Desk:
  Copyright by The HDF Group