64 #include <OpenMesh/Core/System/config.h>
65 #include <OpenMesh/Core/IO/Options.hh>
66 #include <OpenMesh/Core/IO/importer/BaseImporter.hh>
67 #include <OpenMesh/Core/Utils/SingletonT.hh>
102 virtual std::string
get_magic()
const {
return std::string(
""); }
112 virtual bool read(
const std::string& _filename,
122 virtual bool read(std::istream& _is,
132 virtual bool can_u_read(
const std::string& _filename)
const;
138 bool check_extension(
const std::string& _fname,
139 const std::string& _ext)
const;
150 static inline std::string &left_trim(std::string &_string) {
153 #if ( __cplusplus >= 201103L || _MSVC_LANG >= 201103L )
155 _string.erase(_string.begin(), std::find_if(_string.begin(), _string.end(), [](
int i)->int { return ! std::isspace(i); }));
158 _string.erase(_string.begin(), std::find_if(_string.begin(), _string.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
171 static inline std::string &right_trim(std::string &_string) {
174 #if ( __cplusplus >= 201103L || _MSVC_LANG >= 201103L )
176 _string.erase(std::find_if(_string.rbegin(), _string.rend(), [](
int i)->int { return ! std::isspace(i); } ).base(), _string.end());
179 _string.erase(std::find_if(_string.rbegin(), _string.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), _string.end());
194 static inline std::string &trim(std::string &_string) {
195 return left_trim(right_trim(_string));
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
Base class for importer modules.
Definition: BaseImporter.hh:84
Set options for reader/writer modules.
Definition: Options.hh:91
Base class for reader modules.
Definition: BaseReader.hh:87
virtual bool read(std::istream &_is, BaseImporter &_bi, Options &_opt)=0
Reads a mesh given by a std::stream.
virtual std::string get_description() const =0
Returns a brief description of the file type that can be parsed.
virtual std::string get_extensions() const =0
Returns a string with the accepted file extensions separated by a whitespace and in small caps.
virtual std::string get_magic() const
Return magic bits used to determine file format.
Definition: BaseReader.hh:102
virtual bool read(const std::string &_filename, BaseImporter &_bi, Options &_opt)=0
Reads a mesh given by a filename.
virtual ~BaseReader()
Destructor.
Definition: BaseReader.hh:91