47#ifndef _INCLUDED_Field3D_Hdf5Util_H_
48#define _INCLUDED_Field3D_Hdf5Util_H_
56#include <boost/lexical_cast.hpp>
57#include <boost/thread/mutex.hpp>
58#include <boost/thread/recursive_mutex.hpp>
121 throw Exc::MissingAttributeException(
"Couldn't open attribute " + name);
128 throw Exc::MissingAttributeException(
"Couldn't open attribute " + name);
150 throw Exc::MissingAttributeException(
"Couldn't open attribute at index: " +
151 boost::lexical_cast<std::string>(
idx));
295 throw Exc::AttrGetSpaceException(
"Couldn't get attribute space");
318 throw Exc::AttrGetTypeException(
"Couldn't get attribute type");
341 throw Exc::AttrGetNativeTypeException(
"Couldn't get native attribute type");
453 const std::vector<T> &data);
459 std::vector<T> &data);
482 unsigned int attrSize,
float &value);
487 unsigned int attrSize,
double &value);
492 std::vector<unsigned int> &
attrSize,
498 std::vector<unsigned int> &
attrSize,
504 std::vector<unsigned int> &
attrSize,
518 const std::string& value);
523 unsigned int attrSize,
const int &value);
528 unsigned int attrSize,
const float &value);
533 unsigned int attrSize,
const double &value);
538 std::vector<unsigned int> &
attrSize,
544 std::vector<unsigned int> &
attrSize,
550 std::vector<unsigned int> &
attrSize,
556 std::vector<unsigned int> &
attrSize,
557 const double &value);
573 const std::vector<T> &data)
612 std::vector<T> &data)
Contains Exception base class.
Contains Field, WritableField and ResizableField classes.
FIELD3D_NAMESPACE_OPEN FIELD3D_API boost::recursive_mutex g_hdf5Mutex
boost::recursive_mutex::scoped_lock GlobalLock
Base class for all scoped Hdf5 util classes.
hid_t id() const
Query the hid_t value.
Scoped object - opens an attribute data space on creation and closes it on destruction.
H5ScopedAget_space(hid_t dataset_id)
Scoped object - opens an attribute data type on creation and closes it on destruction.
H5ScopedAget_type(hid_t dataset_id)
Scoped object - Opens attribute by index and closes it on destruction.
H5ScopedAopenIdx(hid_t location, unsigned idx)
Scoped object - Opens attribute by name and closes it on destruction.
H5ScopedAopen(hid_t location, const std::string &name)
H5ScopedAopen(hid_t location, const std::string &name, hid_t aapl_id)
Scoped object - creates a dataset on creation and closes it on destruction.
H5ScopedDcreate(hid_t parentLocation, const std::string &name, hid_t dtype_id, hid_t space_id, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id)
Scoped object - opens a dataset on creation and closes it on destruction.
void open(hid_t dataset_id)
H5ScopedDget_space(hid_t dataset_id)
Scoped object - opens a dataset on creation and closes it on destruction.
void open(hid_t dataset_id)
H5ScopedDget_type(hid_t dataset_id)
Scoped object - opens a dataset on creation and closes it on destruction.
void open(hid_t parentLocation, const std::string &name, hid_t dapl_id)
H5ScopedDopen(hid_t parentLocation, const std::string &name, hid_t dapl_id)
Scoped object - creates a group on creation and closes it on destruction.
H5ScopedGcreate(hid_t parentLocation, const std::string &name)
H5ScopedGcreate(hid_t parentLocation, const std::string &name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id)
Scoped object - opens a group on creation and closes it on destruction.
H5ScopedGopen(hid_t parentLocation, const std::string &name, hid_t gapl_id)
H5ScopedGopen(hid_t parentLocation, const std::string &name)
void open(hid_t parentLocation, const std::string &name)
void open(hid_t parentLocation, const std::string &name, hid_t gapl_id)
Scoped object - creates a dataspace on creation and closes it on destruction.
void create(H5S_class_t type)
H5ScopedScreate(H5S_class_t type)
Scoped object - opens an native type id on creation and closes it on destruction.
H5ScopedTget_native_type(hid_t dataset_id, H5T_direction_t direction)
~H5ScopedTget_native_type()
FIELD3D_API bool readAttribute(hid_t location, const std::string &attrName, std::string &value)
Reads a string attribute.
FIELD3D_API bool writeAttribute(hid_t location, const std::string &attrName, const std::string &value)
Writes a string attribute.
void readSimpleData(hid_t location, const std::string &name, std::vector< T > &data)
Reads a simple linear data set from the given location.
FIELD3D_API bool checkHdf5Gzip()
Checks whether gzip is available in the current hdf5 library.
void writeSimpleData(hid_t location, const std::string &name, const std::vector< T > &data)
Writes a simple linear data set to the given location.
Namespace for Exception objects.
Contains utility functions and classes for Hdf5 files.
#define FIELD3D_NAMESPACE_HEADER_CLOSE