H5MXADataFile Class Reference

Author:
mjackson
More...

Inherits IDataFile.

Inheritance diagram for H5MXADataFile:

Inheritance graph
[legend]
Collaboration diagram for H5MXADataFile:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~H5MXADataFile ()
std::string getFilename ()
 returns the name of the file that is actively being read from or written to.
IDataModel::Pointer getDataModel ()
 returns the DataModel as read from the data file
int32 createFile ()
 Creates a new data file, first deleting and existing file with the same name.
int32 openFile (bool readOnly)
 Opens an existing data file.
int32 closeFile (bool saveModel)
 Closes the data file. Any further access to the file will fail.
float supportedMXAFileVersion ()
 Checks if the file version of the data file is with in the bounds of the library to read/parse the data model.
bool isFileOpen ()
 Returns if the file is currently in the "open" state. If this file is OPEN then file operations (Read/Write data or model) can be performed on the file.
bool isReadOnly ()
 Was the file opened in ReadOnly mode.
int32 saveDataModel ()
 Writes the Data Model into the underlying data file overwriting any existing model. This may have adverse effects on the ability to retrieve data from the data file if the data model differs in structure from the original data model.
int32 writeData (const IDataset::Pointer dataset)
int32 readData (const IDataset::Pointer dataset)
int32 getFileId ()
 Returns the unique identifier for the open file.

Static Public Member Functions

static IDataFile::Pointer OpenFile (const std::string &filename, bool readOnly)
static IDataFile::Pointer CreateFileWithModel (const std::string &filename, IDataModel::Pointer model)
static IDataFile::Pointer CreateEmptyFile (const std::string &filename)

Protected Member Functions

 H5MXADataFile (const std::string &filename)
 H5MXADataFile (const std::string &filename, IDataModel::Pointer model)
int32 _writeDataModel ()
 Writes the data model to the data file. Any existing model is over-written with the new/modified model.
int32 _readDataModel ()
 Loads the data model from the data file. If a data model can not be loaded from the file, then a NULL wrapped model will be returned.
void _setWeakPointer (boost::weak_ptr< IDataFile > weakPtr)

Private Member Functions

 H5MXADataFile (const H5MXADataFile &)
void operator= (const H5MXADataFile &)

Private Attributes

std::string _filename
hid_t _fileId
bool _isFileOpen
bool _isReadOnly
IDataModel::Pointer _dataModel
boost::weak_ptr< IDataFile_weakPtr

Detailed Description

Author:
mjackson

Date:
Dec 17, 2007
Version:
Revision
1.2


Constructor & Destructor Documentation

H5MXADataFile::~H5MXADataFile (  )  [virtual]

H5MXADataFile::H5MXADataFile ( const std::string &  filename  )  [protected]

H5MXADataFile::H5MXADataFile ( const std::string &  filename,
IDataModel::Pointer  model 
) [protected]

H5MXADataFile::H5MXADataFile ( const H5MXADataFile  )  [private]


Member Function Documentation

IDataFile::Pointer H5MXADataFile::OpenFile ( const std::string &  filename,
bool  readOnly 
) [static]

IDataFile::Pointer H5MXADataFile::CreateFileWithModel ( const std::string &  filename,
IDataModel::Pointer  model 
) [static]

IDataFile::Pointer H5MXADataFile::CreateEmptyFile ( const std::string &  filename  )  [static]

std::string H5MXADataFile::getFilename (  )  [virtual]

returns the name of the file that is actively being read from or written to.

Implements IDataFile.

IDataModel::Pointer H5MXADataFile::getDataModel (  )  [virtual]

returns the DataModel as read from the data file

Returns:
A DataModelPtr oject. A NULL wrapped pointer is perfectly valid

Implements IDataFile.

int32 H5MXADataFile::createFile (  )  [virtual]

Creates a new data file, first deleting and existing file with the same name.

Returns:
Error code < 0 is error. 0 or positive is Success

Implements IDataFile.

int32 H5MXADataFile::openFile ( bool  readOnly  )  [virtual]

Opens an existing data file.

Returns:
Error code < 0 is error. 0 or positive is Success

Implements IDataFile.

int32 H5MXADataFile::closeFile ( bool  saveModel  )  [virtual]

Closes the data file. Any further access to the file will fail.

Returns:
Error code < 0 is error. 0 or positive is Success

Implements IDataFile.

float H5MXADataFile::supportedMXAFileVersion (  )  [virtual]

Checks if the file version of the data file is with in the bounds of the library to read/parse the data model.

Implements IDataFile.

bool H5MXADataFile::isFileOpen (  )  [virtual]

Returns if the file is currently in the "open" state. If this file is OPEN then file operations (Read/Write data or model) can be performed on the file.

Implements IDataFile.

bool H5MXADataFile::isReadOnly (  )  [virtual]

Was the file opened in ReadOnly mode.

Implements IDataFile.

int32 H5MXADataFile::saveDataModel (  )  [virtual]

Writes the Data Model into the underlying data file overwriting any existing model. This may have adverse effects on the ability to retrieve data from the data file if the data model differs in structure from the original data model.

Returns:
Error code < 0 is error. 0 or positive is Success

Implements IDataFile.

int32 H5MXADataFile::writeData ( const IDataset::Pointer  dataset  ) 

int32 H5MXADataFile::readData ( const IDataset::Pointer  dataset  ) 

hid_t H5MXADataFile::getFileId (  )  [virtual]

Returns the unique identifier for the open file.

Returns:

Implements IDataFile.

int32 H5MXADataFile::_writeDataModel (  )  [protected]

Writes the data model to the data file. Any existing model is over-written with the new/modified model.

Returns:
Error code < 0 is error. 0 or positive is Success

int32 H5MXADataFile::_readDataModel (  )  [protected]

Loads the data model from the data file. If a data model can not be loaded from the file, then a NULL wrapped model will be returned.

Returns:
Error code < 0 is error. 0 or positive is Success

void H5MXADataFile::_setWeakPointer ( boost::weak_ptr< IDataFile weakPtr  )  [protected]

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


Member Data Documentation

std::string H5MXADataFile::_filename [private]

hid_t H5MXADataFile::_fileId [private]

bool H5MXADataFile::_isFileOpen [private]

bool H5MXADataFile::_isReadOnly [private]

IDataModel::Pointer H5MXADataFile::_dataModel [private]

boost::weak_ptr<IDataFile> H5MXADataFile::_weakPtr [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