E:/Eigene Dateien/Eigene Projekte/c0re/FunctionHandler.h

Go to the documentation of this file.
00001 /*
00002         This file is part of c0re.
00003 
00004         c0re is a multiplayer RTS on a hexagonal map with an evolving unit concept.
00005     Copyright (C) 2007 Stephan Hofmann
00006 
00007     c0re is free software: you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation, either version 3 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program.  If not, see <http://www.gnu.org/licenses/>.
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 

Generated on Tue Jul 17 22:02:22 2007 for C0re by  doxygen 1.5.2