H5DataModelWriter Class Reference

Writes the DataModel to an HDF5 file. More...

Inherits IDataModelWriter.

Inheritance diagram for H5DataModelWriter:

Inheritance graph
[legend]
Collaboration diagram for H5DataModelWriter:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 H5DataModelWriter (IDataModel::Pointer dataModel, IDataFile::Pointer dataFile)
virtual ~H5DataModelWriter ()
int32 writeModelToFile (hid_t fileId)
 Writes the Data Model to the HDF5 file.
int32 writeDataModelTemplate (hid_t uniqueId)
 Writes the Data Model skeleton groups.
int32 writeDataDimensions (hid_t fileId)
 Writes the Data Dimensions from the Model.
int32 writeDataRecords (hid_t fileId)
 Writes the Data Records.
int32 writeRequiredMetaData (hid_t fileId)
 Writes the Required MetaData.
int32 writeUserMetaData (hid_t fileId)
 Writes the User Meta Data.
int32 writeSupportFiles (hid_t fileId)
 Writes the support files to the hdf5 data file.

Protected Member Functions

int32 _traverseDataRecords (hid_t gid, IDataRecord::Container &records)
 Walks the Data records hierarchy.
herr_t _writeStringDataset (hid_t loc_id, const std::string &dsetName, const std::string &data, bool overwrite=false)
 Writes a std::string as a HDF Dataset.

Static Protected Member Functions

template<typename T>
static herr_t _writeScalarDataset (hid_t loc_id, const std::string &dsetName, T &value)
 Creates a Dataset with the given name at the location defined by loc_id. This version of writeDataset should be used with a single scalar value. If you need to write an array of values, use the form that takes an std::vector<>.

Private Member Functions

 H5DataModelWriter (const H5DataModelWriter &)
void operator= (const H5DataModelWriter &)

Private Attributes

IDataModel::Pointer _dataModel
IDataFile::Pointer _dataFile

Detailed Description

Writes the DataModel to an HDF5 file.

Author:
Mike Jackson
Date:
March 2007
Version:
Revision
1.2


Constructor & Destructor Documentation

H5DataModelWriter::H5DataModelWriter ( IDataModel::Pointer  dataModel,
IDataFile::Pointer  dataFile 
)

H5DataModelWriter::~H5DataModelWriter (  )  [virtual]

H5DataModelWriter::H5DataModelWriter ( const H5DataModelWriter  )  [private]


Member Function Documentation

int32 H5DataModelWriter::writeModelToFile ( hid_t  fileId  ) 

Writes the Data Model to the HDF5 file.

Parameters:
fileId HDF5 FileId to write to
Returns:
true on success

int32 H5DataModelWriter::writeDataModelTemplate ( hid_t  uniqueId  ) 

Writes the Data Model skeleton groups.

Parameters:
uniqueId HDF5 FileId to write to
Returns:

int32 H5DataModelWriter::writeDataDimensions ( hid_t  fileId  ) 

Writes the Data Dimensions from the Model.

Parameters:
fileId HDF5 FileId to write to
Returns:

int32 H5DataModelWriter::writeDataRecords ( hid_t  fileId  ) 

Writes the Data Records.

Parameters:
fileId HDF5 FileId to write to
Returns:

int32 H5DataModelWriter::writeRequiredMetaData ( hid_t  fileId  ) 

Writes the Required MetaData.

Parameters:
fileId HDF5 FileId to write to
Returns:

int32 H5DataModelWriter::writeUserMetaData ( hid_t  fileId  ) 

Writes the User Meta Data.

Parameters:
fileId HDF5 FileId to write to
Returns:

int32 H5DataModelWriter::writeSupportFiles ( hid_t  fileId  ) 

Writes the support files to the hdf5 data file.

Parameters:
fileId HDF5 file id to write to
Returns:
error code

int32 H5DataModelWriter::_traverseDataRecords ( hid_t  gid,
IDataRecord::Container records 
) [protected]

Walks the Data records hierarchy.

Parameters:
gid 
records 
Returns:

herr_t H5DataModelWriter::_writeStringDataset ( hid_t  loc_id,
const std::string &  dsetName,
const std::string &  data,
bool  overwrite = false 
) [protected]

Writes a std::string as a HDF Dataset.

Parameters:
loc_id The Parent location to write the dataset
dsetName The Name to use for the dataset
data The actual data to write as a null terminated string
overwrite Overwrite the existing data
Returns:
Standard HDF5 error conditions

template<typename T>
static herr_t H5DataModelWriter::_writeScalarDataset ( hid_t  loc_id,
const std::string &  dsetName,
T &  value 
) [inline, static, protected]

Creates a Dataset with the given name at the location defined by loc_id. This version of writeDataset should be used with a single scalar value. If you need to write an array of values, use the form that takes an std::vector<>.

Parameters:
loc_id The Parent location to store the data
dsetName The name of the dataset
value The value to write to the HDF5 dataset
Returns:
Standard HDF5 error conditions

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


Member Data Documentation

IDataModel::Pointer H5DataModelWriter::_dataModel [private]

IDataFile::Pointer H5DataModelWriter::_dataFile [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