00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __RT_ROBWXFE_H__
00019 #define __RT_ROBWXFE_H__
00020
00021 #include <rtlist.h>
00022
00023 #include "robfrontend.h"
00024 #include "robconsole.h"
00025
00026 namespace rt {
00027
00028 class BotErrorHandler {
00029 public:
00031 virtual void handleBotError(const Bot* affectedBot, ExecReturnType type) = 0;
00032 };
00033
00034 class WxFrontend : public ConsoleFrontend {
00035 public:
00036 WxFrontend();
00037 ~WxFrontend();
00038
00039 virtual void handleBotError(const Bot* affectedBot, ExecReturnType type) const;
00040 virtual void handleLoadError(const String& affectedFile, const String& message) const;
00041 virtual void handleSystemError(int num, const String& message) const;
00042 virtual void handleWarning(const String& message) const;
00043
00044 void addBotErrorHandler(BotErrorHandler* handler);
00045 void removeBotErrorHandler(BotErrorHandler* handler);
00046
00047 protected:
00048 virtual bool interpreteParamsImpl(const Array<String>& params, Array<bool>& used);
00049
00050 private:
00051 lrt::List<BotErrorHandler*> botErrorHandlers;
00052 };
00053
00054
00055 }
00056
00057 #endif //FILE