HDF5 C++ API  1.8.18
 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 namespace H5 {
38 
45 class H5_DLLCPP H5Object : public H5Location {
46  public:
47 #ifndef DOXYGEN_SHOULD_SKIP_THIS
48  // Gets the name of this HDF5 object, i.e., Group, DataSet, or
49  // DataType. These should have const but are retiring anyway.
50  ssize_t getObjName(char *obj_name, size_t buf_size = 0) const;
51  ssize_t getObjName(H5std_string& obj_name, size_t len = 0) const;
52  H5std_string getObjName() const;
53 
54  // Noop destructor.
55  virtual ~H5Object();
56 
57  protected:
58  // Default constructor
59  H5Object();
60 
61  // *** Deprecation warning ***
62  // The following two constructors are no longer appropriate after the
63  // data member "id" had been moved to the sub-classes.
64  // The copy constructor is a noop and is removed in 1.8.15 and the
65  // other will be removed from 1.10 release, and then from 1.8 if its
66  // removal does not raise any problems in two 1.10 releases.
67 
68  // Creates a copy of an existing object giving the object id
69  H5Object( const hid_t object_id );
70 
71  // Copy constructor: makes copy of an H5Object object.
72  // H5Object(const H5Object& original);
73 
74 #endif // DOXYGEN_SHOULD_SKIP_THIS
75 
76 }; /* end class H5Object */
77 
78 }
79 #endif // __H5Object_H
Class H5Object is a bridge between H5Location and DataSet, DataType, and Group.
Definition: H5Object.h:45
H5Location is an abstract base class, added in version 1.8.12.
Definition: H5Location.h:47
class H5_DLLCPP H5Object
Definition: H5Attribute.cpp:46


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