HDF5 C++ API  1.8.13
 All Classes Namespaces Functions Variables Typedefs 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  // Copy constructor: makes copy of an H5Object object.
51  H5Object(const H5Object& original);
52 
53  // Gets the name of this HDF5 object, i.e., Group, DataSet, or
54  // DataType.
55  ssize_t getObjName(char *obj_name, size_t buf_size = 0) const;
56  ssize_t getObjName(H5std_string& obj_name, size_t len = 0) const;
57  H5std_string getObjName() const;
58 
59  // Noop destructor.
60  virtual ~H5Object();
61 
62  protected:
63  // Default constructor
64  H5Object();
65 
66  // Creates a copy of an existing object giving the object id
67  H5Object( const hid_t object_id );
68 
69 #endif // DOXYGEN_SHOULD_SKIP_THIS
70 
71 }; /* end class H5Object */
72 
73 #ifndef H5_NO_NAMESPACE
74 }
75 #endif
76 #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:50
class H5_DLLCPP H5Object
Definition: H5Attribute.cpp:47