Inherits IFileIODelegate.
Inheritance diagram for XMLIODelegate:
Public Member Functions | |
XMLIODelegate () | |
virtual | ~XMLIODelegate () |
int32 | writeModelToFile (const std::string &fileName, IDataModel::Pointer model, bool closeWhenFinished, bool deleteExisting) |
Writes the Model to a data file. | |
int32 | readModelFromFile (const std::string &fileName, IDataModel::Pointer model, bool closeWhenFinished, bool openReadOnly) |
Deserializes a Datamodel from a file on disk. | |
bool | supportedMXAFileVersion (float version) |
Checks if the file version of the data file is with in the bounds of the library to read/parse the data model. | |
bool | isMXAFile (const std::string &fileName) |
Is the file describe by an absolute path an MXA based data file. | |
bool | isMXAFile (int32 identifier) |
Is the file identified by the given identifier an MXA Base data file. | |
int32 | openMXAFile (std::string filename, bool readOnly=false) |
Opens an existing MXA Data File. IE an HDF5 file with the proper data model encoded. | |
void | closeMXAFile () |
Closes the currently open file. | |
int32 | getOpenFileId () |
Returns the HDF file id of the currently open file. | |
std::string | getOpenFileName () |
Returns the currently open filename as an absolute path. | |
Private Member Functions | |
XMLIODelegate (const XMLIODelegate &) | |
void | operator= (const XMLIODelegate &) |
Private Attributes | |
std::string | _openFile |
int32 | _fileId |
XMLIODelegate::XMLIODelegate | ( | ) |
XMLIODelegate::~XMLIODelegate | ( | ) | [virtual] |
XMLIODelegate::XMLIODelegate | ( | const XMLIODelegate & | ) | [private] |
MXATypes::MXAError XMLIODelegate::writeModelToFile | ( | const std::string & | fileName, | |
IDataModel::Pointer | model, | |||
bool | closeWhenFinished, | |||
bool | deleteExisting | |||
) | [virtual] |
Writes the Model to a data file.
fileName | The name of the file (and path if needed) to write the model to | |
model | The Model to serialize | |
closeWhenFinished | ||
deleteExisting |
Implements IFileIODelegate.
MXATypes::MXAError XMLIODelegate::readModelFromFile | ( | const std::string & | fileName, | |
IDataModel::Pointer | model, | |||
bool | closeWhenFinished, | |||
bool | openReadOnly | |||
) | [virtual] |
Deserializes a Datamodel from a file on disk.
fileName | The name of the file (including path) to deserialize from | |
model | The model to read the information into | |
closeWhenFinished | ||
openReadOnly |
Implements IFileIODelegate.
bool XMLIODelegate::supportedMXAFileVersion | ( | float | version | ) | [virtual] |
Checks if the file version of the data file is with in the bounds of the library to read/parse the data model.
version | The version to check. |
Implements IFileIODelegate.
bool XMLIODelegate::isMXAFile | ( | const std::string & | fileName | ) | [virtual] |
Is the file describe by an absolute path an MXA based data file.
fileName | The data file to check |
Implements IFileIODelegate.
bool XMLIODelegate::isMXAFile | ( | int32 | identifier | ) |
Is the file identified by the given identifier an MXA Base data file.
int32 XMLIODelegate::openMXAFile | ( | std::string | filename, | |
bool | readOnly = false | |||
) | [virtual] |
Opens an existing MXA Data File. IE an HDF5 file with the proper data model encoded.
filename | The absolute path of the file to open | |
readOnly | True if you want the file opened as read only. False if you need to write something to the file |
Implements IFileIODelegate.
void XMLIODelegate::closeMXAFile | ( | ) | [virtual] |
int32 XMLIODelegate::getOpenFileId | ( | ) | [virtual] |
std::string XMLIODelegate::getOpenFileName | ( | ) | [virtual] |
void XMLIODelegate::operator= | ( | const XMLIODelegate & | ) | [private] |
std::string XMLIODelegate::_openFile [private] |
int32 XMLIODelegate::_fileId [private] |