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;
59 const String& type)
const = 0;
61 const String& type)
const = 0;
69 template <
class HANDLER>
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();
pure abstract base class for creation of a specfic alignment io handler
virtual String GetFormatDescription() const =0
virtual bool ProvidesExport(const boost::filesystem::path &loc, const String &type) const =0
virtual String GetFormatName() const =0
virtual ~SequenceIOHandlerFactoryBase()
virtual bool ProvidesImport(const boost::filesystem::path &loc, const String &type) const =0
virtual SequenceIOHandlerPtr Create() const =0
pure abstract base class for entity io handlers
virtual void Import(seq::SequenceList &sequences, const boost::filesystem::path &loc)=0
virtual void Export(const seq::ConstSequenceList &ent, std::ostream &ostream) const =0
virtual void Import(seq::SequenceList &ent, std::istream &instream)=0
virtual void Export(const seq::ConstSequenceList &ent, const boost::filesystem::path &loc) const =0
virtual ~SequenceIOHandler()
list of immutable sequences.
boost::shared_ptr< SequenceIOHandler > SequenceIOHandlerPtr
boost::shared_ptr< SequenceIOHandlerFactoryBase > SequenceIOHandlerFactoryBasePtr