Loading...
Searching...
No Matches
casacore::HDF5HidProperty Class Reference
casa package (libcasa_casa) » HDF5_module » HDF5_module_internal_classes

More...

`#include <HDF5HidMeta.h>`

## Public Member Functions

| HDF5HidProperty ()
| Default constructor sets hid to invalid.
| HDF5HidProperty (hid_t hid)
| Construct from given hid.
| ~HDF5HidProperty ()
| The destructor closes the hid.
| HDF5HidProperty (const HDF5HidProperty &)=delete
| Copy constructor cannot be used.
HDF5HidProperty & | operator= (const HDF5HidProperty &)=delete
| Assignment cannot be used.
void | close ()
| Close the hid if valid.
void | operator= (hid_t hid)
| Put hid in it.
hid_t | getHid () const
| Get the hid.
| operator hid_t () const
| Convert automatically to hid_t.

## Private Attributes

hid_t | itsHid

## Detailed Description

A class representing an HDF5 property hid.

### Intended use:

Internal

### Review Status

Test programs:
  tHDF5Dataset

### Synopsis

This class wraps an HDF5 property hid (hdf5 id). It offers two benefits:

- The most important is resource management. In case of an exception, the hid will automatically be closed by the destructor.
- A hid is a kind of pointer and should not be copied. These classes forbid making a copy, but make it possible to use them in a shared pointer context.

Definition at line 51 of file HDF5HidMeta.h.

## Constructor & Destructor Documentation

## HDF5HidProperty() [1/3]

casacore::HDF5HidProperty::HDF5HidProperty | ( |  | ) |

inline

Default constructor sets hid to invalid.

Definition at line 55 of file HDF5HidMeta.h.

References itsHid.

Referenced by HDF5HidProperty(), and operator=().

## HDF5HidProperty() [2/3]

casacore::HDF5HidProperty::HDF5HidProperty | ( | hid_t | hid | ) |

inline

Construct from given hid.

Definition at line 58 of file HDF5HidMeta.h.

References itsHid.

## ~HDF5HidProperty()

casacore::HDF5HidProperty::~HDF5HidProperty | ( |  | ) |

inline

The destructor closes the hid.

Definition at line 61 of file HDF5HidMeta.h.

References close().

## HDF5HidProperty() [3/3]

casacore::HDF5HidProperty::HDF5HidProperty | ( | const HDF5HidProperty & |  | ) |

delete

Copy constructor cannot be used.

References HDF5HidProperty().

## Member Function Documentation

## close()

void casacore::HDF5HidProperty::close | ( |  | ) |

Close the hid if valid.

Referenced by operator=(), and ~HDF5HidProperty().

## getHid()

hid_t casacore::HDF5HidProperty::getHid | ( |  | ) | const

inline

Get the hid.

Definition at line 73 of file HDF5HidMeta.h.

References itsHid.

## operator hid_t()

casacore::HDF5HidProperty::operator hid_t | ( |  | ) | const

inline

Convert automatically to hid_t.

Definition at line 76 of file HDF5HidMeta.h.

References itsHid.

## operator=() [1/2]

HDF5HidProperty & casacore::HDF5HidProperty::operator= | ( | const HDF5HidProperty & |  | ) |

delete

Assignment cannot be used.

References HDF5HidProperty().

## operator=() [2/2]

void casacore::HDF5HidProperty::operator= | ( | hid_t | hid | ) |

inline

Put hid in it.

If it already contains a hid, it will be closed.

Definition at line 70 of file HDF5HidMeta.h.

References close(), and itsHid.

## Member Data Documentation

## itsHid

hid_t casacore::HDF5HidProperty::itsHid

private

Definition at line 79 of file HDF5HidMeta.h.

Referenced by getHid(), HDF5HidProperty(), HDF5HidProperty(), operator hid_t(), and operator=().

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

- casa/HDF5/HDF5HidMeta.h