Page principale | Liste des namespaces | Hiérarchie des classes | Liste par ordre alphabétique | Liste des composants | Liste des fichiers | Membres des namespaces | Composants | Déclarations

ExManagerCommand.h

Aller à la documentation de ce fichier.
00001 /************************************************************************/
00002 /* Ex Nihlo Engine by Hermanns Christophe                                                               */
00003 /************************************************************************/
00004 /* This program is free software; you can redistribute it and/or                */
00005 /* modify it under the terms of the GNU General Public License                  */
00006 /* as published by the Free Software Foundation; either version 2               */
00007 /* of the License, or (at your option) any later version.                               */
00008 /*                                                                                                                                              */
00009 /* This program is distributed in the hope that it will be useful,              */
00010 /* but WITHOUT ANY WARRANTY; without even the implied warranty of               */
00011 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                                 */
00012 /*                                                                                                                                              */
00013 /* See the GNU General Public License for more details.                                 */
00014 /*                                                                                                                                              */
00015 /* You should have received a copy of the GNU General Public License    */
00016 /* along with this program; if not, write to the Free Software                  */
00017 /* Foundation, Inc., 59 Temple Place - Suite 330,                                               */
00018 /* Boston, MA  02111-1307, USA.                                                                                 */
00019 /*                                                                                                                                              */
00020 /* If you use a important part of this code please send me a mail               */
00021 /* I just want to see where my code go thks :)                                                  */
00022 /************************************************************************/
00023 
00024 /************************************************************************/
00025 /* Contact                                                              */  
00026 /************************************************************************/
00027 /* ExNihilo Website :www.ploksoftware.org                               */
00028 /*                                                                      */
00029 /* Hermanns Christophe ExNihilo creator and main programmer             */
00030 /*                                                                      */
00031 /* Mail             : Data@ploksoftware.org                                                             */
00032 /* ICQ              : 8030901                                                                                   */
00033 /* MSN Messenger    : Data_7@hotmail.com                                                                */
00034 /*                                                                      */
00035 /*                                                                      */
00036 /************************************************************************/
00037 
00038 /************************************************************************/
00039 /* File Description                                                                                             */
00040 /************************************************************************/
00041 /* File Name   :InputActionList.h                                                                               */
00042 /*                                                                                                                                              */
00043 /* Start Date   :03/15/2002                                                                                             */
00044 /*                                                                                                                                              */
00045 /* Last Update :06/20/2003                                              */
00046 /*                                                                                                                                              */
00047 /* File Description :                                                                                                   */
00048 /*                                                                      */
00049 /* For update of this file check : www.ploksoftware.org                 */
00050 /************************************************************************/
00051 
00052 #ifndef __EXMANAGERCOMMAND_H__
00053 #define __EXMANAGERCOMMAND_H__
00054 //------------------------------------------------------------------------
00055 //Includes
00056 //------------------------------------------------------------------------
00057 #include "ExDefine.h"
00058 #include "ExCCommand.h"
00059 #include "ExCAction.h"
00060 #include "ExNihiloNameSpace.h"
00061 //------------------------------------------------------------------------
00062 #include "Math/ExMath.h"
00063 //------------------------------------------------------------------------
00064 #include "Manager/ExManager.h"
00065 #include "Manager/ExManagerWindow.h"
00066 #include "Manager/ExManagerConsole.h"
00067 #include "Manager/ExManagerMap.h"
00068 #include "Manager/ExManagerCommand.h"
00069 #include "Manager/ExManagerCollision.h"
00070 #include "Manager/ExManagerFog.h"
00071 #include "Manager/ExManagerId.h"
00072 #include "Manager/ExManagerNetwork.h"
00073 #include "Manager/ExManagerSpecialEffect.h"
00074 #include "Manager/ExManagerPVS.h"
00075 //------------------------------------------------------------------------
00076 #include "Manager/ManagerObject/ExManagerLoad.h"
00077 #include "Manager/ManagerObject/ExManagerMesh.h"
00078 #include "Manager/ManagerObject/ExManagerTexture.h"
00079 #include "Manager/ManagerObject/ExManagerInterface.h"
00080 #include "Manager/ManagerObject/ExManagerParticuleSystem.h"
00081 #include "Manager/ManagerObject/ExManagerGizmo.h"
00082 #include "Manager/ManagerObject/ExManagerLight.h"
00083 #include "Manager/ManagerObject/ExManagerAnimation.h"
00084 #include "Manager/ManagerObject/ExManagerSound.h"
00085 #include "Manager/ManagerObject/ExManagerSpirit.h"
00086 #include "Manager/ManagerObject/ExManagerObject.h"
00087 #include "Manager/ManagerObject/ExManagerModele.h"
00088 #include "Manager/ManagerObject/ExManagerCamera.h"
00089 #include "Manager/ManagerObject/ExManagerFont.h"
00090 #include "Manager/ManagerObject/ExManagerVertexArrays.h"
00091 #include "Manager/ManagerObject/ExManagerVertexProgram.h"
00092 #include "Manager/ManagerObject/ExManagerObjectWindow.h"
00093 #include "Manager/ManagerObject/ExManagerEntity.h"
00094 //------------------------------------------------------------------------
00095 class ExManagerCommand : public ExManager
00096 {
00097 private:
00098 //------------------------------------------------------------------------
00099 // Variable
00100 //------------------------------------------------------------------------
00101         ExManagerMap                            *ManagerMap;    
00102         ExManagerFog                            *ManagerFog;
00103         ExManagerAnimation                      *ManagerAnim;
00104         ExManagerWindow                         *ManagerWindow;
00105         ExManagerGizmo                          *ManagerGizmo;
00106         ExManagerLight                          *ManagerLight;
00107         ExManagerParticuleSystem        *ManagerParticuleSystem;
00108         ExManagerTexture                        *ManagerTexture;
00109         ExManagerCollision                      *ManagerCollision;
00110         ExManagerId                                     *ManagerId      ;
00111         ExManagerInterface                      *ManagerInterface;
00112         ExManagerConsole                        *ManagerConsole;
00113         ExManagerSpirit                         *ManagerSpirit;
00114         ExManagerSound                          *ManagerSound;
00115         ExManagerCamera                         *ManagerCamera;
00116         ExManagerModel                          *ManagerModel;
00117         ExManagerNetwork                        *ManagerNetwork;
00118         ExManagerObjectWindow           *ManagerObjectWindow;
00119         ExManagerSpecialEffect          *ManagerSpecialEffect;
00120         ExManagerLoad                           *ManagerLoad;
00121         ExManagerPVS                            *ManagerPVS;
00122         ExManagerMesh                           *ManagerMesh;
00123         ExManagerEntity                         *ManagerEntity;
00124 
00125         int             m_MousePosX;
00126         int             m_MousePosY;    
00127 
00128         typedef std::pair<ExCCommand,ExCAction> CommandAction;
00129         std::vector<CommandAction>                              m_VecCommand;
00130         std::vector<CommandAction>::iterator    m_ItVecCommand;
00131 
00132         std::vector<ExCAction>                  m_VecAction;
00133         std::vector<ExCAction>::iterator        m_ItVecAction;
00134         std::vector<ExCAction>                  m_VecTempAction;//action added when action run
00135 
00136         std::vector<ExCAction>                  m_VecRepAction;
00137         std::vector<ExCAction>::iterator        m_ItVecRepAction;
00138 
00139         void RemoveRepAction(ExCAction action);
00140         void AddRepAction(ExCAction action);
00141         void AddAction(ExCAction action);
00142         //void AddCommandAction (ExCFileDataAction);
00143         void AddCommandAction(int command,ExCAction action);
00144         void AddCommandAction(int command,int action,std::string param);
00145         void AddCommandAction(CommandAction ComAct); 
00146         void ProcessCommand(ExCCommand command);
00147         bool ProcesExCAction(ExCAction action);
00148 
00149         bool LogCommand;
00150         std::ofstream logfilecommand;
00151         bool plok;
00152 //------------------------------------------------------------------------
00153 // Singleton creation
00154 //------------------------------------------------------------------------
00155         static bool m_flag; 
00156         static ExManagerCommand *m_instance;
00157         ExManagerCommand(void);
00158         ~ExManagerCommand(void);
00159 public:
00160         static ExManagerCommand*  CreateSingleton(void);
00161 //------------------------------------------------------------------------
00162 // Methode
00163 //------------------------------------------------------------------------
00164         void AddNewAction(ExCAction action);
00165         void Reset(void){return;}
00166 
00167         inline void SetManagerLoad(ExManagerLoad *Load){ManagerLoad = Load;}
00168         inline void SetManagerPVS(ExManagerPVS *PVS){ManagerPVS = PVS;}
00169         inline void SetManagerMesh(ExManagerMesh *Mesh){ManagerMesh = Mesh;}
00170         inline void SetManagerMap(ExManagerMap *Map){ManagerMap = Map;}
00171         inline void SetManagerFog(ExManagerFog *Fog){ManagerFog = Fog;}
00172         inline void SetManagerAnim(ExManagerAnimation *Anim){ManagerAnim = Anim;}
00173         inline void SetManagerWindow(ExManagerWindow *Window){ManagerWindow = Window;}
00174         inline void SetManagerGizmo(ExManagerGizmo *Gizmo){ManagerGizmo = Gizmo;}
00175         inline void SetManagerLight(ExManagerLight *Light){ManagerLight = Light;}
00176         inline void SetManagerParticuleSystem(ExManagerParticuleSystem *ParticuleSystem){ManagerParticuleSystem = ParticuleSystem;}
00177         inline void SetManagerTexture(ExManagerTexture * Texture){ManagerTexture = Texture;}
00178         inline void SetManagerCollision(ExManagerCollision *Collision){ManagerCollision = Collision;}
00179         inline void SetManagerId(ExManagerId *Id){ManagerId     = Id;}
00180         inline void SetManagerInterface(ExManagerInterface * Interface){ManagerInterface=Interface;}
00181         inline void SetManagerConsole(ExManagerConsole * Console){ManagerConsole=Console;}
00182         inline void SetManagerSound(ExManagerSound * Sound){ManagerSound=Sound;}
00183         inline void SetManagerSpirit(ExManagerSpirit * Spirit){ManagerSpirit=Spirit;}
00184 
00185         inline void SetManagerCamera(ExManagerCamera *Cam){ManagerCamera = Cam;}
00186         inline void SetManagerModel(ExManagerModel *Model){ManagerModel = Model;}
00187         inline void SetManagerNetwork(ExManagerNetwork *Network){ManagerNetwork = Network;}
00188         inline void SetManagerObjectWindow(ExManagerObjectWindow *ObjectWindow){ManagerObjectWindow = ObjectWindow;}
00189         inline void SetManagerSpecialEffect(ExManagerSpecialEffect *SpecialEffect){ManagerSpecialEffect = SpecialEffect;}
00190         inline void SetManagerEntity(ExManagerEntity *Entity){ManagerEntity = Entity;}
00191 
00192         void Init(void);
00193         bool LoadCommandFile(std::string FileName);
00194         //bool LoadExecFile(ExCAction *action);
00195         bool LoadFile(std::string FileName);
00196 
00197         void InputCommand(int command);
00198         ExCAction InputCommand(ExCCommand Command);
00199         void ApplyAction(void);
00200 
00201         inline void SetMousePosition(int posx,int posy){m_MousePosX=posx;m_MousePosY=posy;}
00202         
00203 
00204         void LoadExecFile(std::string FileName);
00205 
00206 
00207         ExCAction InputAction(ExCAction Action);
00208 };
00209 //------------------------------------------------------------------------
00210 #endif //__EXMANAGERCOMMAND_H__

Généré le Tue Oct 28 12:43:35 2003 pour ExNihilo par doxygen 1.3.4