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

| HDF5 Last Updated on 2025-11-11 The HDF5 Field Guide

- Main Page
- Getting started
- User Guide
- Reference Manual
- Cookbook
- Technical Notes
- RFCs
- Specifications
- Glossary
- Full-Text Search
- About

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Friends
DataSpace Class Reference

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

## Detailed Description

Class DataSpace inherits from IdComponent and provides wrappers for the HDF5's dataspaces.

Inheritance diagram for DataSpace:

## Public Member Functions
virtual void | close () override
void | copy (const DataSpace &like_space)
| DataSpace (const DataSpace &original)
| DataSpace (const hid_t space_id)
| DataSpace (H5S_class_t type=H5S_SCALAR)
| DataSpace (int rank, const hsize_t *dims, const hsize_t *maxdims=NULL)
void | extentCopy (const DataSpace &dest_space) const
virtual H5std_string | fromClass () const override
| Returns this class name.
virtual hid_t | getId () const override
void | getSelectBounds (hsize_t *start, hsize_t *end) const
hssize_t | getSelectElemNpoints () const
void | getSelectElemPointlist (hsize_t startpoint, hsize_t numpoints, hsize_t *buf) const
void | getSelectHyperBlocklist (hsize_t startblock, hsize_t numblocks, hsize_t *buf) const
hssize_t | getSelectHyperNblocks () const
hssize_t | getSelectNpoints () const
int | getSimpleExtentDims (hsize_t *dims, hsize_t *maxdims=NULL) const
int | getSimpleExtentNdims () const
hssize_t | getSimpleExtentNpoints () const
H5S_class_t | getSimpleExtentType () const
bool | isSimple () const
void | offsetSimple (const hssize_t *offset) const
DataSpace & | operator= (const DataSpace &rhs)
void | selectAll () const
void | selectElements (H5S_seloper_t op, const size_t num_elements, const hsize_t *coord) const
void | selectHyperslab (H5S_seloper_t op, const hsize_t *count, const hsize_t *start, const hsize_t *stride=NULL, const hsize_t *block=NULL) const
void | selectNone () const
bool | selectValid () const
void | setExtentNone () const
void | setExtentSimple (int rank, const hsize_t *current_size, const hsize_t *maximum_size=NULL) const
virtual | ~DataSpace () override
Public Member Functions inherited from IdComponent
void | decRefCount () const
void | decRefCount (const hid_t obj_id) const
int | getCounter () const
int | getCounter (const hid_t obj_id) const
H5I_type_t | getHDFObjType () const
void | incRefCount () const
void | incRefCount (const hid_t obj_id) const
H5std_string | inMemFunc (const char *func_name) const
IdComponent & | operator= (const IdComponent &rhs)
void | setId (const hid_t new_id)
virtual | ~IdComponent ()=default

## Static Public Member Functions
static void | deleteConstants ()
Static Public Member Functions inherited from IdComponent
static H5I_type_t | getHDFObjType (const hid_t obj_id)
static hsize_t | getNumMembers (H5I_type_t type)
static bool | isValid (hid_t an_id)
static bool | typeExists (H5I_type_t type)

## Static Public Attributes
static const DataSpace & | ALL
| Default DataSpace objects.

## Protected Member Functions
virtual void | p_setId (const hid_t new_id) override
Protected Member Functions inherited from IdComponent
| IdComponent ()
H5std_string | p_get_file_name () const

## Friends
void | f_DataSpace_setId (DataSpace *dspace, hid_t new_id)

## Additional Inherited Members
Static Protected Member Functions inherited from IdComponent
static bool | p_valid_id (const hid_t obj_id)
Static Protected Attributes inherited from IdComponent
static bool | H5dontAtexit_called

## Constructor & Destructor Documentation

## ◆ DataSpace() [1/4]

DataSpace | ( | H5S_class_t | type = H5S_SCALAR | ) |

## ◆ DataSpace() [2/4]

DataSpace | ( | int | rank,
|  | const hsize_t * | dims,
|  | const hsize_t * | maxdims = NULL )

