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 {
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();
Manage shared instances of images.
virtual bool MatchContent(unsigned char *header) const =0
virtual bool ProvidesImport() const =0
virtual bool ProvidesExport() const =0
virtual MapIOHandlerPtr Create() const =0
virtual ~MapIOHandlerFactoryBase()
virtual String GetFormatDescription() const =0
virtual bool MatchType(const ImageFormatBase &type) const =0
virtual String GetFormatName() const =0
virtual bool MatchSuffix(const String &loc) const =0
virtual void Export(const img::MapHandle &ent, std::ostream &stream, const ImageFormatBase &formatstruct) const =0
virtual void Import(img::MapHandle &surf, std::istream &stream, const ImageFormatBase &formatstruct)=0
virtual void Export(const img::MapHandle &ent, const boost::filesystem::path &loc, const ImageFormatBase &formatstruct) const =0
virtual void Import(img::MapHandle &surf, const boost::filesystem::path &loc, const ImageFormatBase &formatstruct)=0
boost::shared_ptr< MapIOHandlerFactoryBase > MapIOHandlerFactoryBasePtr
boost::shared_ptr< MapIOHandler > MapIOHandlerPtr