00001 #ifndef FITALGORITHMMAP_H
00002 #define FITALGORITHMMAP_H
00003
00004 #include <string>
00005 #include <map>
00006 #include <memory>
00007 #include <boost/utility.hpp>
00008 #include <boost/shared_ptr.hpp>
00009 #include "Sct/LogicErrors.h"
00010 #include "Sct/IoExceptions.h"
00011
00012 namespace SctData {
00013 class ConfigurationVariable;
00014 }
00015
00016 using namespace std;
00017 using namespace boost;
00018 using SctData::ConfigurationVariable;
00019
00020 namespace SctFitter {
00021
00022 class FitAlgorithm;
00023
00033 class FitAlgorithmMap : boost::noncopyable {
00034 public:
00038 static FitAlgorithmMap& instance();
00039
00044 const FitAlgorithm& getAlgorithm(const ConfigurationVariable& variable) const throw(Sct::InvalidArgument);
00045
00052 bool setAlgorithm(string variableName, auto_ptr<FitAlgorithm>) throw();
00053
00054 private:
00055 FitAlgorithmMap() {}
00056 map<string, shared_ptr<FitAlgorithm> > algMap;
00057 };
00058
00059
00060 }
00061
00062 #endif //FITALGORITHMMAP_H