MISR Toolkit  1.5.1
H5Object.h
Go to the documentation of this file.
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 __H5Object_H
16 #define __H5Object_H
17 
18 namespace H5 {
19 
35 // Inheritance: H5Location -> IdComponent
36 
37 class H5_DLLCPP H5Object : public H5Location {
38  public:
39  // Creates an attribute for the specified object
40  // PropList is currently not used, so always be default.
41  Attribute createAttribute(const char* name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT) const;
42  Attribute createAttribute(const H5std_string& name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT) const;
43 
44  // Given its name, opens the attribute that belongs to this object.
45  Attribute openAttribute(const char* name) const;
46  Attribute openAttribute(const H5std_string& name) const;
47 
48  // Given its index, opens the attribute that belongs to this object.
49  Attribute openAttribute(const unsigned int idx) const;
50 
51  // Determines the number of attributes belong to this object.
52  int getNumAttrs() const;
53 
54  // Checks whether the named attribute exists for this object.
55  bool attrExists(const char* name) const;
56  bool attrExists(const H5std_string& name) const;
57 
58  // Renames the named attribute of this object to a new name.
59  void renameAttr(const char* oldname, const char* newname) const;
60  void renameAttr(const H5std_string& oldname, const H5std_string& newname) const;
61 
62  // Removes the named attribute from this object.
63  void removeAttr(const char* name) const;
64  void removeAttr(const H5std_string& name) const;
65 
66  // Gets the name of this HDF5 object, i.e., Group, DataSet, or
67  // DataType.
68  ssize_t getObjName(char *obj_name, size_t buf_size = 0) const;
69  ssize_t getObjName(H5std_string& obj_name, size_t len = 0) const;
70  H5std_string getObjName() const;
71 
72 #ifndef DOXYGEN_SHOULD_SKIP_THIS
73  // Noop destructor.
74  virtual ~H5Object();
75 
76  protected:
77  // Default constructor
78  H5Object();
79 
80  // *** Deprecation warning ***
81  // The following two constructors are no longer appropriate after the
82  // data member "id" had been moved to the sub-classes.
83  // The copy constructor is a noop and is removed in 1.8.15 and the
84  // other will be removed from 1.10 release, and then from 1.8 if its
85  // removal does not raise any problems in two 1.10 releases.
86 
87  // Creates a copy of an existing object giving the object id
88  // H5Object(const hid_t object_id);
89 
90  // Copy constructor: makes copy of an H5Object object.
91  // H5Object(const H5Object& original);
92 
93 #endif // DOXYGEN_SHOULD_SKIP_THIS
94 
95 }; // end of H5Object
96 } // namespace H5
97 
98 #endif // __H5Object_H
#define H5_DLLCPP
Definition: H5api_adpt.h:262
HDFFCLIBAPI intf * len
HDFFCLIBAPI intf * idx
long long ssize_t
Definition: H5public.h:156
Class DataSpace inherits from IdComponent and provides wrappers for the HDF5's dataspaces.
Definition: H5DataSpace.h:25
Class Attribute operates on HDF5 attributes.
Definition: H5Attribute.h:29
Class DataType provides generic operations on HDF5 datatypes.
Definition: H5DataType.h:28
Class H5Object is a bridge between H5Location and DataSet, DataType, and Group.
Definition: H5Object.h:37
H5Location is an abstract base class, providing a collection of wrappers of the C functions that take...
Definition: H5Location.h:42
HDFFCLIBAPI _fcd name
#define H5std_string
Definition: H5Exception.h:25
Class PropList provides operations for generic property lists.
Definition: H5PropList.h:26
static const PropList & DEFAULT
Default property list.
Definition: H5PropList.h:29
HDFFCLIBAPI intf intf intf * type

MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:52