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 
20 class ArrayType;
21 class CompType;
22 class EnumType;
23 class FloatType;
24 class IntType;
25 class StrType;
26 class VarLenType;
27 class DataSpace;
28 
36 class H5_DLLCPP AbstractDs {
37  public:
38  // Gets a copy the datatype of that this abstract dataset uses.
39  // Note that this datatype is a generic one and can only be accessed
40  // via generic member functions, i.e., member functions belong
41  // to DataType. To get specific datatype, i.e. EnumType, FloatType,
42  // etc..., use the specific functions, that follow, instead.
43  DataType getDataType() const;
44 
45  // Gets a copy of the specific datatype of this abstract dataset.
46  ArrayType getArrayType() const;
47  CompType getCompType() const;
48  EnumType getEnumType() const;
49  IntType getIntType() const;
50  FloatType getFloatType() const;
51  StrType getStrType() const;
52  VarLenType getVarLenType() const;
53 
55  virtual size_t getInMemDataSize() const = 0;
56 
58  virtual DataSpace getSpace() const = 0;
59 
60  // Gets the class of the datatype that is used by this abstract
61  // dataset.
62  H5T_class_t getTypeClass() const;
63 
65  virtual hsize_t getStorageSize() const = 0;
66 
67  // Returns this class name - pure virtual.
68  virtual H5std_string fromClass() const = 0;
69 
70  // Destructor
71  virtual ~AbstractDs();
72 
73  protected:
74  // Default constructor
75  AbstractDs();
76 
77  private:
78  // This member function is implemented by DataSet and Attribute - pure virtual.
79  virtual hid_t p_get_type() const = 0;
80 
81 }; // end of AbstractDs
82 } // namespace H5
83 
84 #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:25
Class DataType provides generic operations on HDF5 datatypes.
Definition: H5DataType.h:28
VarLenType is a derivative of a DataType and operates on HDF5 Variable-length Datatypes.
Definition: H5VarLenType.h:25
AbstractDs is an abstract base class, inherited by Attribute and DataSet.
Definition: H5AbstractDs.h:36
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:25


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