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