Help us improve by taking our short survey: https://www.hdfgroup.org/website-survey/

| HDF5 Last Updated on 2026-03-23 The HDF5 Field Guide

Loading...
Searching...
No Matches
AbstractDs Class Referenceabstract

`#include <c++/src/H5AbstractDs.h>`

## Detailed Description

AbstractDs is an abstract base class, inherited by Attribute and DataSet.

It provides a collection of services that are common to both Attribute and DataSet.

Inheritance diagram for AbstractDs:

## Public Member Functions
virtual std::string | fromClass () const =0
ArrayType | getArrayType () const
| Returns the array datatype of this abstract dataset which can be a dataset or an attribute.
CompType | getCompType () const
| Returns the compound datatype of this abstract dataset which can be a dataset or an attribute.
DataType | getDataType () const
| Returns the generic datatype of this abstract dataset, which can be a dataset or an attribute.
EnumType | getEnumType () const
| Returns the enumeration datatype of this abstract dataset which can be a dataset or an attribute.
FloatType | getFloatType () const
| Returns the floating-point datatype of this abstract dataset, which can be a dataset or an attribute.
virtual size_t | getInMemDataSize () const =0
| Gets the size in memory of this abstract dataset.
IntType | getIntType () const
| Returns the integer datatype of this abstract dataset which can be a dataset or an attribute.
virtual DataSpace | getSpace () const =0
| Gets the dataspace of this abstract dataset - pure virtual.
virtual hsize_t | getStorageSize () const =0
| Returns the amount of storage size required - pure virtual.
StrType | getStrType () const
| Returns the string datatype of this abstract dataset which can be a dataset or an attribute.
H5T_class_t | getTypeClass () const
| Creates an AbstractDs instance using an existing id.
VarLenType | getVarLenType () const
| Returns the variable length datatype of this abstract dataset, which can be a dataset or an attribute.
virtual | ~AbstractDs ()=default

## Protected Member Functions
| AbstractDs ()
| Default constructor.

## Constructor & Destructor Documentation

## ◆ ~AbstractDs()

virtual ~AbstractDs | ( |  | ) |
| virtual default

## ◆ AbstractDs()

AbstractDs | ( |  | ) |
| protected

Default constructor.

## Member Function Documentation

## ◆ fromClass()

virtual std::string fromClass | ( |  | ) | const
| pure virtual

Implemented in Attribute, and DataSet.

## ◆ getArrayType()

ArrayType getArrayType | ( |  | ) | const

Returns the array datatype of this abstract dataset which can be a dataset or an attribute.

Returns
  ArrayType instance

Exceptions

  H5::DataTypeIException |

## ◆ getCompType()

CompType getCompType | ( |  | ) | const

Returns the compound datatype of this abstract dataset which can be a dataset or an attribute.

Returns
  CompType instance

Exceptions

  H5::DataTypeIException |

## ◆ getDataType()

DataType getDataType | ( |  | ) | const

Returns the generic datatype of this abstract dataset, which can be a dataset or an attribute.

Returns
  DataType instance

Exceptions

  H5::DataTypeIException |

## ◆ getEnumType()

EnumType getEnumType | ( |  | ) | const

Returns the enumeration datatype of this abstract dataset which can be a dataset or an attribute.

Returns
  EnumType instance

Exceptions

  H5::DataTypeIException |

## ◆ getFloatType()

FloatType getFloatType | ( |  | ) | const

Returns the floating-point datatype of this abstract dataset, which can be a dataset or an attribute.

Returns
  FloatType instance

Exceptions

  H5::DataTypeIException |

## ◆ getInMemDataSize()

virtual size_t getInMemDataSize | ( |  | ) | const
| pure virtual

Gets the size in memory of this abstract dataset.

Implemented in Attribute, and DataSet.

## ◆ getIntType()

IntType getIntType | ( |  | ) | const

Returns the integer datatype of this abstract dataset which can be a dataset or an attribute.

Returns
  IntType instance

Exceptions

  H5::DataTypeIException |

## ◆ getSpace()

virtual DataSpace getSpace | ( |  | ) | const
| pure virtual

Gets the dataspace of this abstract dataset - pure virtual.

Implemented in Attribute, and DataSet.

## ◆ getStorageSize()

virtual hsize_t getStorageSize | ( |  | ) | const
| pure virtual

Returns the amount of storage size required - pure virtual.

Implemented in Attribute, and DataSet.

## ◆ getStrType()

StrType getStrType | ( |  | ) | const

Returns the string datatype of this abstract dataset which can be a dataset or an attribute.

Returns
  StrType instance

Exceptions

  H5::DataTypeIException |

## ◆ getTypeClass()

H5T_class_t getTypeClass | ( |  | ) | const

Creates an AbstractDs instance using an existing id.

Returns the class of the datatype that is used by this object, which can be a dataset or an attribute.

Returns
  Datatype class identifier

Exceptions

  H5::DataTypeIException |

## ◆ getVarLenType()

VarLenType getVarLenType | ( |  | ) | const

Returns the variable length datatype of this abstract dataset, which can be a dataset or an attribute.

Returns
  VarLenType instance

Exceptions

  H5::DataTypeIException |

The documentation for this class was generated from the following files:

- c++/src/H5AbstractDs.h
- c++/src/H5AbstractDs.cpp