00001 #ifndef SCT_STREAMER_H
00002 #define SCT_STREAMER_H
00003
00004 #include <boost/shared_ptr.hpp>
00005 #include "Sct/OStream.h"
00006 #include "Sct/IStream.h"
00007 #include "Sct/IOManager.h"
00008 #include "Sct/Streamable.h"
00009
00010
00011
00012 using boost::shared_ptr;
00013
00014 namespace Sct {
00026 class Streamer {
00027 public:
00028 virtual ~Streamer() {}
00029
00037 virtual void write(OStream& out, const Streamable& ob, const IOManager& manager) const = 0;
00038
00046 virtual shared_ptr<Streamable> read(IStream& in, const IOManager& manager) const = 0;
00047
00055 virtual void read(IStream& in, Streamable& ob, const IOManager& manager) const = 0;
00056
00057 virtual unsigned getVersion() const throw()= 0;
00058 };
00059
00060 }
00061
00062 #endif //SCT_STREAMER_H