52 #include <OpenMesh/Core/IO/reader/BaseReader.hh> 54 #if defined(OM_CC_MIPS) 70 static inline char tolower(
char c)
85 std::string extension;
86 std::string::size_type pos(_filename.rfind(
"."));
88 if (pos != std::string::npos)
89 extension = _filename.substr(pos+1, _filename.length()-pos-1);
91 extension = _filename;
93 std::transform( extension.begin(), extension.end(),
94 extension.begin(), tolower );
97 return (get_extensions().find(extension) != std::string::npos);
106 check_extension(
const std::string& _fname,
const std::string& _ext)
const 108 std::string cmpExt(_ext);
110 std::transform( _ext.begin(), _ext.end(), cmpExt.begin(), tolower );
112 std::string::size_type pos(_fname.rfind(
"."));
114 if (pos != std::string::npos && !_ext.empty() )
119 ext = _fname.substr(pos+1, _fname.length()-pos-1);
121 std::transform( ext.begin(), ext.end(), ext.begin(), tolower );
123 return ext == cmpExt;
virtual bool can_u_read(const std::string &_filename) const
Returns true if writer can parse _filename (checks extension). _filename can also provide an extensio...