HDF5 C++ API  1.8.20
 All Classes Namespaces Functions Variables Typedefs Friends Pages
H5AbstractDs.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 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 __AbstractDs_H
16 #define __AbstractDs_H
17 
18 namespace H5 {
19 
28 class DataType;
29 class ArrayType;
30 class IntType;
31 class FloatType;
32 class StrType;
33 class CompType;
34 class EnumType;
35 class VarLenType;
36 class DataSpace;
37 
38 class H5_DLLCPP AbstractDs {
39  public:
40  // Gets a copy the datatype of that this abstract dataset uses.
41  // Note that this datatype is a generic one and can only be accessed
42  // via generic member functions, i.e., member functions belong
43  // to DataType. To get specific datatype, i.e. EnumType, FloatType,
44  // etc..., use the specific functions, that follow, instead.
45  DataType getDataType() const;
46 
47  // Gets a copy of the specific datatype of this abstract dataset.
48  ArrayType getArrayType() const;
49  CompType getCompType() const;
50  EnumType getEnumType() const;
51  IntType getIntType() const;
52  FloatType getFloatType() const;
53  StrType getStrType() const;
54  VarLenType getVarLenType() const;
55 
57  virtual size_t getInMemDataSize() const = 0;
58 
60  virtual DataSpace getSpace() const = 0;
61 
62  // Gets the class of the datatype that is used by this abstract
63  // dataset.
64  H5T_class_t getTypeClass() const;
65 
67  virtual hsize_t getStorageSize() const = 0;
68 
69  // Returns this class name - pure virtual.
70  virtual H5std_string fromClass() const = 0;
71 
72  // Destructor
73  virtual ~AbstractDs();
74 
75  protected:
76  // Default constructor
77  AbstractDs();
78 
79  // *** Deprecation warning ***
80  // The following two constructors are no longer appropriate after the
81  // data member "id" had been moved to the sub-classes.
82  // The copy constructor is a noop and is removed in 1.8.15 and the
83  // other will be removed from 1.10 release, and then from 1.8 if its
84  // removal does not raise any problems in two 1.10 releases.
85 
86  // Mar 2016 -BMR, AbstractDs(const hid_t h5_id);
87 
88  // Copy constructor
89  // AbstractDs(const AbstractDs& original);
90 
91  private:
92  // This member function is implemented by DataSet and Attribute - pure virtual.
93  virtual hid_t p_get_type() const = 0;
94 
95 }; // end of AbstractDs
96 } // namespace H5
97 
98 #endif // __AbstractDs_H
EnumType is a derivative of a DataType and operates on HDF5 enum datatypes.
Definition: H5EnumType.h:25
Class DataSpace inherits from IdComponent and provides wrappers for the HDF5's dataspaces.
Definition: H5DataSpace.h:25
IntType is a derivative of a DataType and operates on HDF5 integer datatype.
Definition: H5IntType.h:27
Class DataType provides generic operations on HDF5 datatypes.
Definition: H5DataType.h:28
VarLenType is a derivative of a DataType and operates on HDF5 C's Variable-length Datatypes...
Definition: H5VarLenType.h:25
AbstractDs is an abstract base class, inherited by Attribute and DataSet.
Definition: H5AbstractDs.h:38
Class ArrayType inherits from DataType and provides wrappers for the HDF5's Array Datatypes...
Definition: H5ArrayType.h:25
FloatType is a derivative of a DataType and operates on HDF5 floating point datatype.
Definition: H5FloatType.h:25
StrType is a derivative of a DataType and operates on HDF5 string datatype.
Definition: H5StrType.h:25
CompType is a derivative of a DataType and operates on HDF5 compound datatypes.
Definition: H5CompType.h:29


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