HDF5 C++ API  1.8.17
 All Classes Namespaces Functions Variables Typedefs Friends Pages
H5Object.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 files COPYING and Copyright.html. COPYING can be found at the root *
10  * of the source code distribution tree; Copyright.html can be found at the *
11  * root level of an installed copy of the electronic HDF5 document set and *
12  * is linked from the top-level documents page. It can also be found at *
13  * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
14  * access to either file, you may request a copy from help@hdfgroup.org. *
15  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
16 
17 #ifndef __H5Object_H
18 #define __H5Object_H
19 
20 #include "H5Location.h"
21 #include "H5Classes.h" // constains forward class declarations
22 
23 // H5Object is a baseclass. It has these subclasses:
24 // Group, DataSet, and DataType.
25 // DataType, in turn, has several specific datatypes as subclasses.
26 // Modification:
27 // Sept 18, 2012: Added class H5Location in between IdComponent and
28 // H5Object. An H5File now inherits from H5Location. All HDF5
29 // wrappers in H5Object are moved up to H5Location. H5Object
30 // is left mostly empty for future wrappers that are only for
31 // group, dataset, and named datatype. Note that the reason for
32 // adding H5Location instead of simply moving H5File to be under
33 // H5Object is H5File is not an HDF5 object, and renaming H5Object
34 // to H5Location will risk breaking user applications.
35 // -BMR
36 // Apr 2, 2014: Added wrapper getObjName for H5Iget_name
37 #ifndef H5_NO_NAMESPACE
38 namespace H5 {
39 #endif
40 
47 class H5_DLLCPP H5Object : public H5Location {
48  public:
49 #ifndef DOXYGEN_SHOULD_SKIP_THIS
50  // Gets the name of this HDF5 object, i.e., Group, DataSet, or
51  // DataType.
52  ssize_t getObjName(char *obj_name, size_t buf_size = 0) const;
53  ssize_t getObjName(H5std_string& obj_name, size_t len = 0) const;
54  H5std_string getObjName() const;
55 
56  // Noop destructor.
57  virtual ~H5Object();
58 
59  protected:
60  // Default constructor
61  H5Object();
62 
63  // *** Deprecation warning ***
64  // The following two constructors are no longer appropriate after the
65  // data member "id" had been moved to the sub-classes.
66  // The copy constructor is a noop and is removed in 1.8.15 and the
67  // other will be removed from 1.10 release, and then from 1.8 if its
68  // removal does not raise any problems in two 1.10 releases.
69 
70  // Creates a copy of an existing object giving the object id
71  H5Object( const hid_t object_id );
72 
73  // Copy constructor: makes copy of an H5Object object.
74  // H5Object(const H5Object& original);
75 
76 #endif // DOXYGEN_SHOULD_SKIP_THIS
77 
78 }; /* end class H5Object */
79 
80 #ifndef H5_NO_NAMESPACE
81 }
82 #endif
83 #endif // __H5Object_H
Class H5Object is a bridge between H5Location and DataSet, DataType, and Group.
Definition: H5Object.h:47
H5Location is an abstract base class, added in version 1.8.12.
Definition: H5Location.h:49
class H5_DLLCPP H5Object
Definition: H5Attribute.cpp:48


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