19 #ifndef OST_IO_ENTITY_IO_PLUGIN_H
20 #define OST_IO_ENTITY_IO_PLUGIN_H
22 #include <boost/shared_ptr.hpp>
23 #include <boost/filesystem/operations.hpp>
30 namespace ost {
namespace io {
42 const boost::filesystem::path& loc)=0;
45 const boost::filesystem::path& loc)
const = 0;
48 std::istream& stream)=0;
51 std::ostream& stream)
const=0;
52 virtual bool RequiresBuilder()
const=0;
62 virtual bool ProvidesImport(
const boost::filesystem::path& loc,
const String& type)
const = 0;
63 virtual bool ProvidesExport(
const boost::filesystem::path& loc,
const String& type)
const = 0;
65 virtual String GetFormatName()
const =0;
66 virtual String GetFormatDescription()
const =0;
71 template <
class HANDLER>
72 class EntityIOHandlerFactory:
public EntityIOHandlerFactoryBase
74 virtual bool ProvidesImport(
const boost::filesystem::path& loc,
const String& type)
const {
75 return HANDLER::ProvidesImport(loc,type);
78 virtual bool ProvidesExport(
const boost::filesystem::path& loc,
const String& type)
const {
79 return HANDLER::ProvidesExport(loc,type);
82 virtual String GetFormatName()
const {
83 return HANDLER::GetFormatName();
86 virtual String GetFormatDescription()
const {
87 return HANDLER::GetFormatDescription();