Main Page   Modules   Namespace List   Class Hierarchy   Data Structures   File List   Namespace Members   Data Fields   Globals   Related Pages  

ISProxyStreamer.cpp

Go to the documentation of this file.
00001 #include "ISProxyStreamer.h"
00002 #include "ISProxy.h"
00003 #include "../IOManager.h"
00004 #include "../File/IOManagerFile.h"
00005 #include <memory>
00006 
00007 using namespace Sct::File;
00008 using namespace std;
00009 
00010 namespace Sct {
00011 namespace ISProxy { 
00012     
00013 ISProxyStreamer::ISProxyStreamer() throw () {}    
00014 bool ISProxyStreamer::inMap = IOManager::addToMap("Sct::ISProxy::ISProxy", auto_ptr<Streamer>(new ISProxyStreamer())); 
00015 
00016 void ISProxyStreamer::write(OStream& out, const Streamable& ob, const IOManager& manager) const throw(LogicError, IoError) {
00017     const ISProxy& var = dynamic_cast<const ISProxy&>(ob);
00018     out << var.getFileName();
00019 }
00020 
00021 shared_ptr<Streamable> ISProxyStreamer::read(IStream& in, const IOManager& manager) const throw(LogicError, IoError) {
00022     string fileName;
00023     in >> fileName;
00024     
00025     return IOManagerFile::instance().read(fileName);
00026 }
00027 
00028 void ISProxyStreamer::read(IStream& in, Streamable& ob, const IOManager& manager) const throw(LogicError, IoError) {
00029     ISProxy& var = dynamic_cast<ISProxy&>(ob);
00030     string fileName;
00031     in >> fileName;
00032     var.setFileName(fileName);
00033 }
00034 
00035 
00036     
00037 }
00038 }

Generated on Mon Dec 15 19:36:05 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3