00001 #ifndef SCTDATA_IO_TGRAPHSTREAMER_H 00002 #define SCTDATA_IO_TGRAPHSTREAMER_H 00003 00004 #include "Sct/Streamer.h" 00005 #include "TGraph.h" 00006 #include "Sct/Exception.h" 00007 #include "Sct/LogicErrors.h" 00008 #include "Sct/IoExceptions.h" 00009 00010 using namespace Sct; 00011 00012 namespace SctData { 00013 namespace IO { 00014 00018 class TGraphStreamer_v1 : public virtual Streamer { 00019 public: 00020 00021 //Streamer_v1 overrides 00022 virtual void write(OStream& out, const Streamable& ob, const IOManager& manager) const throw(LogicError, IoError); 00023 virtual shared_ptr<Streamable> read(IStream& in, const IOManager& manager) const throw(LogicError, IoError); 00024 virtual void read(IStream& in, Streamable& ob, const IOManager& manager) const throw(LogicError, IoError); 00025 virtual unsigned getVersion() const throw() {return s_version;} 00026 00027 protected: 00031 TGraphStreamer_v1() throw(); 00032 00033 private: 00034 static unsigned s_version; 00035 static bool inMap; //true if successfully added to IOManager map 00036 }; 00037 00038 } 00039 } 00040 #endif // #ifndef SCTDATA_IO_TGRAPHSTREAMER_H