48 #ifndef __IOMANAGER_HH__
49 #define __IOMANAGER_HH__
62 #include <OpenMesh/Core/System/config.h>
63 #include <OpenMesh/Core/IO/Options.hh>
64 #include <OpenMesh/Core/IO/reader/BaseReader.hh>
65 #include <OpenMesh/Core/IO/writer/BaseWriter.hh>
66 #include <OpenMesh/Core/IO/importer/BaseImporter.hh>
67 #include <OpenMesh/Core/IO/exporter/BaseExporter.hh>
68 #include <OpenMesh/Core/Utils/SingletonT.hh>
123 bool read(
const std::string& _filename,
133 bool read(std::istream& _filename,
134 const std::string& _ext,
145 bool write(
const std::string& _filename,
148 std::streamsize _precision = 6);
156 bool write(std::ostream& _filename,
157 const std::string& _ext,
160 std::streamsize _precision = 6);
164 bool can_read(
const std::string& _format )
const;
167 bool can_write(
const std::string& _format )
const;
201 void update_read_filters();
205 void update_write_filters();
217 reader_modules_.insert(_bl);
218 update_read_filters();
229 writer_modules_.insert(_bw);
230 update_write_filters();
237 const BaseWriter *find_writer(
const std::string& _format);
240 std::set<BaseReader*> reader_modules_;
243 std::set<BaseWriter*> writer_modules_;
246 std::string read_filters_;
249 std::string write_filters_;
258 OPENMESHDLLEXPORT _IOManager_& IOManager();
Base class for reader modules.
Definition: BaseReader.hh:86
Base class for importer modules.
Definition: BaseImporter.hh:81
No options.
Definition: Options.hh:97
Set options for reader/writer modules.
Definition: Options.hh:88
const std::string & qt_read_filters() const
Returns all readable file extension + descriptions in one string.
Definition: IOManager.hh:187
const std::string & qt_write_filters() const
Returns all writeable file extension + descriptions in one string.
Definition: IOManager.hh:194
size_t binary_size(const Mesh &_mesh, const std::string &_ext, Options _opt=Options::Default)
Get binary size of data.
Definition: MeshIO.hh:253
bool register_module(BaseReader *_bl)
Registers a new reader module.
Definition: IOManager.hh:215
Base class for exporter modules.
Definition: BaseExporter.hh:82
Base class for all writer modules.
Definition: BaseWriter.hh:81
This is the real IOManager class that is later encapsulated by SingletonT to enforce its uniqueness...
Definition: IOManager.hh:100
bool register_module(BaseWriter *_bw)
Registers a new writer module.
Definition: IOManager.hh:227
virtual size_t binary_size(BaseExporter &, Options) const
Returns expected size of file if binary format is supported else 0.
Definition: BaseWriter.hh:122