00001 #ifndef ANALYSISALGORITHMMAP_H
00002 #define ANALYSISALGORITHMMAP_H
00003
00004 #include <string>
00005 #include <map>
00006 #include <boost/utility.hpp>
00007 #include <boost/shared_ptr.hpp>
00008 #include "Sct/LogicErrors.h"
00009
00010 using std::string;
00011 using std::map;
00012 using std::auto_ptr;
00013 using boost::shared_ptr;
00014
00015 class TestData;
00016
00017 namespace SctAnalysis {
00018
00019 class AnalysisAlgorithm;
00020
00027 class AnalysisAlgorithmMap : boost::noncopyable {
00028 public:
00032 static AnalysisAlgorithmMap& instance();
00033
00039 shared_ptr<AnalysisAlgorithm> getAlgorithm(const TestData& testData, const string& moduleName) const throw(Sct::InvalidArgument);
00040
00048 bool setAlgorithm(const string testName, auto_ptr<AnalysisAlgorithm> alg) throw();
00049
00054 string getStatus(string testName);
00055
00060 string getAllStatus();
00061
00062
00063 private:
00064
00065 AnalysisAlgorithmMap() {}
00067 map<string, shared_ptr<AnalysisAlgorithm> > algMap;
00068 };
00069
00070 }
00071
00072 #endif //#ifndef ANALYSISALGORITHMMAP_H