24 #ifndef OST_IO_PROFILE_IO_HANDLER_HH
25 #define OST_IO_PROFILE_IO_HANDLER_HH
27 #include <boost/shared_ptr.hpp>
28 #include <boost/filesystem/operations.hpp>
34 namespace ost {
namespace io {
42 const boost::filesystem::path& loc) = 0;
48 const boost::filesystem::path& loc)
const = 0;
58 const String& format=
"auto")
const = 0;
60 const String& format=
"auto")
const = 0;
68 template <
class HANDLER>
70 virtual bool ProvidesImport(
const boost::filesystem::path& loc,
71 const String& format=
"auto")
const {
72 return HANDLER::ProvidesImport(loc, format);
75 virtual bool ProvidesExport(
const boost::filesystem::path& loc,
76 const String& format=
"auto")
const {
77 return HANDLER::ProvidesExport(loc, format);
84 virtual String GetFormatName()
const {
85 return HANDLER::GetFormatName();
88 virtual String GetFormatDescription()
const {
89 return HANDLER::GetFormatDescription();
pure abstract base class for creation of a specfic io handler
virtual bool ProvidesExport(const boost::filesystem::path &loc, const String &format="auto") const =0
virtual String GetFormatDescription() const =0
virtual ProfileIOHandlerPtr Create() const =0
virtual String GetFormatName() const =0
virtual ~ProfileIOHandlerFactoryBase()
virtual bool ProvidesImport(const boost::filesystem::path &loc, const String &format="auto") const =0
virtual void Import(seq::ProfileHandle &prof, const boost::filesystem::path &loc)=0
virtual void Export(const seq::ProfileHandle &prof, const boost::filesystem::path &loc) const =0
virtual ~ProfileIOHandler()
virtual void ImportFromString(seq::ProfileHandle &prof, const String &data)=0
Provides a profile for a sequence.
boost::shared_ptr< ProfileIOHandler > ProfileIOHandlerPtr
boost::shared_ptr< ProfileIOHandlerFactoryBase > ProfileIOHandlerFactoryBasePtr