Developer Documentation
OpenMesh::IO::_OMReader_ Class Reference

#include <OpenFlipper/libs_required/OpenMesh/src/OpenMesh/Core/IO/reader/OMReader.hh>

Inheritance diagram for OpenMesh::IO::_OMReader_:
OpenMesh::IO::BaseReader

Public Member Functions

std::string get_description () const override
 Returns a brief description of the file type that can be parsed. More...
 
std::string get_extensions () const override
 
std::string get_magic () const override
 Return magic bits used to determine file format. More...
 
bool read (const std::string &_filename, BaseImporter &_bi, Options &_opt) override
 
bool read (std::istream &_is, BaseImporter &_bi, Options &_opt) override
 Stream Reader for std::istream input in binary format. More...
 
virtual bool can_u_read (const std::string &_filename) const override
 Returns true if writer can parse _filename (checks extension). _filename can also provide an extension without a name for a file e.g. _filename == "om" checks, if the reader can read the "om" extension. More...
 
virtual bool can_u_read (std::istream &_is) const
 
- Public Member Functions inherited from OpenMesh::IO::BaseReader
virtual ~BaseReader ()
 Destructor. More...
 
virtual std::string get_description () const =0
 Returns a brief description of the file type that can be parsed. More...
 
virtual std::string get_extensions () const =0
 
virtual std::string get_magic () const
 Return magic bits used to determine file format. More...
 
virtual bool read (const std::string &_filename, BaseImporter &_bi, Options &_opt)=0
 
virtual bool read (std::istream &_is, BaseImporter &_bi, Options &_opt)=0
 
virtual bool can_u_read (const std::string &_filename) const
 Returns true if writer can parse _filename (checks extension). _filename can also provide an extension without a name for a file e.g. _filename == "om" checks, if the reader can read the "om" extension. More...
 

Private Types

typedef OMFormat::Header Header
 
typedef OMFormat::Chunk::Header ChunkHeader
 
typedef OMFormat::Chunk::PropertyName PropertyName
 

Private Member Functions

bool supports (const OMFormat::uint8 version) const
 
bool read_ascii (std::istream &_is, BaseImporter &_bi, const Options &_opt) const
 
bool read_binary (std::istream &_is, BaseImporter &_bi, const Options &_opt) const
 
bool read_binary_vertex_chunk (std::istream &_is, BaseImporter &_bi, const Options &_opt, bool _swap) const
 
bool read_binary_face_chunk (std::istream &_is, BaseImporter &_bi, const Options &_opt, bool _swap) const
 
bool read_binary_edge_chunk (std::istream &_is, BaseImporter &_bi, const Options &_opt, bool _swap) const
 
bool read_binary_halfedge_chunk (std::istream &_is, BaseImporter &_bi, const Options &_opt, bool _swap) const
 
bool read_binary_mesh_chunk (std::istream &_is, BaseImporter &_bi, const Options &_opt, bool _swap) const
 
size_t restore_binary_custom_data (std::istream &_is, BaseProperty *_bp, size_t _n_elem, bool _swap) const
 
void add_generic_property (OMFormat::Chunk::PropertyName &_property_type, BaseImporter &_bi) const
 

Private Attributes

size_t bytes_
 
Options fileOptions_
 
Header header_
 
ChunkHeader chunk_header_
 
PropertyName property_name_
 

Additional Inherited Members

- Protected Member Functions inherited from OpenMesh::IO::BaseReader
bool check_extension (const std::string &_fname, const std::string &_ext) const
 

Detailed Description

Implementation of the OM format reader. This class is singleton'ed by SingletonT to OMReader.

Definition at line 85 of file OMReader.hh.

Member Typedef Documentation

◆ ChunkHeader

typedef OMFormat::Chunk::Header OpenMesh::IO::_OMReader_::ChunkHeader
private

Definition at line 117 of file OMReader.hh.

◆ Header

typedef OMFormat::Header OpenMesh::IO::_OMReader_::Header
private

Definition at line 116 of file OMReader.hh.

◆ PropertyName

typedef OMFormat::Chunk::PropertyName OpenMesh::IO::_OMReader_::PropertyName
private

Definition at line 118 of file OMReader.hh.

Constructor & Destructor Documentation

◆ _OMReader_()

OpenMesh::IO::_OMReader_::_OMReader_ ( )

Definition at line 83 of file OMReader.cc.

◆ ~_OMReader_()

virtual OpenMesh::IO::_OMReader_::~_OMReader_ ( )
inlinevirtual

Definition at line 90 of file OMReader.hh.

Member Function Documentation

◆ add_generic_property()

void OpenMesh::IO::_OMReader_::add_generic_property ( OMFormat::Chunk::PropertyName &  _property_type,
BaseImporter _bi 
) const
private

Definition at line 835 of file OMReader.cc.

◆ can_u_read() [1/2]

bool OpenMesh::IO::_OMReader_::can_u_read ( const std::string &  _filename) const
overridevirtual

Returns true if writer can parse _filename (checks extension). _filename can also provide an extension without a name for a file e.g. _filename == "om" checks, if the reader can read the "om" extension.

