00001 00013 #ifndef ISTATIONDBFILLER_H_INCLUDED 00014 #define ISTATIONDBFILLER_H_INCLUDED 00015 00016 #include <string> 00017 #include <stdexcept> 00018 #include <boost/noncopyable.hpp> 00019 #include <boost/shared_ptr.hpp> 00020 00021 class StationsDB; 00022 00024 00030 class IStationDBLoader : boost::noncopyable 00031 { 00032 public: 00034 class LoadError : public std::runtime_error 00035 { 00036 std::wstring message_; 00037 00038 public: 00039 LoadError(const std::wstring &message): 00040 std::runtime_error("Erreur de chargement de la base de donnée de station"), 00041 message_(message) 00042 { 00043 } 00044 00045 ~LoadError() throw() {} 00046 00047 const std::wstring& getMessage() const {return message_;} 00048 }; 00049 00051 virtual ~IStationDBLoader(){} 00052 00058 virtual void load(StationsDB &stationDB) = 0; 00059 }; 00060 00061 #endif // ISTATIONDBFILLER_H_INCLUDED