#include <IOManager.hh>
Public Member Functions | |
bool | read (const std::string &_filename, BaseImporter &_bi, Options &_opt) |
Read a mesh from file _filename. | |
bool | write (const std::string &_filename, BaseExporter &_be, Options _opt=Options::Default) |
Write a mesh to file _filename. | |
bool | can_read (const std::string &_format) const |
Returns true if the format is supported by one of the reader modules. | |
bool | can_write (const std::string &_format) const |
Returns true if the format is supported by one of the writer modules. | |
const std::string & | qt_read_filters () const |
Returns all readable file extension + descriptions in one string. | |
const std::string & | qt_write_filters () const |
Returns all writeable file extension + descriptions in one string. | |
bool | register_module (BaseReader *_bl) |
Registers a new reader module. | |
bool | register_module (BaseWriter *_bw) |
Registers a new writer module. |
_IOManager_ is not meant to be used directly by the programmer - the IOManager alias exists for this task.
All reader/writer modules register themselves at this class. For reading or writing data all modules are asked to do the job. If no suitable module is found, an error is returned.
For the sake of reading, the target data structure is hidden behind the BaseImporter interface that takes care of adding vertices or faces.
Writing from a source structure is encapsulate similarly behind a BaseExporter interface, providing iterators over vertices/faces to the writer modules.
|
Returns all readable file extension + descriptions in one string. File formats are separated by two semi-colons. Convenience function for Qt file dialogs. |
|
Returns all writeable file extension + descriptions in one string. File formats are separated by two semicolons. Convenience function for Qt file dialogs. |
|
Read a mesh from file _filename.
The target data structure is specified by the given BaseImporter. The |
|
Registers a new writer module. A call to this function should be implemented in the constructor of all classed derived from BaseWriter. |
|
Registers a new reader module. A call to this function should be implemented in the constructor of all classes derived from BaseReader. |
|
Write a mesh to file _filename.
The source data structure is specified by the given BaseExporter. The |