## ◆ DataSpace() [3/4]

DataSpace | ( | const hid_t | space_id | ) |

## ◆ DataSpace() [4/4]

DataSpace | ( | const DataSpace & | original | ) |

## ◆ ~DataSpace()

virtual ~DataSpace | ( |  | ) |
| override virtual

## Member Function Documentation

## ◆ close()

virtual void close | ( |  | ) |
| override virtual

Implements IdComponent.

## ◆ copy()

void copy | ( | const DataSpace & | like_space | ) |

## ◆ deleteConstants()

static void deleteConstants | ( |  | ) |
| static

## ◆ extentCopy()

void extentCopy | ( | const DataSpace & | dest_space | ) | const

## ◆ fromClass()

virtual H5std_string fromClass | ( |  | ) | const
| override virtual

Returns this class name.

Reimplemented from IdComponent.

## ◆ getId()

virtual hid_t getId | ( |  | ) | const
| override virtual

Implements IdComponent.

## ◆ getSelectBounds()

void getSelectBounds | ( | hsize_t * | start,
|  | hsize_t * | end ) const

## ◆ getSelectElemNpoints()

hssize_t getSelectElemNpoints | ( |  | ) | const

## ◆ getSelectElemPointlist()

void getSelectElemPointlist | ( | hsize_t | startpoint,
|  | hsize_t | numpoints,
|  | hsize_t * | buf ) const

## ◆ getSelectHyperBlocklist()

void getSelectHyperBlocklist | ( | hsize_t | startblock,
|  | hsize_t | numblocks,
|  | hsize_t * | buf ) const

## ◆ getSelectHyperNblocks()

hssize_t getSelectHyperNblocks | ( |  | ) | const

## ◆ getSelectNpoints()

hssize_t getSelectNpoints | ( |  | ) | const

## ◆ getSimpleExtentDims()

int getSimpleExtentDims | ( | hsize_t * | dims,
|  | hsize_t * | maxdims = NULL ) const

## ◆ getSimpleExtentNdims()

int getSimpleExtentNdims | ( |  | ) | const

## ◆ getSimpleExtentNpoints()

hssize_t getSimpleExtentNpoints | ( |  | ) | const

## ◆ getSimpleExtentType()

H5S_class_t getSimpleExtentType | ( |  | ) | const

## ◆ isSimple()

bool isSimple | ( |  | ) | const

## ◆ offsetSimple()

void offsetSimple | ( | const hssize_t * | offset | ) | const

## ◆ operator=()

DataSpace & operator= | ( | const DataSpace & | rhs | ) |

## ◆ p_setId()

virtual void p_setId | ( | const hid_t | new_id | ) |
| override protected virtual

Implements IdComponent.

## ◆ selectAll()

void selectAll | ( |  | ) | const

## ◆ selectElements()

void selectElements | ( | H5S_seloper_t | op,
|  | const size_t | num_elements,
|  | const hsize_t * | coord ) const

## ◆ selectHyperslab()

void selectHyperslab | ( | H5S_seloper_t | op,
|  | const hsize_t * | count,
|  | const hsize_t * | start,
|  | const hsize_t * | stride = NULL,
|  | const hsize_t * | block = NULL ) const

## ◆ selectNone()

void selectNone | ( |  | ) | const

## ◆ selectValid()

bool selectValid | ( |  | ) | const

## ◆ setExtentNone()

void setExtentNone | ( |  | ) | const

## ◆ setExtentSimple()

void setExtentSimple | ( | int | rank,
|  | const hsize_t * | current_size,
|  | const hsize_t * | maximum_size = NULL ) const

## Friends And Related Symbol Documentation

## ◆ f_DataSpace_setId

void f_DataSpace_setId | ( | DataSpace * | dspace,
|  | hid_t | new_id )
| friend

## Field Documentation

## ◆ ALL

const DataSpace& ALL
| static

Default DataSpace objects.

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

- c++/src/H5DataSpace.h