OpenMesh::IO::_IOManager_ Class Reference

#include <IOManager.hh>

List of all members.

Public Member Functions

size_t binary_size (const std::string &_format, BaseExporter &_be, Options _opt=Options::Default)
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
const std::string & qt_write_filters () const
bool read (std::istream &_filename, const std::string &_ext, BaseImporter &_bi, Options &_opt)
bool read (const std::string &_filename, BaseImporter &_bi, Options &_opt)
bool register_module (BaseWriter *_bw)
bool register_module (BaseReader *_bl)
bool write (std::ostream &_filename, const std::string &_ext, BaseExporter &_be, Options _opt=Options::Default)
bool write (const std::string &_filename, BaseExporter &_be, Options _opt=Options::Default)

Private Member Functions

 _IOManager_ ()
const BaseWriterfind_writer (const std::string &_format)
void update_read_filters ()
void update_write_filters ()

Private Attributes

std::string read_filters_
std::set< BaseReader * > reader_modules_
std::string write_filters_
std::set< BaseWriter * > writer_modules_

Friends

_IOManager_IOManager ()

Detailed Description

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:
mesh_io

Definition at line 91 of file IOManager.hh.


Constructor & Destructor Documentation

OpenMesh::IO::_IOManager_::_IOManager_ (  )  [inline, private]

Definition at line 69 of file IOManager.hh.


Member Function Documentation

size_t OpenMesh::IO::_IOManager_::binary_size ( const std::string &  _format,
BaseExporter _be,
Options  _opt = Options::Default 
) [inline]

Definition at line 127 of file IOManager.hh.

bool OpenMesh::IO::_IOManager_::can_read ( const std::string &  _format  )  const

Returns true if the format is supported by one of the reader modules.

bool OpenMesh::IO::_IOManager_::can_write ( const std::string &  _format  )  const

Returns true if the format is supported by one of the writer modules.

const BaseWriter* OpenMesh::IO::_IOManager_::find_writer ( const std::string &  _format  )  [private]
const std::string& OpenMesh::IO::_IOManager_::qt_read_filters (  )  const [inline]

Returns all readable file extension + descriptions in one string. File formats are separated by ;;. Convenience function for Qt file dialogs.

Definition at line 144 of file IOManager.hh.

const std::string& OpenMesh::IO::_IOManager_::qt_write_filters (  )  const [inline]

Returns all writeable file extension + descriptions in one string. File formats are separated by ;;. Convenience function for Qt file dialogs.

Definition at line 151 of file IOManager.hh.

bool OpenMesh::IO::_IOManager_::read ( std::istream &  _filename,
const std::string &  _ext,
BaseImporter _bi,
Options _opt 
)

Read a mesh from open std::istream _is. The target data structure is specified by the given BaseImporter. The sread method consecutively queries all of its reader modules. True is returned upon success, false if all reader modules failed to use _is.

bool OpenMesh::IO::_IOManager_::read ( const std::string &  _filename,
BaseImporter _bi,
Options _opt 
)

Read a mesh from file _filename. The target data structure is specified by the given BaseImporter. The read method consecutively queries all of its reader modules. True is returned upon success, false if all reader modules failed to interprete _filename.

bool OpenMesh::IO::_IOManager_::register_module ( BaseWriter _bw  )  [inline]

Registers a new writer module. A call to this function should be implemented in the constructor of all classed derived from BaseWriter.

Definition at line 184 of file IOManager.hh.

bool OpenMesh::IO::_IOManager_::register_module ( BaseReader _bl  )  [inline]

Registers a new reader module. A call to this function should be implemented in the constructor of all classes derived from BaseReader.

Definition at line 172 of file IOManager.hh.

void OpenMesh::IO::_IOManager_::update_read_filters (  )  [private]
void OpenMesh::IO::_IOManager_::update_write_filters (  )  [private]
bool OpenMesh::IO::_IOManager_::write ( std::ostream &  _filename,
const std::string &  _ext,
BaseExporter _be,
Options  _opt = Options::Default 
)

Write a mesh to open std::ostream _os. The source data structure is specified by the given BaseExporter. The 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 OpenMesh::IO::_IOManager_::write ( const std::string &  _filename,
BaseExporter _be,
Options  _opt = Options::Default 
)

Write a mesh to file _filename. The source data structure is specified by the given BaseExporter. The 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.


Friends And Related Function Documentation

_IOManager_& IOManager (  )  [friend]

Member Data Documentation

Definition at line 203 of file IOManager.hh.

Definition at line 197 of file IOManager.hh.

Definition at line 206 of file IOManager.hh.

Definition at line 200 of file IOManager.hh.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


openmesh
Author(s): Benjamin Pitzer
autogenerated on Fri Jan 11 12:11:17 2013