00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _FUNCTIONHANDLER_H_
00022 #define _FUNCTIONHANDLER_H_
00023
00024 #include <vector>
00025 #include <string>
00026 #include <map>
00027
00028 class Level;
00029 class Field;
00030
00031 typedef std::string (*FuncPoint) (std::vector<std::string>&, Level*);
00032 typedef std::map<std::string, FuncPoint> FunctionMap;
00033
00037 class FunctionHandler
00038 {
00039 public:
00040
00044 FunctionHandler();
00045
00049 ~FunctionHandler();
00050
00059 static std::string quit(std::vector<std::string>& p_params, Level* level);
00060
00069 static std::string zoomIn(std::vector<std::string>& p_params, Level* level);
00070
00079 static std::string zoomOut(std::vector<std::string>& p_params, Level* level);
00080
00089 static std::string scrollUp(std::vector<std::string>& p_params, Level* level);
00090
00099 static std::string scrollDown(std::vector<std::string>& p_params, Level* level);
00100
00109 static std::string scrollLeft(std::vector<std::string>& p_params, Level* level);
00110
00119 static std::string scrollRight(std::vector<std::string>& p_params, Level* level);
00120
00129 static std::string select(std::vector<std::string>& p_params, Level* level);
00130
00139 static std::string grabScreen(std::vector<std::string>& p_params, Level* level);
00140
00149 static std::string releaseScreen(std::vector<std::string>& p_params, Level* level);
00150
00159 static std::string scroll(std::vector<std::string>& p_params, Level* level);
00160
00171 static std::string standardAction(std::vector<std::string>& p_params, Level* level);
00172
00181 static std::string settle(std::vector<std::string>& p_params, Level* level);
00182
00191 static std::string terminate(std::vector<std::string>& p_params, Level* level);
00192
00201 static std::string setSpawnDestination(std::vector<std::string>& p_params, Level* level);
00202
00211 static std::string selectBonus(std::vector<std::string>& p_params, Level* level);
00212
00213 protected:
00221 static int isConnected(Field* origin, Field* destination);
00222
00223
00224 };
00225
00226 #endif
00227