19 #ifndef OST_IO_SEQUENCE_IO_HANDLER_HH
20 #define OST_IO_SEQUENCE_IO_HANDLER_HH
22 #include <boost/shared_ptr.hpp>
23 #include <boost/filesystem/operations.hpp>
30 namespace ost {
namespace io {
39 const boost::filesystem::path& loc) = 0;
42 const boost::filesystem::path& loc)
const = 0;
45 std::istream& instream)=0;
48 std::ostream& ostream)
const=0;
58 virtual bool ProvidesImport(
const boost::filesystem::path& loc,
59 const String& type)
const = 0;
60 virtual bool ProvidesExport(
const boost::filesystem::path& loc,
61 const String& type)
const = 0;
63 virtual String GetFormatName()
const =0;
64 virtual String GetFormatDescription()
const =0;
69 template <
class HANDLER>
70 class SequenceIOHandlerFactory:
public SequenceIOHandlerFactoryBase {
71 virtual bool ProvidesImport(
const boost::filesystem::path& loc,
72 const String& type)
const {
73 return HANDLER::ProvidesImport(loc,type);
76 virtual bool ProvidesExport(
const boost::filesystem::path& loc,
77 const String& type)
const {
78 return HANDLER::ProvidesExport(loc,type);
85 virtual String GetFormatName()
const {
86 return HANDLER::GetFormatName();
89 virtual String GetFormatDescription()
const {
90 return HANDLER::GetFormatDescription();
boost::shared_ptr< SequenceIOHandler > SequenceIOHandlerPtr
virtual ~SequenceIOHandler()
list of immutable sequences.
virtual ~SequenceIOHandlerFactoryBase()
boost::shared_ptr< SequenceIOHandlerFactoryBase > SequenceIOHandlerFactoryBasePtr