Field3D
Hdf5Util::H5ScopedAopenIdx Class Reference

Scoped object - Opens attribute by index and closes it on destruction. More...

#include <Hdf5Util.h>

Inheritance diagram for Hdf5Util::H5ScopedAopenIdx:
Hdf5Util::H5Base

List of all members.

Public Member Functions

 H5ScopedAopenIdx (hid_t location, unsigned idx)
 ~H5ScopedAopenIdx ()

Detailed Description

Scoped object - Opens attribute by index and closes it on destruction.

Definition at line 129 of file Hdf5Util.h.


Constructor & Destructor Documentation

Hdf5Util::H5ScopedAopenIdx::H5ScopedAopenIdx ( hid_t  location,
unsigned  idx 
) [inline]

Definition at line 132 of file Hdf5Util.h.

References Hdf5Util::H5Base::m_id.

  {
    m_id = H5Aopen_idx(location, idx);
    if (m_id < 0)
      throw Exc::MissingAttributeException("Couldn't open attribute at index: " +
                                           boost::lexical_cast<std::string>(idx));
  }
Hdf5Util::H5ScopedAopenIdx::~H5ScopedAopenIdx ( ) [inline]

Definition at line 139 of file Hdf5Util.h.

References Hdf5Util::H5Base::m_id.

  {
    if (m_id >= 0)
      H5Aclose(m_id);
  }

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