00001 00013 #ifndef ENGINE_H_INCLUDED 00014 #define ENGINE_H_INCLUDED 00015 00016 #include <list> 00017 #include <string> 00018 #include <boost/noncopyable.hpp> 00019 #include "StationsDB.h" 00020 #include "Display.h" 00021 00022 class IStationDBLoader; 00023 class IPathFinder; 00024 00026 00029 class Engine : boost::noncopyable 00030 { 00032 boost::shared_ptr<IStationDBLoader> dbLoader_; 00033 00034 boost::shared_ptr<IPathFinder> pathFinder_; 00036 StationsDB stationDB_; 00038 Display display_; 00039 00041 std::wstring startStationName_; 00043 std::vector<std::wstring> stationNameStepList_; 00045 std::wstring endStationName_; 00047 bool pathOptimisation_; 00049 int stepDuration_; 00051 int changeDuration_; 00052 00053 public: 00054 Engine( 00055 boost::shared_ptr<IStationDBLoader> dbLoader , 00056 boost::shared_ptr<IPathFinder> pathFinder ); 00057 00059 void userSetStepDuration(int stepDuration); 00060 00062 void userSetChangeDuration(int changeDuration); 00063 00065 void userSetStartStation(const std::wstring &startStation); 00066 00068 void userSetEndStation(const std::wstring &endStation); 00069 00071 void userAddIntermediateStations(const std::vector<std::wstring> &stepStationVect); 00072 00074 void userWantPathOptimisation(); 00075 00077 void run(); 00078 }; 00079 00080 #endif // MAIN_H_INCLUDED