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> 94 virtual std::string get_description()
const = 0;
99 virtual std::string get_extensions()
const = 0;
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));
virtual ~BaseReader()
Destructor.
Definition: BaseReader.hh:91
Set options for reader/writer modules.
Definition: Options.hh:90
Base class for importer modules.
Definition: BaseImporter.hh:83
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
Base class for reader modules.
Definition: BaseReader.hh:86
virtual std::string get_magic() const
Return magic bits used to determine file format.
Definition: BaseReader.hh:102