57 #ifndef __BASEREADER_HH__ 58 #define __BASEREADER_HH__ 73 #include <OpenMesh/Core/IO/Options.hh> 74 #include <OpenMesh/Core/IO/importer/BaseImporter.hh> 75 #include <OpenMesh/Core/Utils/SingletonT.hh> 102 virtual std::string get_description()
const = 0;
107 virtual std::string get_extensions()
const = 0;
110 virtual std::string
get_magic()
const {
return std::string(
""); }
120 virtual bool read(
const std::string& _filename,
130 virtual bool read(std::istream& _is,
140 virtual bool can_u_read(
const std::string& _filename)
const;
146 bool check_extension(
const std::string& _fname,
147 const std::string& _ext)
const;
158 static inline std::string &left_trim(std::string &_string) {
159 _string.erase(_string.begin(), std::find_if(_string.begin(), _string.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
170 static inline std::string &right_trim(std::string &_string) {
171 _string.erase(std::find_if(_string.rbegin(), _string.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), _string.end());
182 static inline std::string &trim(std::string &_string) {
183 return left_trim(right_trim(_string));
virtual ~BaseReader()
Destructor.
virtual std::string get_magic() const
Return magic bits used to determine file format.
Set options for reader/writer modules.