OpenMesh.Core.IO.IOManager
- class
_IOManager_
;
- This is the real IOManager class that is later encapsulated by
SingletonT to enforce its uniqueness. 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.
See Also:
\ref mesh_io
- bool
read
(char[] _filename, BaseImporter _bi, ref Options _opt);
- Read a mesh from file filename. The target data structure is specified
by the given BaseImporter. The \c
read
method consecutively queries all
of its reader modules. True is returned upon success, false if all
reader modules failed to interprete filename.
- bool
write
(char[] _filename, BaseExporter _be, Options _opt = opCall(cast(Flag)0));
- Write a mesh to file filename. The source data structure is specified
by the given BaseExporter. The \c save method consecutively queries all
of its writer modules. True is returned upon success, false if all
writer modules failed to
write
the requested format.
Options is determined by filename's extension.
- bool
can_read
(char[] _format);
- Returns true if the format is supported by one of the reader modules.
- bool
can_write
(char[] _format);
- Returns true if the format is supported by one of the writer modules.
- char[]
qt_read_filters
();
- Returns all readable file extension + descriptions in one string.
File formats are separated by ;;.
Convenience function for Qt file dialogs.
- char[]
qt_write_filters
();
- Returns all writeable file extension + descriptions in one string.
File formats are separated by ;;.
Convenience function for Qt file dialogs.
- bool
register_module
(BaseReader _bl);
- Registers a new reader module. A call to this function should be
implemented in the constructor of all classes derived from BaseReader.
- bool
register_module
(BaseWriter _bw);
- Registers a new writer module. A call to this function should be
implemented in the constructor of all classed derived from BaseWriter.
|