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
00050 private:
00051
00052 AnalysisAlgorithmMap() {}
00054 map<string, shared_ptr<AnalysisAlgorithm> > algMap;
00055 };
00056
00057 }
00058
00059 #endif //#ifndef ANALYSISALGORITHMMAP_H