My Project  1.10.11
H5AbstractDs.h
1 // C++ informative line for the emacs editor: -*- C++ -*-
2 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3  * Copyright by The HDF Group. *
4  * All rights reserved. *
5  * *
6  * This file is part of HDF5. The full HDF5 copyright notice, including *
7  * terms governing use, modification, and redistribution, is contained in *
8  * the COPYING file, which can be found at the root of the source code *
9  * distribution tree, or in https://www.hdfgroup.org/licenses. *
10  * If you do not have access to either file, you may request a copy from *
11  * help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 #ifndef H5AbstractDs_H
15 #define H5AbstractDs_H
16 
17 namespace H5 {
18 
19 class ArrayType;
20 class CompType;
21 class EnumType;
22 class FloatType;
23 class IntType;
24 class StrType;
25 class VarLenType;
26 class DataSpace;
27 
35 class H5_DLLCPP AbstractDs {
36  public:
37  // Gets a copy the datatype of that this abstract dataset uses.
38  // Note that this datatype is a generic one and can only be accessed
39  // via generic member functions, i.e., member functions belong
40  // to DataType. To get specific datatype, i.e. EnumType, FloatType,
41  // etc..., use the specific functions, that follow, instead.
42  DataType getDataType() const;
43 
44  // Gets a copy of the specific datatype of this abstract dataset.
45  ArrayType getArrayType() const;
46  CompType getCompType() const;
47  EnumType getEnumType() const;
48  IntType getIntType() const;
49  FloatType getFloatType() const;
50  StrType getStrType() const;
51  VarLenType getVarLenType() const;
52 
54  virtual size_t getInMemDataSize() const = 0;
55 
57  virtual DataSpace getSpace() const = 0;
58 
59  // Gets the class of the datatype that is used by this abstract
60  // dataset.
61  H5T_class_t getTypeClass() const;
62 
64  virtual hsize_t getStorageSize() const = 0;
65 
66  // Returns this class name - pure virtual.
67  virtual H5std_string fromClass() const = 0;
68 
69  // Destructor
70  virtual ~AbstractDs();
71 
72  protected:
73  // Default constructor
74  AbstractDs();
75 
76  private:
77  // This member function is implemented by DataSet and Attribute - pure virtual.
78  virtual hid_t p_get_type() const = 0;
79 
80 }; // end of AbstractDs
81 } // namespace H5
82 
83 #endif // H5AbstractDs_H
H5::IntType
IntType is a derivative of a DataType and operates on HDF5 integer datatype.
Definition: H5IntType.h:24
H5::FloatType
FloatType is a derivative of a DataType and operates on HDF5 floating point datatype.
Definition: H5FloatType.h:24
H5::AbstractDs::getInMemDataSize
virtual size_t getInMemDataSize() const =0
Gets the size in memory of this abstract dataset.
H5::AbstractDs::fromClass
virtual H5std_string fromClass() const =0
H5::AbstractDs::getTypeClass
H5T_class_t getTypeClass() const
Creates an AbstractDs instance using an existing id.
Definition: H5AbstractDs.cpp:66
H5::AbstractDs::~AbstractDs
virtual ~AbstractDs()
Noop destructor.
Definition: H5AbstractDs.cpp:335
H5::DataSpace
Class DataSpace inherits from IdComponent and provides wrappers for the HDF5's dataspaces.
Definition: H5DataSpace.h:24
H5::DataTypeIException
Definition: H5Exception.h:109
H5::AttributeIException
Definition: H5Exception.h:137
H5::AbstractDs::getDataType
DataType getDataType() const
Returns the generic datatype of this abstract dataset, which can be a dataset or an attribute.
Definition: H5AbstractDs.cpp:113
H5::AbstractDs::getVarLenType
VarLenType getVarLenType() const
Returns the variable length datatype of this abstract dataset, which can be a dataset or an attribute...
Definition: H5AbstractDs.cpp:311
H5::AbstractDs::getStrType
StrType getStrType() const
Returns the string datatype of this abstract dataset which can be a dataset or an attribute.
Definition: H5AbstractDs.cpp:283
H5::ArrayType
Class ArrayType inherits from DataType and provides wrappers for the HDF5's Array Datatypes.
Definition: H5ArrayType.h:24
H5::AbstractDs::getStorageSize
virtual hsize_t getStorageSize() const =0
Returns the amount of storage size required - pure virtual.
H5::Exception::getDetailMsg
H5std_string getDetailMsg() const
Returns the detailed message set at the time the exception is thrown.
Definition: H5Exception.cpp:264
H5::AbstractDs::getCompType
CompType getCompType() const
Returns the compound datatype of this abstract dataset which can be a dataset or an attribute.
Definition: H5AbstractDs.cpp:171
H5::StrType
StrType is a derivative of a DataType and operates on HDF5 string datatype.
Definition: H5StrType.h:24
H5::AbstractDs
AbstractDs is an abstract base class, inherited by Attribute and DataSet.
Definition: H5AbstractDs.h:35
H5::AbstractDs::getSpace
virtual DataSpace getSpace() const =0
Gets the dataspace of this abstract dataset - pure virtual.
H5::VarLenType
VarLenType is a derivative of a DataType and operates on HDF5 Variable-length Datatypes.
Definition: H5VarLenType.h:24
H5::AbstractDs::AbstractDs
AbstractDs()
Default constructor.
Definition: H5AbstractDs.cpp:40
H5::AbstractDs::getArrayType
ArrayType getArrayType() const
Returns the array datatype of this abstract dataset which can be a dataset or an attribute.
Definition: H5AbstractDs.cpp:141
H5::CompType
CompType is a derivative of a DataType and operates on HDF5 compound datatypes.
Definition: H5CompType.h:24
H5::EnumType
EnumType is a derivative of a DataType and operates on HDF5 enum datatypes.
Definition: H5EnumType.h:24
H5
Definition: H5AbstractDs.cpp:33
H5::AbstractDs::getIntType
IntType getIntType() const
Returns the integer datatype of this abstract dataset which can be a dataset or an attribute.
Definition: H5AbstractDs.cpp:227
H5::DataType
Class DataType provides generic operations on HDF5 datatypes.
Definition: H5DataType.h:27
H5::AbstractDs::getEnumType
EnumType getEnumType() const
Returns the enumeration datatype of this abstract dataset which can be a dataset or an attribute.
Definition: H5AbstractDs.cpp:199
H5::DataSetIException
Definition: H5Exception.h:130
H5::AbstractDs::getFloatType
FloatType getFloatType() const
Returns the floating-point datatype of this abstract dataset, which can be a dataset or an attribute.
Definition: H5AbstractDs.cpp:255


The HDF Group Help Desk:
  Copyright by The HDF Group