00001 #ifndef SCTCALIBRATIONCONTROLLER_CONFIGUPDATERMANAGER_H
00002 #define SCTCALIBRATIONCONTROLLER_CONFIGUPDATERMANAGER_H
00003
00004 #include <string>
00005 #include <map>
00006 #include <boost/shared_ptr.hpp>
00007 #include "Sct_SctApi/SctApi.hh"
00008
00009 using std::map;
00010 using std::string;
00011 using boost::shared_ptr;
00012
00013
00014 namespace SctData {
00015 class TestResult;
00016 }
00017
00018
00019 namespace SctCalibrationController {
00020
00021 class ConfigUpdater;
00022
00029 class ConfigUpdaterManager {
00030 public:
00035 static ConfigUpdaterManager& instance();
00036
00043 void update(const SctData::TestResult& t, Sct_SctApi::SctApiIPC_ptr api, bool force=false) const;
00044
00049 ConfigUpdater& getUpdater(const string& className) const;
00050
00058 bool setUpdater(const string& testName, shared_ptr<ConfigUpdater> updater);
00059
00060 private:
00061 ConfigUpdaterManager();
00062
00063 typedef map<string, shared_ptr<ConfigUpdater> > ConfigUpdaterMap;
00064 ConfigUpdaterMap updaterMap;
00065 };
00066 }
00067
00068 #endif //SCTCALIBRATIONCONTROLLER_CONFIGUPDATERMANAGER_H