00001 #ifndef ARCHIVINGMANAGER_H
00002 #define ARCHIVINGMANAGER_H
00003 #include <boost/utility.hpp>
00004 #include <fstream>
00005 #include <string>
00006 #include <map>
00007 #include <boost/shared_ptr.hpp>
00008 #include "Sct/IoExceptions.h"
00009 #include "Sct/LogicErrors.h"
00010 #include "Sct/Serializable.h"
00011 #include "Archiving.h"
00012 #include "ArchScanResult.h"
00013 #include "ArchTestResult.h"
00014
00015 using std::ofstream;
00016 using std::map;
00017 using std::ostream;
00018 using std::string;
00019
00020
00021
00022
00023 class ArchivingManager : boost::noncopyable {
00024 public:
00026 static ArchivingManager& instance() throw();
00027
00028 bool addScanArchiver(const string& scanName, boost::shared_ptr<ArchScanResult> archiver) throw(Sct::LogicError);
00029 bool addTestArchiver(const string& testName, boost::shared_ptr<ArchTestResult> archiver) throw(Sct::LogicError);
00034 boost::shared_ptr<ArchScanResult> getScanFromMap(shared_ptr<const Serializable> ob) const throw(Sct::LogicError);
00035 boost::shared_ptr<ArchTestResult> getTestFromMap(shared_ptr<const Serializable> ob) const throw(Sct::LogicError);
00036 private:
00037 ~ArchivingManager();
00038 ArchivingManager();
00039
00040
00041 typedef map<string, boost::shared_ptr<ArchScanResult> > ArchivingScanMap;
00042 typedef map<string, boost::shared_ptr<ArchTestResult> > ArchivingTestMap;
00046 ArchivingScanMap theScanMap;
00047 ArchivingTestMap theTestMap;
00048
00049 };
00050
00051
00052 #endif // #ifndef SCTDATA_ARCHIVINGMANAGER