H5Dataset Class Reference

This class encapsulates an HDF5 dataset as it appears in a data file. The actual data is read into an IMXAArray instance and each attribute is its own IMXAArray instance. More...

Inherits IDataset.

Inheritance diagram for H5Dataset:

Inheritance graph
[legend]
Collaboration diagram for H5Dataset:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 H5Dataset (const std::string &datasetPath, IMXAArray::Pointer data)
 Creates an H5Dataset object with the given dataset path and data.
virtual ~H5Dataset ()
void setDatasetPath (const std::string &path)
 Sets the dataset path and name.
std::string getDatasetPath ()
 Returns the path+name of the dataset.
void setData (IMXAArray::Pointer data)
 Sets the data for the dataset.
IMXAArray::Pointer getData ()
 Returns the data for this class.
void addAttribute (const std::string &attributeKey, IMXAArray::Pointer attribute)
 Adds an attribute to this dataset.
void removeAttribute (const std::string &attributeKey)
 Removes an attribute from the data set.
IMXAArray::Pointer getAttribute (const std::string &attributeKey)
 Returns an attribute or NULL if not found.
virtual int32 writeToFile (IDataFile::Pointer dataFile)
virtual int32 readFromFile (IDataFile::Pointer dataFile)

Static Public Member Functions

static IDataset::Pointer LoadFromFile (IDataFile::Pointer dataFile, const std::string &datasetPath)
 Loads a dataset from an HDf5 file into this class.
static IDataset::Pointer CreateDatasetPtr (const std::string &datasetPath, IMXAArray::Pointer data)
 Creates an H5Dataset object with the given dataset path and data.

Protected Member Functions

 H5Dataset ()

Private Member Functions

 H5Dataset (const H5Dataset &)
void operator= (const H5Dataset &)

Private Attributes

IMXAArray::Pointer _data
MXAAbstractAttributes _attributes
std::string _datasetPath

Detailed Description

This class encapsulates an HDF5 dataset as it appears in a data file. The actual data is read into an IMXAArray instance and each attribute is its own IMXAArray instance.

Author:
Mike Jackson
Date:
Jan 3, 2008
Version:
Revision
1.2


Constructor & Destructor Documentation

H5Dataset::H5Dataset ( const std::string &  datasetPath,
IMXAArray::Pointer  data 
)

Creates an H5Dataset object with the given dataset path and data.

Parameters:
datasetPath The path to the data set
data The data that will be stored in hdf5 file

H5Dataset::~H5Dataset (  )  [virtual]

H5Dataset::H5Dataset (  )  [inline, protected]

H5Dataset::H5Dataset ( const H5Dataset  )  [private]


Member Function Documentation

IDataset::Pointer H5Dataset::LoadFromFile ( IDataFile::Pointer  dataFile,
const std::string &  datasetPath 
) [static]

Loads a dataset from an HDf5 file into this class.

Parameters:
dataFile Instance of IDataFile class
datasetPath The path to the dataset
Returns:
Boost::shared_ptr wrapped H5Dataset instance

IDataset::Pointer H5Dataset::CreateDatasetPtr ( const std::string &  datasetPath,
IMXAArray::Pointer  data 
) [static]

Creates an H5Dataset object with the given dataset path and data.

Parameters:
datasetPath The path to the data set
data The data that will be stored in hdf5 file

void H5Dataset::setDatasetPath ( const std::string &  path  )  [virtual]

Sets the dataset path and name.

Parameters:
path + name of the dataset

Implements IDataset.

std::string H5Dataset::getDatasetPath (  )  [virtual]

Returns the path+name of the dataset.

Implements IDataset.

void H5Dataset::setData ( IMXAArray::Pointer  data  )  [virtual]

Sets the data for the dataset.

Parameters:
data Instance of IMXAArray

Implements IDataset.

IMXAArray::Pointer H5Dataset::getData (  )  [virtual]

Returns the data for this class.

Implements IDataset.

void H5Dataset::addAttribute ( const std::string &  attributeKey,
IMXAArray::Pointer  attribute 
) [virtual]

Adds an attribute to this dataset.

Parameters:
attributeKey The name of the attribute
attribute The data for the attribute

Implements IDataset.

void H5Dataset::removeAttribute ( const std::string &  attributeKey  )  [virtual]

Removes an attribute from the data set.

Parameters:
attributeKey The name of the attribute to remove

Implements IDataset.

IMXAArray::Pointer H5Dataset::getAttribute ( const std::string &  attributeKey  )  [virtual]

Returns an attribute or NULL if not found.

Parameters:
attributeKey The name of the attribute to retrieve
Returns:

Implements IDataset.

int32 H5Dataset::writeToFile ( IDataFile::Pointer  dataFile  )  [virtual]

int32 H5Dataset::readFromFile ( IDataFile::Pointer  dataFile  )  [virtual]

void H5Dataset::operator= ( const H5Dataset  )  [private]


Member Data Documentation

IMXAArray::Pointer H5Dataset::_data [private]

MXAAbstractAttributes H5Dataset::_attributes [private]

std::string H5Dataset::_datasetPath [private]


The documentation for this class was generated from the following files:
Generated on Tue Nov 17 18:43:12 2009 for MXADataModel by  doxygen 1.5.2