Parameters
_filenamecomplete name of a file or just the extension
Returns
true, if reader can read data with the given extension

Reimplemented from OpenMesh::IO::BaseReader.

Definition at line 235 of file OMReader.cc.

◆ can_u_read() [2/2]

bool OpenMesh::IO::_OMReader_::can_u_read ( std::istream &  _is) const
virtual

Definition at line 249 of file OMReader.cc.

◆ get_description()

std::string OpenMesh::IO::_OMReader_::get_description ( ) const
inlineoverridevirtual

Returns a brief description of the file type that can be parsed.

Implements OpenMesh::IO::BaseReader.

Definition at line 92 of file OMReader.hh.

◆ get_extensions()

std::string OpenMesh::IO::_OMReader_::get_extensions ( ) const
inlineoverridevirtual

Returns a string with the accepted file extensions separated by a whitespace and in small caps.

Implements OpenMesh::IO::BaseReader.

Definition at line 93 of file OMReader.hh.

◆ get_magic()

std::string OpenMesh::IO::_OMReader_::get_magic ( ) const
inlineoverridevirtual

Return magic bits used to determine file format.

Reimplemented from OpenMesh::IO::BaseReader.

Definition at line 94 of file OMReader.hh.

◆ read() [1/2]

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

Reads a mesh given by a filename. Usually this method opens a stream and passes it to stream read method. Acceptance checks by filename extension can be placed here.

Options can be passed via _opt. After execution _opt contains the Options that were available

Implements OpenMesh::IO::BaseReader.

Definition at line 92 of file OMReader.cc.

◆ read() [2/2]

bool OpenMesh::IO::_OMReader_::read ( std::istream &  _is,
BaseImporter _bi,
Options _opt 
)
overridevirtual

Stream Reader for std::istream input in binary format.

Implements OpenMesh::IO::BaseReader.

Definition at line 129 of file OMReader.cc.

◆ read_ascii()

bool OpenMesh::IO::_OMReader_::read_ascii ( std::istream &  _is,
BaseImporter _bi,
const Options _opt 
) const
private

Definition at line 158 of file OMReader.cc.

◆ read_binary()

bool OpenMesh::IO::_OMReader_::read_binary ( std::istream &  _is,
BaseImporter _bi,
const Options _opt 
) const
private

Definition at line 167 of file OMReader.cc.

◆ read_binary_edge_chunk()

bool OpenMesh::IO::_OMReader_::read_binary_edge_chunk ( std::istream &  _is,
BaseImporter _bi,
const Options _opt,
bool  _swap 
) const
private

Definition at line 592 of file OMReader.cc.

◆ read_binary_face_chunk()

bool OpenMesh::IO::_OMReader_::read_binary_face_chunk ( std::istream &  _is,
BaseImporter _bi,
const Options _opt,
bool  _swap 
) const
private

Definition at line 450 of file OMReader.cc.

◆ read_binary_halfedge_chunk()

bool OpenMesh::IO::_OMReader_::read_binary_halfedge_chunk ( std::istream &  _is,
BaseImporter _bi,
const Options _opt,
bool  _swap 
) const
private

Definition at line 644 of file OMReader.cc.

◆ read_binary_mesh_chunk()

bool OpenMesh::IO::_OMReader_::read_binary_mesh_chunk ( std::istream &  _is,
BaseImporter _bi,
const Options _opt,
bool  _swap 
) const
private

Definition at line 752 of file OMReader.cc.

◆ read_binary_vertex_chunk()

bool OpenMesh::IO::_OMReader_::read_binary_vertex_chunk ( std::istream &  _is,
BaseImporter _bi,
const Options _opt,
bool  _swap 
) const
private

Definition at line 294 of file OMReader.cc.

◆ restore_binary_custom_data()

size_t OpenMesh::IO::_OMReader_::restore_binary_custom_data ( std::istream &  _is,
BaseProperty _bp,
size_t  _n_elem,
bool  _swap 
) const
private

Definition at line 789 of file OMReader.cc.

◆ supports()

bool OpenMesh::IO::_OMReader_::supports ( const OMFormat::uint8  version) const
private

Definition at line 286 of file OMReader.cc.

Member Data Documentation

◆ bytes_

size_t OpenMesh::IO::_OMReader_::bytes_
mutableprivate

Definition at line 121 of file OMReader.hh.

◆ chunk_header_

ChunkHeader OpenMesh::IO::_OMReader_::chunk_header_
mutableprivate

Definition at line 124 of file OMReader.hh.

◆ fileOptions_

Options OpenMesh::IO::_OMReader_::fileOptions_
mutableprivate

Definition at line 122 of file OMReader.hh.

◆ header_

Header OpenMesh::IO::_OMReader_::header_
mutableprivate

Definition at line 123 of file OMReader.hh.

◆ property_name_

PropertyName OpenMesh::IO::_OMReader_::property_name_
mutableprivate

Definition at line 125 of file OMReader.hh.


The documentation for this class was generated from the following files: