20 #ifndef OST_IO_MAP_IO_PLUGIN_H
21 #define OST_IO_MAP_IO_PLUGIN_H
23 #include <boost/shared_ptr.hpp>
24 #include <boost/filesystem/operations.hpp>
31 namespace ost {
namespace io {
47 virtual bool MatchContent(
unsigned char* header)
const = 0;
49 virtual bool MatchSuffix(
const String& loc)
const =0 ;
51 virtual String GetFormatName()
const =0;
52 virtual String GetFormatDescription()
const =0;
53 virtual bool ProvidesImport()
const = 0;
54 virtual bool ProvidesExport()
const = 0;
59 template <
class HANDLER>
63 virtual bool MatchContent(
unsigned char* header)
const {
64 return HANDLER::MatchContent(header);
68 return HANDLER::MatchType(type);
71 virtual bool MatchSuffix(
const String& loc)
const {
72 return HANDLER::MatchSuffix(loc);
75 virtual String GetFormatName()
const {
76 return HANDLER::GetFormatName();
79 virtual String GetFormatDescription()
const {
80 return HANDLER::GetFormatDescription();
82 virtual bool ProvidesImport()
const
84 return HANDLER::ProvidesImport();
87 virtual bool ProvidesExport()
const
89 return HANDLER::ProvidesExport();