Loading...
Searching...
No Matches
HDF5HidMeta.h
Go to the documentation of this file.
//# HDF5HidMeta.h: Classes representing an HDF5 hid of meta objects
//# Copyright (C) 2008
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: casa-feedback@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
#ifndef CASA_HDF5HIDMETA_H
#define CASA_HDF5HIDMETA_H
//# Includes
#include <casacore/casa/aips.h>
#include <casacore/casa/HDF5/HDF5Object.h>
namespace casacore { //# NAMESPACE CASACORE - BEGIN
// <summary>
// A class representing an HDF5 property hid.
// </summary>
// <use visibility=local>
// <reviewed reviewer="" date="" tests="tHDF5Dataset.cc">
// </reviewed>
// <synopsis>
// This class wraps an HDF5 property hid (hdf5 id). It offers two benefits:
// <ul>
// <li> The most important is resource management. In case of an exception,
// the hid will automatically be closed by the destructor.
// <li> 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.
// </ul>
// </synopsis>
class HDF5HidProperty
{
public:
// Default constructor sets hid to invalid.
HDF5HidProperty()
: itsHid(-1) {}
// Construct from given hid.
HDF5HidProperty (hid_t hid)
: itsHid(hid) {}
// The destructor closes the hid.
~HDF5HidProperty()
{ close(); }
// Copy constructor cannot be used.
HDF5HidProperty (const HDF5HidProperty&) = delete;
// Assignment cannot be used.
HDF5HidProperty& operator= (const HDF5HidProperty&) = delete;
// Close the hid if valid.
void close();
// Put hid in it. If it already contains a hid, it will be closed.
void operator= (hid_t hid)
{ close(); itsHid = hid; }
// Get the hid.
hid_t getHid() const
{ return itsHid; }
// Convert automatically to hid_t.
operator hid_t() const
{ return itsHid; }
private:
hid_t itsHid;
};
// <summary>
// A class representing an HDF5 datatype hid.
// </summary>
// <use visibility=local>
// <reviewed reviewer="" date="" tests="tHDF5Dataset.cc">
// </reviewed>
// <synopsis>
// This class wraps an HDF5 datatype hid (hdf5 id). It offers two benefits:
// <ul>
// <li> The most important is resource management. In case of an exception,
// the hid will automatically be closed by the destructor.
// <li> 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.
// </ul>
// </synopsis>
class HDF5HidDataType
{
public:
// Default constructor sets hid to invalid.
HDF5HidDataType()
: itsHid(-1) {}
// Construct from given hid.
HDF5HidDataType (hid_t hid)
: itsHid(hid) {}
// Copy constructor makes a deep copy.
HDF5HidDataType (const HDF5HidDataType& that);
// The destructor closes the hid.
~HDF5HidDataType()
{ close(); }
// Assignment makes a deep copy.
HDF5HidDataType& operator= (const HDF5HidDataType& that);
// Close the hid if valid.
void close();
// Put hid in it. If it already contains a hid, it will be closed.
void operator= (hid_t hid)
{ close(); itsHid = hid; }
// Get the hid.
hid_t getHid() const
{ return itsHid; }
// Convert automatically to hid_t.
operator hid_t() const
{ return itsHid; }
private:
hid_t itsHid;
};
// <summary>
// A class representing an HDF5 dataspace hid.
// </summary>
// <use visibility=local>
// <reviewed reviewer="" date="" tests="tHDF5Dataset.cc">
// </reviewed>
// <synopsis>
// This class wraps an HDF5 dataspace hid (hdf5 id). It offers two benefits:
// <ul>
// <li> The most important is resource management. In case of an exception,
// the hid will automatically be closed by the destructor.
// <li> 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.
// </ul>
// </synopsis>
class HDF5HidDataSpace
{
public:
// Default constructor sets hid to invalid.
HDF5HidDataSpace()
: itsHid(-1) {}
// Construct from given hid.
HDF5HidDataSpace (hid_t hid)
: itsHid(hid) {}
// The destructor closes the hid.
~HDF5HidDataSpace()
{ close(); }
// Copy constructor cannot be used.
HDF5HidDataSpace (const HDF5HidDataSpace&) = delete;
// Assignment cannot be used.
HDF5HidDataSpace& operator= (const HDF5HidDataSpace&) = delete;
// Close the hid if valid.
void close();
// Put hid in it. If it already contains a hid, it will be closed.
void operator= (hid_t hid)
{ close(); itsHid = hid; }
// Get the hid.
hid_t getHid() const
{ return itsHid; }
// Convert automatically to hid_t.
operator hid_t() const
{ return itsHid; }
private:
hid_t itsHid;
};
// <summary>
// A class representing an HDF5 attribute hid.
// </summary>
// <use visibility=local>
// <reviewed reviewer="" date="" tests="tHDF5Dataset.cc">
// </reviewed>
// <synopsis>
// This class wraps an HDF5 attribute hid (hdf5 id). It offers two benefits:
// <ul>
// <li> The most important is resource management. In case of an exception,
// the hid will automatically be closed by the destructor.
// <li> 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.
// </ul>
// </synopsis>
class HDF5HidAttribute
{
public:
// Default constructor sets hid to invalid.
HDF5HidAttribute()
: itsHid(-1) {}
// Construct from given hid.
HDF5HidAttribute (hid_t hid)
: itsHid(hid) {}
// The destructor closes the hid.
~HDF5HidAttribute()
{ close(); }
// Copy constructor cannot be used.
HDF5HidAttribute (const HDF5HidAttribute&) = delete;
// Assignment cannot be used.
HDF5HidAttribute& operator= (const HDF5HidAttribute&) = delete;
// Close the hid if valid.
void close();
// Put hid in it. If it already contains a hid, it will be closed.
void operator= (hid_t hid)
{ close(); itsHid = hid; }
// Get the hid.
hid_t getHid() const
{ return itsHid; }
// Convert automatically to hid_t.
operator hid_t() const
{ return itsHid; }
private:
hid_t itsHid;
};
}
#endif
casacore::HDF5HidAttribute::close
void close()
Close the hid if valid.
casacore::HDF5HidAttribute::getHid
hid_t getHid() const
Get the hid.
Definition HDF5HidMeta.h:217
casacore::HDF5HidAttribute::operator=
HDF5HidAttribute & operator=(const HDF5HidAttribute &)=delete
Assignment cannot be used.
casacore::HDF5HidAttribute::HDF5HidAttribute
HDF5HidAttribute()
Default constructor sets hid to invalid.
Definition HDF5HidMeta.h:199
casacore::HDF5HidAttribute::itsHid
hid_t itsHid
Definition HDF5HidMeta.h:223
casacore::HDF5HidAttribute::HDF5HidAttribute
HDF5HidAttribute(hid_t hid)
Construct from given hid.
Definition HDF5HidMeta.h:202
casacore::HDF5HidAttribute::~HDF5HidAttribute
~HDF5HidAttribute()
The destructor closes the hid.
Definition HDF5HidMeta.h:205
casacore::HDF5HidAttribute::HDF5HidAttribute
HDF5HidAttribute(const HDF5HidAttribute &)=delete
Copy constructor cannot be used.
casacore::HDF5HidDataSpace::~HDF5HidDataSpace
~HDF5HidDataSpace()
The destructor closes the hid.
Definition HDF5HidMeta.h:157
casacore::HDF5HidDataSpace::HDF5HidDataSpace
HDF5HidDataSpace(hid_t hid)
Construct from given hid.
Definition HDF5HidMeta.h:154
casacore::HDF5HidDataSpace::HDF5HidDataSpace
HDF5HidDataSpace(const HDF5HidDataSpace &)=delete
Copy constructor cannot be used.
casacore::HDF5HidDataSpace::getHid
hid_t getHid() const
Get the hid.
Definition HDF5HidMeta.h:169
casacore::HDF5HidDataSpace::itsHid
hid_t itsHid
Definition HDF5HidMeta.h:175
casacore::HDF5HidDataSpace::HDF5HidDataSpace
HDF5HidDataSpace()
Default constructor sets hid to invalid.
Definition HDF5HidMeta.h:151
casacore::HDF5HidDataSpace::operator=
HDF5HidDataSpace & operator=(const HDF5HidDataSpace &)=delete
Assignment cannot be used.
casacore::HDF5HidDataSpace::close
void close()
Close the hid if valid.
casacore::HDF5HidDataType::operator=
HDF5HidDataType & operator=(const HDF5HidDataType &that)
Assignment makes a deep copy.
casacore::HDF5HidDataType::~HDF5HidDataType
~HDF5HidDataType()
The destructor closes the hid.
Definition HDF5HidMeta.h:111
casacore::HDF5HidDataType::getHid
hid_t getHid() const
Get the hid.
Definition HDF5HidMeta.h:121
casacore::HDF5HidDataType::close
void close()
Close the hid if valid.
casacore::HDF5HidDataType::HDF5HidDataType
HDF5HidDataType()
Default constructor sets hid to invalid.
Definition HDF5HidMeta.h:103
casacore::HDF5HidDataType::HDF5HidDataType
HDF5HidDataType(hid_t hid)
Construct from given hid.
Definition HDF5HidMeta.h:106
casacore::HDF5HidDataType::HDF5HidDataType
HDF5HidDataType(const HDF5HidDataType &that)
Copy constructor makes a deep copy.
casacore::HDF5HidDataType::itsHid
hid_t itsHid
Definition HDF5HidMeta.h:127
casacore::HDF5HidProperty::HDF5HidProperty
HDF5HidProperty()
Default constructor sets hid to invalid.
Definition HDF5HidMeta.h:55
casacore::HDF5HidProperty::operator=
HDF5HidProperty & operator=(const HDF5HidProperty &)=delete
Assignment cannot be used.
casacore::HDF5HidProperty::HDF5HidProperty
HDF5HidProperty(const HDF5HidProperty &)=delete
Copy constructor cannot be used.
casacore::HDF5HidProperty::itsHid
hid_t itsHid
Definition HDF5HidMeta.h:79
casacore::HDF5HidProperty::close
void close()
Close the hid if valid.
casacore::HDF5HidProperty::~HDF5HidProperty
~HDF5HidProperty()
The destructor closes the hid.
Definition HDF5HidMeta.h:61
casacore::HDF5HidProperty::getHid
hid_t getHid() const
Get the hid.
Definition HDF5HidMeta.h:73
casacore::HDF5HidProperty::HDF5HidProperty
HDF5HidProperty(hid_t hid)
Construct from given hid.
Definition HDF5HidMeta.h:58
casacore
this file contains all the compiler specific defines
Definition mainpage.dox:28