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  

Référence de la classe ExManagerCommand

#include <ExManagerCommand.h>

Graphe d'héritage de la classe ExManagerCommand

ExManager

Membres publics

void AddNewAction (ExCAction action)
void Reset (void)
void SetManagerMap (ExManagerMap *Map)
void SetManagerFog (ExManagerFog *Fog)
void SetManagerAnim (ExManagerAnimation *Anim)
void SetManagerWindow (ExManagerWindow *Window)
void SetManagerGizmo (ExManagerGizmo *Gizmo)
void SetManagerLight (ExManagerLight *Light)
void SetManagerParticuleSystem (ExManagerParticuleSystem *ParticuleSystem)
void SetManagerTexture (ExManagerTexture *Texture)
void SetManagerCollision (ExManagerCollision *Collision)
void SetManagerId (ExManagerId *Id)
void SetManagerMenu (ExManagerMenu *Menu)
void SetManagerInterface (ExManagerInterface *Interface)
void SetManagerConsole (ExManagerConsole *Console)
void SetManagerSound (ExManagerSound *Sound)
void SetManagerSpirit (ExManagerSpirit *Spirit)
void SetManagerCamera (ExManagerCamera *Cam)
void SetManagerModel (ExManagerModel *Model)
void SetManagerNetwork (ExManagerNetwork *Network)
void Init (void)
bool LoadCommandFile (std::string FileName)
bool LoadFile (std::string FileName)
void InputCommand (int command)
ExCAction InputCommand (ExCCommand Command)
void ApplyAction (void)
void SetMousePosition (int posx, int posy)
void LoadSetOfFile (const char *FileName)
void LoadExecFile (std::string FileName)
void DisplayFileType (void)
ExCAction InputAction (ExCAction Action)

Membres publics statiques

ExManagerCommand * CreateSingleton (void)

Types Privés

typedef std::pair< ExCCommand,
ExCAction
CommandAction

Membres privés

void RemoveRepAction (ExCAction action)
void AddRepAction (ExCAction action)
void AddAction (ExCAction action)
void AddCommandAction (ExCFileDataAction)
void AddCommandAction (int command, ExCAction action)
void AddCommandAction (int command, int action, std::string param)
void AddCommandAction (CommandAction ComAct)
void ProcessCommand (ExCCommand command)
bool ProcesExCAction (ExCAction action)
 ExManagerCommand (void)
 ~ExManagerCommand (void)

Attributs Privés

ExManagerMenuManagerMenu
ExManagerMapManagerMap
ExManagerFogManagerFog
ExManagerAnimationManagerAnim
ExManagerWindowManagerWindow
ExManagerGizmoManagerGizmo
ExManagerLightManagerLight
ExManagerParticuleSystemManagerParticuleSystem
ExManagerTextureManagerTexture
ExManagerCollisionManagerCollision
ExManagerIdManagerId
ExManagerInterfaceManagerInterface
ExManagerConsoleManagerConsole
ExManagerSpiritManagerSpirit
ExManagerSoundManagerSound
ExManagerCameraManagerCamera
ExManagerModelManagerModel
ExManagerNetworkManagerNetwork
int m_MousePosX
int m_MousePosY
std::vector< CommandActionm_VecCommand
std::vector< CommandAction
>::iterator 
m_ItVecCommand
std::vector< ExCActionm_VecAction
std::vector< ExCAction
>::iterator 
m_ItVecAction
std::vector< ExCActionm_VecTempAction
std::vector< ExCActionm_VecRepAction
std::vector< ExCAction
>::iterator 
m_ItVecRepAction
bool LogCommand
ofstream logfilecommand
bool plok

Attributs Privés Statiques

bool m_flag = false
ExManagerCommand * m_instance = NULL

Documentation des types imbriqués

typedef std::pair<ExCCommand,ExCAction> CommandAction [private]
 

Définition à la ligne 111 du fichier ExManagerCommand.h.

Référencé par AddCommandAction().


Documentation des contructeurs et destructeurs

ExManagerCommand void    [private]
 

Définition à la ligne 43 du fichier ExManagerCommand.cpp.

Références LogCommand, logfilecommand, et plok.

00044 {
00045         LogCommand = true;
00046         #ifdef UNIX_SRC
00047         logfilecommand.open("/tmp/logCommand.txt",ios::out);
00048         #else
00049         logfilecommand.open("logCommand.txt",ios::out);
00050         #endif
00051         plok=true;
00052 }

~ExManagerCommand void    [private]
 

Définition à la ligne 54 du fichier ExManagerCommand.cpp.

00055 {
00056 }


Documentation des méthodes

void AddAction ExCAction    action [private]
 

Définition à la ligne 148 du fichier ExManagerCommand.cpp.

Références AddAction(), Guard, ExCAction::m_Action, et m_VecAction.

Référencé par AddAction(), ApplyAction(), InputCommand(), et ProcessCommand().

00149 {
00150 Guard(void ExManagerCommand::AddAction(ExCAction action))       
00151         //std::cout<<"ManagerCommand::Add Action"<<action.m_Action<<std::endl;
00152         if(action.m_Action!=NOTHING)
00153         {
00154                 m_VecAction.push_back(action);
00155         }
00156 UnGuard
00157 }

void AddCommandAction CommandAction    ComAct [private]
 

Définition à la ligne 269 du fichier ExManagerCommand.cpp.

Références AddCommandAction(), CommandAction, Guard, et m_VecCommand.

00270 {
00271 Guard(void ExManagerCommand::AddCommandAction(CommandAction ComAct))
00272         m_VecCommand.push_back(ComAct);
00273 UnGuard
00274 }

void AddCommandAction int    command,
int    action,
std::string    param
[private]
 

Définition à la ligne 276 du fichier ExManagerCommand.cpp.

Références AddCommandAction(), CommandAction, Guard, et m_VecCommand.

00277 {
00278 Guard(void ExManagerCommand::AddCommandAction(int command,int action,std::string param))
00279         CommandAction ComAct;
00280         ComAct.first=command;
00281         ComAct.second.m_Action=action;
00282         ComAct.second.m_Param= param;
00283         m_VecCommand.push_back(ComAct); 
00284 UnGuard
00285 }

void AddCommandAction int    command,
ExCAction    action
[private]
 

Définition à la ligne 256 du fichier ExManagerCommand.cpp.

Références AddCommandAction(), CommandAction, Guard, et m_VecCommand.

00257 {
00258 Guard(void ExManagerCommand::AddCommandAction(int command,ExCAction action))
00259         CommandAction ComAct;   
00260         ComAct.first=command;
00261         ComAct.second=action;
00262         /*
00263         ComAct.second.m_Action=action.m_Action;
00264         ComAct.second.m_Param= action.m_Param;*/
00265         m_VecCommand.push_back(ComAct);
00266 UnGuard
00267 }

void AddCommandAction ExCFileDataAction    [private]
 

Définition à la ligne 245 du fichier ExManagerCommand.cpp.

Références AddCommandAction(), CommandAction, ExCFileDataAction::getAction(), ExCFileDataAction::getCommand(), ExCFileDataAction::getParam(), Guard, et m_VecCommand.

Référencé par AddCommandAction(), Init(), et LoadCommandFile().

00246 {
00247 Guard(void ExManagerCommand::AddCommandAction(ExCFileDataAction e))
00248         CommandAction ComAct;
00249         ComAct.first = atoi (e.getAction ().data());
00250         ComAct.second.m_Action = e.getCommand ();
00251         ComAct.second.m_Param  = e.getParam ();
00252         m_VecCommand.push_back (ComAct);
00253 UnGuard
00254 }

void AddNewAction ExCAction    action
 

Définition à la ligne 159 du fichier ExManagerCommand.cpp.

Références AddNewAction(), Guard, ExCAction::m_Action, et m_VecTempAction.

Référencé par AddNewAction(), ApplyAction(), LoadExecFile(), LoadFile(), et ProcesExCAction().

00160 {
00161 Guard(void ExManagerCommand::AddNewAction(ExCAction action))    
00162         //std::cout<<"ManagerCommand::ADD NEW ACTION:"<<action;
00163         if(action.m_Action!=NOTHING)
00164         {
00165                 m_VecTempAction.push_back(action);
00166         }
00167 UnGuard
00168 }

void AddRepAction ExCAction    action [private]
 

Définition à la ligne 184 du fichier ExManagerCommand.cpp.

Références AddRepAction(), Guard, ExCAction::m_Action, m_ItVecRepAction, et m_VecRepAction.

Référencé par AddRepAction().

00185 {
00186 Guard(void ExManagerCommand::AddRepAction(ExCAction action))    
00187         bool already=false;
00188         int i=0;
00189         for(m_ItVecRepAction=m_VecRepAction.begin();m_ItVecRepAction!=m_VecRepAction.end();m_ItVecRepAction++,i++)
00190         {
00191                 if(m_VecRepAction.at(i).m_Action==action.m_Action)
00192                 {
00193                         already=true;
00194                 }
00195         }  
00196         if(!already)
00197         {  
00198                 m_VecRepAction.push_back(action);
00199         }
00200 UnGuard
00201 }

void ApplyAction void   
 

Définition à la ligne 203 du fichier ExManagerCommand.cpp.

Références AddAction(), AddNewAction(), ApplyAction(), Guard, m_ItVecAction, m_ItVecRepAction, m_VecAction, m_VecRepAction, m_VecTempAction, et ProcesExCAction().

Référencé par ApplyAction(), et ExManagerOutput::DrawScene().

00204 {
00205 Guard(void ExManagerCommand::ApplyAction(void))
00206         int i;
00207         std::vector<ExCAction>                  TmpVecAction;
00208         for(m_ItVecAction=m_VecAction.begin();m_ItVecAction!=m_VecAction.end();m_ItVecAction++,i++)
00209         {
00210                 //std::cout<<"ManagerCommand::Aplly Action :"<<m_VecAction.at(i)<<endl;
00211                 if(!ProcesExCAction(*m_ItVecAction))
00212                 {
00213                         AddNewAction(*m_ItVecAction);
00214                 }
00215         }
00216         
00217         //Remove executed action
00218         /*for(m_ItVecAction=m_VecAction.begin();m_ItVecAction!=m_VecAction.end();m_ItVecAction++)
00219         {
00220                 
00221                 if(!m_ItVecAction->AllActionDone())
00222                 {
00223                         TmpVecAction.push_back(*m_ItVecAction);
00224                 }else
00225                 {
00226                         std::cout<<"action not done :"<<m_ItVecAction->m_Action<<std::endl;
00227                 }
00228         }*/
00229         m_VecAction.clear();
00230         //m_VecAction=TmpVecAction;
00231         for(i=0; (unsigned)i<m_VecTempAction.size();i++)
00232         {
00233                 AddAction(m_VecTempAction.at(i));
00234         }
00235         m_VecTempAction.clear();
00236         i=0;
00237         for(m_ItVecRepAction=m_VecRepAction.begin();m_ItVecRepAction!=m_VecRepAction.end();m_ItVecRepAction++,i++)
00238         {
00239                 ProcesExCAction(m_VecRepAction.at(i));
00240         }
00241         
00242 UnGuard
00243 }

ExManagerCommand * CreateSingleton void    [static]
 

Définition à la ligne 29 du fichier ExManagerCommand.cpp.

Références CreateSingleton(), Guard, m_flag, et m_instance.

Référencé par CreateSingleton(), et main().

00029                                                        {
00030 Guard(ExManagerCommand* ExManagerCommand::CreateSingleton(void))
00031         if(!m_flag)
00032         {
00033                 m_flag = true; // We are creating the error log now, so set flag to true
00034                 m_instance = new ExManagerCommand; // Create the error log
00035         }else
00036         {
00037                 std::cout<<"Error singleton already created"<<std::endl;
00038         }
00039         return m_instance; 
00040 UnGuard
00041 }

void DisplayFileType void   
 

Définition à la ligne 704 du fichier ExManagerCommand.cpp.

Références ExManager::Consol, DisplayFileType(), et Guard.

Référencé par DisplayFileType(), et InputAction().

00705 {
00706 Guard(void ExManagerCommand::DisplayFileType(void))
00707         *Consol<<"*------------------------------------------------------------------------------------------------*"<<std::endl;
00708         *Consol<<"|                                Extension file supported by Exnihilo                            |"<<std::endl;
00709         *Consol<<"|------------------------------------------------------------------------------------------------|"<<std::endl;
00710         *Consol<<"|Description                 | Extension |  Status  |  Comment                                   |"<<std::endl;
00711         *Consol<<"|------------------------------------------------------------------------------------------------|"<<std::endl;                               
00712         *Consol<<"|Console configuration file  |  .csl     | Aviable  | Asign consol command to action             |"<<std::endl;
00713         *Consol<<"|Command configuration file  |  .comd    | Aviable  | Asign input (keyboard,mouse,...)to action  |"<<std::endl;
00714         *Consol<<"|------------------------------------------------------|-----------------------------------------|"<<std::endl;                               
00715         *Consol<<"|ExNihilo map file           |  .map     | Aviable  | Create map file with AscToMap converter    |"<<std::endl;
00716         *Consol<<"|Quake map file              |  .bsp     |          |                                            |"<<std::endl;
00717         *Consol<<"|------------------------------------------------------------------------------------------------|"<<std::endl;                               
00718         *Consol<<"|ASC model  file             |  .asc     | Aviable  | Create a 3d model and export him to *.asc  |"<<std::endl;
00719         *Consol<<"|MD2 (quake 2) model  file   |  .md2     | Aviable  |                                            |"<<std::endl;
00720         *Consol<<"|MD3 (quake 3) model  file   |  .md3     |          |                                            |"<<std::endl;
00721         *Consol<<"|ASE model  file             |  .ase     |          |                                            |"<<std::endl;
00722         *Consol<<"|3d studio max model  file   |  .3ds     | Aviable  |                                            |"<<std::endl;
00723         *Consol<<"|OBJ model  file             |  .obj     |          |                                            |"<<std::endl;
00724         *Consol<<"|------------------------------------------------------------------------------------------------|"<<std::endl;                               
00725         *Consol<<"|Wave sound file             |  .wav     |          |                                            |"<<std::endl;
00726         *Consol<<"|Midi sound file             |  .mid     |          |                                            |"<<std::endl;
00727         *Consol<<"|Mp3 sound file              |  .mp3     |          |                                            |"<<std::endl;
00728         *Consol<<"|------------------------------------------------------------------------------------------------|"<<std::endl;
00729         *Consol<<"|Particule system  file      |  .part    | Aviable  |  Use SDK partiucle to create *.part file   |"<<std::endl;
00730         *Consol<<"|Interface file              |  .int     | Aviable  |  Use SDK partiucle to create *.int file    |"<<std::endl;
00731         *Consol<<"|------------------------------------------------------------------------------------------------|"<<std::endl;                               
00732         *Consol<<"|Groupe of file              |  .set     | Aviable  |                                            |"<<std::endl;
00733         *Consol<<"|Groupe of action            |  .exec    | Aviable  |                                            |"<<std::endl;
00734         *Consol<<"*------------------------------------------------------------------------------------------------*"<<std::endl;
00735 UnGuard
00736 }

void Init void    [virtual]
 

Redéfinie à partir de ExManager.

Définition à la ligne 287 du fichier ExManagerCommand.cpp.

Références AddCommandAction(), CAMERA_CURRENT_START_DECREASE_ZOOM, CAMERA_CURRENT_START_INCREASE_ZOOM, CAMERA_CURRENT_STOP_DECREASE_ZOOM, CAMERA_CURRENT_STOP_INCREASE_ZOOM, ENABLE_DISABLE_MENU, Guard, et Init().

Référencé par Init(), et InitManager().

00288 {
00289 Guard(void ExManagerCommand::Init(void))
00290         AddCommandAction(KEYBOARD_DOWN_ESC,             ExCAction(ENABLE_DISABLE_MENU));
00291         AddCommandAction(KEYBOARD_DOWN_EXP,             ExCAction(CONSOL_NEXT_AVIABLE_STATE));
00292         AddCommandAction(KEYBOARD_UP_PAGE_UP,   ExCAction(CONSOL_LINE_UP));
00293         AddCommandAction(KEYBOARD_UP_PAGE_DOWN, ExCAction(CONSOL_LINE_DOWN));
00294         AddCommandAction(KEYBOARD_DOWN_4,               ExCAction(CAMERA_CURRENT_START_ROTATEY_DOWN));
00295         AddCommandAction(KEYBOARD_UP_4,                 ExCAction(CAMERA_CURRENT_STOP_ROTATEY_DOWN));
00296         AddCommandAction(KEYBOARD_UP_5,                 ExCAction(CAMERA_CURRENT_INCREASE_SPEED));
00297         AddCommandAction(KEYBOARD_UP_0,                 ExCAction(CAMERA_CURRENT_DECREASE_SPEED));
00298         AddCommandAction(KEYBOARD_UP_S,                 ExCAction(CAMERA_CURRENT_FULL_STOP));
00299         AddCommandAction(KEYBOARD_DOWN_6,               ExCAction(CAMERA_CURRENT_START_ROTATEY_UP));
00300         AddCommandAction(KEYBOARD_UP_6,                 ExCAction(CAMERA_CURRENT_STOP_ROTATEY_UP));
00301         AddCommandAction(KEYBOARD_DOWN_2,               ExCAction(CAMERA_CURRENT_START_ROTATEX_UP));
00302         AddCommandAction(KEYBOARD_UP_2,                 ExCAction(CAMERA_CURRENT_STOP_ROTATEX_UP));
00303         AddCommandAction(KEYBOARD_DOWN_8,               ExCAction(CAMERA_CURRENT_START_ROTATEX_DOWN));
00304         AddCommandAction(KEYBOARD_UP_8,                 ExCAction(CAMERA_CURRENT_STOP_ROTATEX_DOWN));
00305         AddCommandAction(KEYBOARD_DOWN_1,               ExCAction(CAMERA_CURRENT_START_ROTATEZ_UP));
00306         AddCommandAction(KEYBOARD_UP_1,                 ExCAction(CAMERA_CURRENT_STOP_ROTATEZ_UP));
00307         AddCommandAction(KEYBOARD_DOWN_3,               ExCAction(CAMERA_CURRENT_START_ROTATEZ_DOWN));
00308         AddCommandAction(KEYBOARD_UP_3,                 ExCAction(CAMERA_CURRENT_STOP_ROTATEZ_DOWN));
00309         AddCommandAction(KEYBOARD_UP_A,                 ExCAction(CAMERA_CURRENT_STOP_INCREASE_ZOOM));
00310         AddCommandAction(KEYBOARD_UP_Q,                 ExCAction(CAMERA_CURRENT_STOP_DECREASE_ZOOM));
00311         AddCommandAction(KEYBOARD_DOWN_A,               ExCAction(CAMERA_CURRENT_START_INCREASE_ZOOM));
00312         AddCommandAction(KEYBOARD_DOWN_Q,               ExCAction(CAMERA_CURRENT_START_DECREASE_ZOOM));
00313         AddCommandAction(KEYBOARD_UP_9,                 ExCAction(CAMERA_NEXT_CAM));
00314         AddCommandAction(KEYBOARD_UP_7,                 ExCAction(CAMERA_PREV_CAM));
00315         AddCommandAction(KEYBOARD_UP_F1,                ExCAction(STAR_ALL_PARTICULESYSTEME));
00316         AddCommandAction(KEYBOARD_UP_F2,                ExCAction(PAUSE_ALL_PARTICULESYSTEME));
00317 
00318 
00319         AddCommandAction(KEYBOARD_UP_G,                 ExCAction(SWITCH_GRIDE));
00320 
00321         
00322         AddCommandAction(KEYBOARD_UP_F3,                        ExCAction(PLAY_SOUND," idiot.wav"));
00323 
00324 /*      AddCommandAction(KEYBOARD_UP_U,                 ExCAction(NEXT_FRAME));
00325 
00326         AddCommandAction(KEYBOARD_DOWN_U,               ExCAction(ENTITE_CURRENT_START_ROTATE_X_DOWN));
00327         AddCommandAction(KEYBOARD_UP_U,                 ExCAction(ENTITE_CURRENT_STOP_ROTATE_X_DOWN));
00328         AddCommandAction(KEYBOARD_DOWN_J,               ExCAction(START_ACTION," RUN"));
00329         AddCommandAction(KEYBOARD_DOWN_Y,               ExCAction(START_ACTION," JUMP"));
00330         AddCommandAction(KEYBOARD_DOWN_K,               ExCAction(STOP_ACTION));
00331 
00332         AddCommandAction(KEYBOARD_DOWN_Y,               ExCAction(ENTITE_CURRENT_START_ROTATE_Y_DOWN));
00333         AddCommandAction(KEYBOARD_UP_Y,                 ExCAction(ENTITE_CURRENT_STOP_ROTATE_Y_DOWN));
00334         AddCommandAction(KEYBOARD_DOWN_I,               ExCAction(ENTITE_CURRENT_START_ROTATE_Y_UP));
00335         AddCommandAction(KEYBOARD_UP_I,                 ExCAction(ENTITE_CURRENT_STOP_ROTATE_Y_UP));
00336         
00337         AddCommandAction(KEYBOARD_DOWN_H,               ExCAction(ENTITE_CURRENT_START_ROTATE_Z_DOWN));
00338         AddCommandAction(KEYBOARD_UP_H,                 ExCAction(ENTITE_CURRENT_STOP_ROTATE_Z_DOWN));
00339         AddCommandAction(KEYBOARD_DOWN_K,               ExCAction(ENTITE_CURRENT_START_ROTATE_Z_UP));
00340         AddCommandAction(KEYBOARD_UP_K,                 ExCAction(ENTITE_CURRENT_STOP_ROTATE_Z_UP));
00341 */       
00342 
00343 UnGuard
00344 }

ExCAction InputAction ExCAction    Action [virtual]
 

Redéfinie à partir de ExManager.

Définition à la ligne 739 du fichier ExManagerCommand.cpp.

Références ExManager::Consol, DisplayFileType(), Guard, InputAction(), ExManagerInterface::Load(), ExManagerModel::Load(), ExManagerParticuleSystem::Load(), LoadCommandFile(), LoadExecFile(), ExManagerMap::LoadMap(), LoadSetOfFile(), ExManagerSound::LoadSound(), ExManagerConsole::LoadStringActionFile(), ExCAction::m_Action, ExCAction::m_NextAction, ExCAction::m_Param, ManagerConsole, ManagerInterface, ManagerMap, ManagerModel, ManagerParticuleSystem, et ManagerSound.

Référencé par InputAction(), et ProcesExCAction().

00740 {
00741 Guard(ExCAction ExManagerCommand::InputAction(ExCAction Action))
00742         switch(Action.m_Action)
00743         {               
00744         case LOAD_PART_CONFIG_FILE:
00745                 ManagerParticuleSystem->Load(Action.m_Param);
00746                 break;
00747         case LOAD_EXEC_CONFIG_FILE:
00748                 LoadExecFile(Action.m_Param.data());
00749                 break;
00750         case LOAD_FILE:
00751                 try
00752                 {
00753                         char Buffext[255];
00754                         memset(Buffext,0,255);
00755                                         
00756                 if(Action.m_Param.find_first_of(".",0) != (unsigned)-1)
00757                         {
00758                                 Action.m_Param.copy(Buffext,Action.m_Param.size()-Action.m_Param.find_first_of(".",0)-1,Action.m_Param.find_first_of(".",0)+1);
00759                                 if(strcmp(Buffext,"csl")==0)
00760                                 {
00761                                         ManagerConsole->LoadStringActionFile(Action.m_Param.data());
00762                                         break;
00763                                 }else
00764                                 if(strcmp(Buffext,"comd")==0)
00765                                 {
00766                                         LoadCommandFile(Action.m_Param);
00767                                         break;
00768                                 }else
00769                                 if(strcmp(Buffext,"wav")==0||strcmp(Buffext,"mid")==0)
00770                                 {
00771                                         ManagerSound->LoadSound(Action.m_Param);
00772                                         break;                          
00773                                 }else
00774                                 if(strcmp(Buffext,"asc")==0
00775                                         ||strcmp(Buffext,"ase")==0
00776                                         ||strcmp(Buffext,"3ds")==0
00777                                         ||strcmp(Buffext,"md2")==0
00778                                         ||strcmp(Buffext,"md3")==0
00779                                         ||strcmp(Buffext,"obj")==0)
00780                                 {
00781                                         ManagerModel->Load(Action.m_Param);
00782                                         break;
00783                                 }else
00784                                 if(strcmp(Buffext,"map")==0
00785                                         ||strcmp(Buffext,"bsp")==0)
00786                                 {
00787                                         ManagerMap->LoadMap(Action.m_Param.data());
00788                                         break;
00789                                 }else
00790                                 if(strcmp(Buffext,"int")==0)
00791                                 {
00792                                         ManagerInterface->Load(Action.m_Param);
00793                                         break;
00794                                 }else
00795                                 if(strcmp(Buffext,"set")==0)
00796                                 {
00797                                         LoadSetOfFile(Action.m_Param.data());
00798                                         break;
00799                                 }else
00800                                 if(strcmp(Buffext,"exec")==0)
00801                                 {
00802                                         LoadExecFile(Action.m_Param);
00803                                         break;
00804                                 }
00805                                 else
00806                                 if(strcmp(Buffext,"part")==0)
00807                                 {
00808                                         ManagerParticuleSystem->Load(Action.m_Param);
00809                                         break;
00810                                 }
00811                         }else 
00812                         {
00813                                 *Consol<<"ExManagerCommand::ExCeption =>"<<Action.m_Param<<" Bad file extension"<<std::endl;    
00814                         }DisplayFileType();
00815 
00816                 }
00817                 catch(ExCExpFileNotFound)
00818                 {
00819                         *Consol<<"ExManagerCommand::ExCeption =>"<<Action.m_Param<<" File not found"<<std::endl;
00820                         return false;
00821                 }
00822                 catch(ExCExpFileReadError)
00823                 {
00824                         *Consol<<"ExManagerCommand::ExCeption =>"<<Action.m_Param<<" Read file error"<<std::endl;
00825                         return false;
00826                 }
00827                 catch(...)
00828                 {
00829                         *Consol<<"ExManagerCommand::ExCeption =>"<<Action.m_Param<<" Unknow exception"<<std::endl;
00830                         return false;
00831                 }
00832                 break;
00833 
00834         case LOAD_SET_OF_FILE:
00835                 LoadSetOfFile(Action.m_Param.data());
00836                 break;
00837 
00838         default:
00839                 *Consol<<"Can not file action in COMMAND_ACTION_MAP Action:"<<Action.m_Action<<" Param:"<<Action.m_Param<<std::endl;
00840                 break;
00841         }
00842         if(Action.m_NextAction){return *Action.m_NextAction;}
00843         else{return NOTHING;}
00844 UnGuard
00845 }

ExCAction InputCommand ExCCommand    Command [virtual]
 

Redéfinie à partir de ExManager.

Définition à la ligne 109 du fichier ExManagerCommand.cpp.

Références AddAction(), ExManager::AskForCommand(), ExManager::AskForExclusifCommand(), Guard, ExManagerMenu::InputCommand(), ExManagerConsole::InputCommand(), InputCommand(), ManagerConsole, ManagerMenu, et ProcessCommand().

00110 {
00111 Guard(ExCAction ExManagerCommand::InputCommand(ExCCommand Command))
00112         //std::cout<<"ManagerCommand::InputCommand :"<<Command.m_Command<<std::endl;
00113         if(ManagerConsole->AskForCommand())
00114         {
00115                 AddAction(ManagerConsole->InputCommand(Command));
00116                 if(ManagerConsole->AskForExclusifCommand())return NOTHING;
00117         }
00118         if(ManagerMenu->AskForCommand())
00119         {
00120                 AddAction(ManagerMenu->InputCommand(Command));
00121                 if(ManagerMenu->AskForExclusifCommand())return NOTHING;
00122         }/*
00123         if(ManagerInterface->AskForCommand())
00124         {
00125                 AddAction(ManagerMenu->InputCommand(Command));
00126                 if(ManagerMenu->AskForExclusifCommand())return NOTHING;
00127         }*/
00128         ProcessCommand(Command);
00129         return NOTHING;
00130 UnGuard
00131 }

void InputCommand int    command
 

Définition à la ligne 101 du fichier ExManagerCommand.cpp.

Références Guard, et InputCommand().

Référencé par InputCommand(), ExManagerInputGLUT::Key(), ExManagerInputGLUT::KeySpe(), ExManagerInputGLUT::KeySpeUp(), ExManagerInputGLUT::KeyUp(), et ExManagerInputGLUT::Mouse().

00102 {
00103 Guard(void ExManagerCommand::InputCommand(int command))
00104         std::cout<<"ManagerCommand::InputCommand : plokiiiiiii"<<std::endl;
00105 UnGuard
00106 }

bool LoadCommandFile std::string    FileName
 

Définition à la ligne 58 du fichier ExManagerCommand.cpp.

Références AddCommandAction(), ExManager::Consol, ExCFile::exist(), FILE_COMMAND, ExCFileData::getContent(), ExCFileReader::getContent(), ExCFileData::getType(), Guard, LoadCommandFile(), et PREFIX.

Référencé par InputAction(), LoadCommandFile(), et LoadSetOfFile().

00059 {
00060 Guard(bool ExManagerCommand::LoadCommandFile(std::string FileName))
00061         char buffer[255];
00062         
00063 #ifdef UNIX_SRC
00064         sprintf(buffer, PREFIX "/ExNihilo/Data/Command/%s", FileName.data());
00065 #else
00066         sprintf(buffer, "../Data/Command/%s",FileName.data());
00067 #endif
00068     
00069         ExCFileReader my_file (buffer);
00070         if (! my_file.exist()) 
00071         {
00072                 *Consol<<"File not found: "<<buffer<<std::endl;
00073                 return false;
00074         } else 
00075         {
00076                 *Consol<<"Loading Command File: "<<FileName<<std::endl; 
00077                 ExCFileData _data = my_file.getContent();
00078                 
00079                 if (_data.getType() != FILE_COMMAND) 
00080                 {
00081                         *Consol<<FileName<<" is not a valide command file"<<std::endl;
00082                         return false;
00083                 } else 
00084                 {
00085                         vector<ExCFileDataAction> dd = _data.getContent();
00086                         vector<ExCFileDataAction>::iterator i = dd.begin ();
00087                         ExCFileDataAction f;
00088                         while (i != dd.end ()) 
00089                         {
00090                                 f = *i++;
00091                                 AddCommandAction (f);
00092                         }
00093                 }
00094                 return true;
00095         }
00096         
00097 UnGuard
00098 }

void LoadExecFile std::string    FileName
 

Définition à la ligne 470 du fichier ExManagerCommand.cpp.

Références AddNewAction(), ExNihilo::ExtractIntValueFromSring(), ExNihilo::ExtracValueFromSring(), Guard, LoadExecFile(), ExCAction::m_Action, ExCAction::m_ExecutingLife, ExCAction::m_Param, ExCAction::m_Param1, ExCAction::m_Param2, ExCAction::m_StartingLife, et PREFIX.

Référencé par InputAction(), et LoadExecFile().

00471 {
00472 Guard(void ExManagerCommand::LoadExecFile(std::string FileName))
00473         ExCAction                       NewActionA;
00474         char                    buffer[255];
00475 #ifdef UNIX_SRC
00476         sprintf(buffer, PREFIX "/ExNihilo/Data/Command/%s", FileName.data());
00477 #else
00478         sprintf(buffer, "../Data/Command/%s", FileName.data());
00479 #endif
00480         std::ifstream fin;
00481         std::string buffstring;
00482         char b[256];
00483         fin.open(buffer,std::ios::in);
00484         if(fin.is_open())
00485         {
00486                 try
00487                 {
00488                         do
00489                         {
00490                                 memset(b,0,255);
00491                                 fin.getline(b,256,'\n');
00492                                 try
00493                                 {
00494                                         buffstring=ExNihilo::ExtracValueFromSring(b,"<Exec_Action>","<#Exec_Action>");
00495                                         NewActionA.m_Action=ExNihilo::ExtractIntValueFromSring(buffstring,"<Action>","<#Action>");
00496                                         NewActionA.m_Param=ExNihilo::ExtracValueFromSring(buffstring,"<Param>","<#Param>");
00497                                         NewActionA.m_Param1=ExNihilo::ExtracValueFromSring(buffstring,"<Param1>","<#Param1>");
00498                                         NewActionA.m_Param2=ExNihilo::ExtracValueFromSring(buffstring,"<Param2>","<#Param2>");
00499                                         NewActionA.m_ExecutingLife=ExNihilo::ExtractIntValueFromSring(buffstring,"<Timer>","<#Timer>");
00500                                         NewActionA.m_StartingLife=(double)((double)glutGet(GLUT_ELAPSED_TIME)/1000);
00501                                         //*Consol<<"READNEW ACTION:"<<NewActionA;
00502                                         AddNewAction(NewActionA);
00503                                 }catch(ExCExpStringNotFound){}
00504                         }while(!fin.eof());
00505                         fin.close();
00506                 }catch(...){throw ExCExpFileReadError();}
00507         }else throw   ExCExpFileNotFound();
00508 UnGuard
00509 }

bool LoadFile std::string    FileName
 

Définition à la ligne 512 du fichier ExManagerCommand.cpp.

Références AddNewAction(), ExCAction::m_Action, et ExCAction::SetParam().

Référencé par main().

00513 {
00514         ExCAction action;
00515         action.SetParam(FileName);
00516         action.m_Action=30038;
00517     AddNewAction(action);
00518         return true;
00519 }

void LoadSetOfFile const char *    FileName
 

Définition à la ligne 346 du fichier ExManagerCommand.cpp.

Références ExManager::Consol, Guard, ExManagerModel::Load(), ExManagerInterface::Load(), LoadCommandFile(), ExManagerMap::LoadMap(), LoadSetOfFile(), ExManagerSound::LoadSound(), ExManagerConsole::LoadStringActionFile(), ManagerConsole, ManagerInterface, ManagerMap, ManagerModel, ManagerSound, PREFIX, et ExCAction::SetParam().

Référencé par InputAction(), et LoadSetOfFile().

00347 {
00348 Guard(void ExManagerCommand::LoadSetOfFile(const char *FileName))
00349         char                    ch;
00350         int                             RetVal;
00351         int                             FileSize;
00352         FILE                    *MyFile;
00353         bool                    endfile=false;
00354         //int                           tmp=0; // not used
00355         std::string             StBuffer;
00356         std::string             StType;
00357     char                        buffer[255];
00358 
00359 #ifdef UNIX_SRC
00360         sprintf(buffer, PREFIX "/ExNihilo/Data/%s",FileName);
00361 #else
00362         sprintf(buffer, "../Data/%s",FileName);
00363 #endif
00364     
00365         MyFile=fopen (buffer,"r");
00366         if(!MyFile)
00367         {
00368                 *Consol<<"File not found:"<<buffer<<std::endl;
00369         }else
00370         {
00371                 *Consol<<"Loading set File :"<<FileName<<std::endl;
00372 
00373                 fseek(MyFile,0,SEEK_END);
00374                 FileSize=ftell(MyFile);
00375                 //Start of file
00376                 fseek(MyFile,0,SEEK_SET);
00377                 do
00378                 {
00379                         RetVal=fread(&ch,sizeof(char),1,MyFile);
00380                 }while(ch!='#');
00381                 //reading file type;
00382                 do
00383                 {
00384                         RetVal=fread(&ch,sizeof(char),1,MyFile);
00385                         StBuffer=StBuffer+ch;   
00386                 }while(ch!='#');
00387                 if(strcmp(StBuffer.data(),"set#")==0)
00388                 {
00389                         
00390                         do
00391                         {
00392                                 
00393                                 StBuffer.erase(StBuffer.begin(),StBuffer.end());
00394                                 do
00395                                 {
00396                                         RetVal=fread(&ch,sizeof(char),1,MyFile);
00397                                         StBuffer=StBuffer+ch;
00398                                 }while(ch!='#');
00399                                 StBuffer.erase(StBuffer.end()-1,StBuffer.end());
00400                                 StBuffer.erase(StBuffer.begin(),StBuffer.begin()+1);
00401                                 if(StBuffer.find("end of set file") != (unsigned)-1)
00402                                 {
00403                                         endfile=true;
00404                                 }else
00405                                 {
00406                                         StType=StBuffer;
00407                                         StBuffer.erase(StBuffer.begin(),StBuffer.end());
00408                                         do
00409                                         {
00410                                                 RetVal=fread(&ch,sizeof(char),1,MyFile);
00411                                                 StBuffer=StBuffer+ch;
00412                                         }while(ch!='#');
00413                                         StBuffer.erase(StBuffer.end()-1,StBuffer.end());
00414                                         
00415                                         if(strcmp(StType.data(),"command")==0)
00416                                         {
00417                                                 std::cout<<"Load command file :"<<StBuffer.data()<<std::endl;
00418                                                 LoadCommandFile(StBuffer.data());
00419                                         }
00420                                         if(strcmp(StType.data(),"console")==0)
00421                                         {
00422                                                 std::cout<<"Load console file :"<<StBuffer.data()<<std::endl;
00423                                                 ManagerConsole->LoadStringActionFile(StBuffer.data());  
00424                                         }
00425                                         if(strcmp(StType.data(),"interface")==0)
00426                                         {
00427                                                 std::cout<<"Load interface file :"<<StBuffer.data()<<std::endl;
00428                                                 ManagerInterface->Load(StBuffer.data());        
00429                                         }
00430                                         if(strcmp(StType.data(),"modele")==0)
00431                                         {
00432                                                 std::cout<<"Load asc file :"<<StBuffer.data()<<std::endl;
00433                                                 ManagerModel->Load(StBuffer);   
00434                                         }
00435                                         if(strcmp(StType.data(),"sound")==0)
00436                                         {
00437                                                 std::cout<<"Load sound file :"<<StBuffer.data()<<std::endl;
00438                                                 ManagerSound->LoadSound(StBuffer.data());       
00439                                         }
00440                                         if(strcmp(StType.data(),"set")==0)
00441                                         {
00442                                                 std::cout<<"Load set file :"<<StBuffer.data()<<std::endl;
00443                                                 LoadSetOfFile(StBuffer.data()); 
00444                                         }
00445                                         if(strcmp(StType.data(),"exec")==0)
00446                                         {
00447                                                 std::cout<<"Load set file :"<<StBuffer.data()<<std::endl;
00448                                                 
00449                                                 ExCAction action;
00450                                                 action.SetParam(StBuffer.data());
00451                                                 //LoadExecFile(&action);        
00452                                         }
00453                                         if(strcmp(StType.data(),"map")==0)
00454                                         {
00455                                                 std::cout<<"Load map file :"<<StBuffer.data()<<std::endl;
00456                                                 ManagerMap->LoadMap(StBuffer.data());   
00457                                         }
00458                                         
00459                                 }
00460                         }while(!endfile);
00461                         fclose(MyFile);
00462                 }else
00463                 {
00464                         *Consol<<FileName<<" is not a valide console file"<<std::endl;
00465                 }
00466     }
00467 UnGuard
00468 }

bool ProcesExCAction ExCAction    action [private]
 

Définition à la ligne 523 du fichier ExManagerCommand.cpp.

Références AddNewAction(), ExCAction::AllActionDone(), ExManagerConsole::ClearConsol(), ExManager::Consol, END_COMMAND_ACTION_MAP, END_ID_ACTION_MAP, END_MENU_ACTION_MAP, END_MODEL_ACTION_MAP, END_NETWORK_ACTION_MAP, END_WINDOW_ACTION_MAP, Guard, InputAction(), ExManagerWindow::InputAction(), ExManagerId::InputAction(), ExManagerNetwork::InputAction(), ExManagerMenu::InputAction(), ExManagerModel::InputAction(), ExManagerParticuleSystem::InputAction(), ExManagerMap::InputAction(), ExManagerSound::InputAction(), ExManagerInterface::InputAction(), ExManagerFog::InputAction(), ExManagerCamera::InputAction(), ExManagerConsole::InputAction(), logfilecommand, ExCAction::m_Action, ExCAction::m_ActionNumber, ExCAction::m_executed, ExCAction::m_ExecutingLife, ExCAction::m_NextAction, ExCAction::m_Param, ExCAction::m_StartingLife, ManagerAnim, ManagerCamera, ManagerCollision, ManagerConsole, ManagerFog, ManagerGizmo, ManagerId, ManagerInterface, ManagerLight, ManagerMap, ManagerMenu, ManagerModel, ManagerNetwork, ManagerParticuleSystem, ManagerSound, ManagerSpirit, ManagerTexture, ManagerWindow, ProcesExCAction(), ExManagerSound::Reset(), ExManagerSpirit::Reset(), ExManagerConsole::Reset(), ExManagerInterface::Reset(), ExManagerTexture::Reset(), ExManagerParticuleSystem::Reset(), ExManagerCamera::Reset(), ExManagerLight::Reset(), ExManagerGizmo::Reset(), ExManagerModel::Reset(), ExManagerFog::Reset(), ExManagerMap::Reset(), ExManagerAnimation::Reset(), ExManagerCollision::Reset(), ExManagerMenu::Reset(), ExManagerId::Reset(), START_COMMAND_ACTION_MAP, START_ID_ACTION_MAP, START_MENU_ACTION_MAP, START_MODEL_ACTION_MAP, START_NETWORK_ACTION_MAP, et START_WINDOW_ACTION_MAP.

Référencé par ApplyAction(), et ProcesExCAction().

00524 {
00525 Guard(bool ExManagerCommand::ProcesExCAction(ExCAction action))
00526         if(action.m_executed==false)//check if action already executed
00527         {
00528         
00529                 std::string Param;
00530                 Param=action.m_Param;
00531                 Param.erase(Param.begin(),Param.begin()+1);
00532                 
00533                 ExCAction NAction(action);
00534                 //NAction.m_Action=action.m_Action;
00535                 NAction.m_Param=Param;
00536 
00537                 //check if is time to execute action
00538                 double ctime;
00539                 ctime=(double)((double)glutGet(GLUT_ELAPSED_TIME)/1000);
00540                 if(action.m_ExecutingLife<0||(double)ctime-action.m_ExecutingLife>=(action.m_StartingLife))
00541                 {
00542                         if(LogCommand)
00543                         {
00544                                 logfilecommand<<"Process Action :"<<action.m_Action<<" Param :"<<action.m_Param<<std::endl;
00545                         }
00546                         //*Consol<<action;
00547                         //std::cout<<"ManagerCommand::Process Action :"<<action.m_Action<<" Param :"<<action.m_Param<<std::endl;
00548                         //time to execute action
00549                         //-------------------------------------------------
00550                         //BASIC ACTION
00551                         //-------------------------------------------------
00552                         if(action.m_Action>=START_BASIC_ACTION_MAP && action.m_Action<END_BASIC_ACTION_MAP) 
00553                         {
00554                                 switch(action.m_Action)
00555                                 {
00556                                 case NOTHING:
00557                                         break;
00558                                 case QUIT:
00559                                         exit(0);
00560                                         break;
00561                                 case RESET:
00562                                         ManagerId->Reset();
00563                                         ManagerMenu->Reset();
00564                                         ManagerCollision->Reset();
00565                                         ManagerAnim->Reset();
00566                                         ManagerMap->Reset();    
00567                                         ManagerFog->Reset();
00568                                         ManagerModel->Reset();
00569                                         ManagerGizmo->Reset();
00570                                         ManagerLight->Reset();
00571                                         ManagerCamera->Reset();
00572                                         ManagerParticuleSystem->Reset();
00573                                         ManagerTexture->Reset();
00574                                         ManagerInterface->Reset();
00575                                         ManagerConsole->Reset();
00576                                         ManagerSpirit->Reset();
00577                                         ManagerSound->Reset();
00578                                         ManagerConsole->ClearConsol();
00579                                         *Consol<<"Engine reseted"<<std::endl;
00580                                         break;
00581                                 default:
00582                                         *Consol<<"Can not file action in BASIC_ACTION_MAP Action:"<<action.m_Action<<" Param:"<<Param<<std::endl;
00583                                         break;
00584                                 }
00585 
00586                         }
00587                         //-------------------------------------------------
00588                         //CONSOLE ACTION
00589                         //-------------------------------------------------
00590                         if(action.m_Action>START_CONSOL_ACTION_MAP && action.m_Action<END_CONSOL_ACTION_MAP) 
00591                         {
00592                                 AddNewAction(ManagerConsole->InputAction(NAction));
00593                         }
00594                         //-------------------------------------------------
00595                         //CAMERA ACTION
00596                         //-------------------------------------------------
00597                         if(action.m_Action>START_CAMERA_ACTION_MAP && action.m_Action<END_CAMERA_ACTION_MAP) 
00598                         {
00599                                 AddNewAction(ManagerCamera->InputAction(NAction));
00600                         }
00601                         //-------------------------------------------------
00602                         //CONSOL ACTION
00603                         //-------------------------------------------------
00604                         if(action.m_Action>START_CONSOL_ACTION_MAP && action.m_Action<END_CONSOL_ACTION_MAP) 
00605                         {
00606                                 AddNewAction(ManagerConsole->InputAction(NAction));
00607                         }
00608                         //-------------------------------------------------
00609                         //FOG ACTION
00610                         //-------------------------------------------------
00611                         if(action.m_Action>START_FOG_ACTION_MAP && action.m_Action<END_FOG_ACTION_MAP) 
00612                         {
00613                                 AddNewAction(ManagerFog->InputAction(NAction));
00614                         }
00615                         //-------------------------------------------------
00616                         //INTERFACE ACTION
00617                         //-------------------------------------------------
00618                         if(action.m_Action>START_INTERFACE_ACTION_MAP && action.m_Action<END_INTERFACE_ACTION_MAP) 
00619                         {
00620                                 AddNewAction(ManagerInterface->InputAction(NAction));
00621                         }
00622                         //-------------------------------------------------
00623                         //SOUND ACTION
00624                         //-------------------------------------------------
00625                         if(action.m_Action>START_SOUND_ACTION_MAP && action.m_Action<END_SOUND_ACTION_MAP) 
00626                         {
00627                                 AddNewAction(ManagerSound->InputAction(NAction));
00628                         }
00629                         //-------------------------------------------------
00630                         //MAP ACTION
00631                         //-------------------------------------------------
00632                         if(action.m_Action>START_MAP_ACTION_MAP && action.m_Action<END_MAP_ACTION_MAP) 
00633                         {
00634                                 AddNewAction(ManagerMap->InputAction(NAction));
00635                         }
00636                         //-------------------------------------------------
00637                         //PARTICULESYSTEME ACTION
00638                         //-------------------------------------------------
00639                         if(action.m_Action>START_PARTICULESYSTEME_ACTION_MAP && action.m_Action<END_PARTICULESYSTEME_ACTION_MAP) 
00640                         {
00641                                 AddNewAction(ManagerParticuleSystem->InputAction(NAction));
00642                         }
00643                         //-------------------------------------------------
00644                         //MODEL ACTION
00645                         //-------------------------------------------------
00646                         if(action.m_Action>START_MODEL_ACTION_MAP && action.m_Action<END_MODEL_ACTION_MAP) 
00647                         {
00648                                 AddNewAction(ManagerModel->InputAction(NAction));
00649                         }
00650                         //-------------------------------------------------
00651                         //MENU ACTION
00652                         //-------------------------------------------------
00653                         if(action.m_Action>START_MENU_ACTION_MAP && action.m_Action<END_MENU_ACTION_MAP) 
00654                         {
00655                                 AddNewAction(ManagerMenu->InputAction(NAction));
00656                         }
00657                         //-------------------------------------------------
00658                         //NETWORK ACTION
00659                         //-------------------------------------------------
00660                         if(action.m_Action>START_NETWORK_ACTION_MAP && action.m_Action<END_NETWORK_ACTION_MAP) 
00661                         {
00662                                 AddNewAction(ManagerNetwork->InputAction(NAction));
00663                         }
00664                         //-------------------------------------------------
00665                         //ID ACTION
00666                         //-------------------------------------------------
00667                         if(action.m_Action>START_ID_ACTION_MAP && action.m_Action<END_ID_ACTION_MAP) 
00668                         {
00669                                 AddNewAction(ManagerId->InputAction(NAction));
00670                         }
00671                         //-------------------------------------------------
00672                         //WINDOW ACTION
00673                         //-------------------------------------------------
00674                         if(action.m_Action>START_WINDOW_ACTION_MAP && action.m_Action<END_WINDOW_ACTION_MAP) 
00675                         {
00676                                 AddNewAction(ManagerWindow->InputAction(NAction));
00677                         }
00678                         //-------------------------------------------------
00679                         //COMMAND ACTION
00680                         //-------------------------------------------------
00681                         if(action.m_Action>START_COMMAND_ACTION_MAP && action.m_Action<END_COMMAND_ACTION_MAP) 
00682                         {
00683                                 AddNewAction(InputAction(NAction));
00684                         }
00685                 }
00686         }
00687     //action.m_executed=false;
00688         //to call all acton in the stack
00689         if(action.m_NextAction!=NULL)
00690         {
00691                 ProcesExCAction(*action.m_NextAction);
00692         }
00693         if(action.m_ActionNumber==0)//this is the first action of the stack
00694         {
00695                 if(action.AllActionDone())//all action in the stack was done
00696                 {
00697                         return true;
00698                 }
00699         }
00700         return false;
00701 UnGuard
00702 }

void ProcessCommand ExCCommand    command [private]
 

Définition à la ligne 134 du fichier ExManagerCommand.cpp.

Références AddAction(), Guard, ExCCommand::m_Command, m_ItVecCommand, m_VecCommand, et ProcessCommand().

Référencé par InputCommand(), et ProcessCommand().

00135 {
00136 Guard(void ExManagerCommand::ProcessCommand(ExCCommand command))
00137         //std::cout<<"ManagerCommand::Process command :"<<command.m_Command<<std::endl;
00138         for(m_ItVecCommand=m_VecCommand.begin();m_ItVecCommand!=m_VecCommand.end();m_ItVecCommand++)
00139         {
00140                 if(m_ItVecCommand->first.m_Command==command.m_Command)
00141                 {
00142                         AddAction(m_ItVecCommand->second);
00143                 }
00144         }
00145 UnGuard
00146 }

void RemoveRepAction ExCAction    action [private]
 

Définition à la ligne 170 du fichier ExManagerCommand.cpp.

Références Guard, ExCAction::m_Action, m_ItVecRepAction, m_VecRepAction, et RemoveRepAction().

Référencé par RemoveRepAction().

00171 {
00172 Guard(void ExManagerCommand::RemoveRepAction(ExCAction action)) 
00173         int i=0;
00174         for(m_ItVecRepAction=m_VecRepAction.begin();m_ItVecRepAction!=m_VecRepAction.end();m_ItVecRepAction++,i++)
00175         {
00176                 if(m_VecRepAction.at(i).m_Action==action.m_Action)
00177                 {
00178                         m_VecRepAction.erase(m_ItVecRepAction); break;
00179                 }
00180         }
00181 UnGuard
00182 }

void Reset void    [inline, virtual]
 

Redéfinie à partir de ExManager.

Définition à la ligne 149 du fichier ExManagerCommand.h.

00150 {return;}

void SetManagerAnim ExManagerAnimation   Anim [inline]
 

Définition à la ligne 153 du fichier ExManagerCommand.h.

Références ManagerFog.

Référencé par SetManagerLink().

00153 {ManagerFog = Fog;}

void SetManagerCamera ExManagerCamera   Cam [inline]
 

Définition à la ligne 167 du fichier ExManagerCommand.h.

Référencé par SetManagerLink().

00168 {ManagerCamera = Cam;}

void SetManagerCollision ExManagerCollision   Collision [inline]
 

Définition à la ligne 159 du fichier ExManagerCommand.h.

Références ManagerTexture.

Référencé par SetManagerLink().

00159 {ManagerTexture = Texture;}

void SetManagerConsole ExManagerConsole   Console [inline]
 

Définition à la ligne 163 du fichier ExManagerCommand.h.

Références ManagerInterface.

Référencé par SetManagerLink().

00163 {ManagerInterface=Interface;}

void SetManagerFog ExManagerFog   Fog [inline]
 

Définition à la ligne 152 du fichier ExManagerCommand.h.

Références ManagerMap.

Référencé par SetManagerLink().

00152 {ManagerMap = Map;}

void SetManagerGizmo ExManagerGizmo   Gizmo [inline]
 

Définition à la ligne 155 du fichier ExManagerCommand.h.

Références ManagerWindow.

Référencé par SetManagerLink().

00155 {ManagerWindow = Window;}

void SetManagerId ExManagerId   Id [inline]
 

Définition à la ligne 160 du fichier ExManagerCommand.h.

Références ManagerCollision.

Référencé par SetManagerLink().

00160 {ManagerCollision = Collision;}

void SetManagerInterface ExManagerInterface   Interface [inline]
 

Définition à la ligne 162 du fichier ExManagerCommand.h.

Références ManagerMenu.

Référencé par SetManagerLink().

00162 {ManagerMenu=Menu;}

void SetManagerLight ExManagerLight   Light [inline]
 

Définition à la ligne 156 du fichier ExManagerCommand.h.

Références ManagerGizmo.

Référencé par SetManagerLink().

00156 {ManagerGizmo = Gizmo;}

void SetManagerMap ExManagerMap   Map [inline]
 

Définition à la ligne 151 du fichier ExManagerCommand.h.

Référencé par SetManagerLink().

00152 {ManagerMap = Map;}

void SetManagerMenu ExManagerMenu   Menu [inline]
 

Définition à la ligne 161 du fichier ExManagerCommand.h.

Références ManagerId.

Référencé par SetManagerLink().

00161 {ManagerId      = Id;}

void SetManagerModel ExManagerModel   Model [inline]
 

Définition à la ligne 168 du fichier ExManagerCommand.h.

Références ManagerCamera.

Référencé par SetManagerLink().

00168 {ManagerCamera = Cam;}

void SetManagerNetwork ExManagerNetwork   Network [inline]
 

Définition à la ligne 169 du fichier ExManagerCommand.h.

Référencé par SetManagerLink().

00169 {ManagerModel = Model;}

void SetManagerParticuleSystem ExManagerParticuleSystem   ParticuleSystem [inline]
 

Définition à la ligne 157 du fichier ExManagerCommand.h.

Références ManagerLight.

Référencé par SetManagerLink().

00157 {ManagerLight = Light;}

void SetManagerSound ExManagerSound   Sound [inline]
 

Définition à la ligne 164 du fichier ExManagerCommand.h.

Références ManagerConsole.

Référencé par SetManagerLink().

00164 {ManagerConsole=Console;}

void SetManagerSpirit ExManagerSpirit   Spirit [inline]
 

Définition à la ligne 165 du fichier ExManagerCommand.h.

Références ManagerSound.

Référencé par SetManagerLink().

00165 {ManagerSound=Sound;}

void SetManagerTexture ExManagerTexture   Texture [inline]
 

Définition à la ligne 158 du fichier ExManagerCommand.h.

Références ManagerParticuleSystem.

Référencé par SetManagerLink().

00158 {ManagerParticuleSystem = ParticuleSystem;}

void SetManagerWindow ExManagerWindow   Window [inline]
 

Définition à la ligne 154 du fichier ExManagerCommand.h.

Référencé par SetManagerLink().

00154 {ManagerAnim = Anim;}

void SetMousePosition int    posx,
int    posy
[inline]
 

Définition à la ligne 180 du fichier ExManagerCommand.h.

Références m_MousePosX, et m_MousePosY.

00181 {m_MousePosX=posx;m_MousePosY=posy;}


Documentation des données imbriquées

bool LogCommand [private]
 

Définition à la ligne 132 du fichier ExManagerCommand.h.

Référencé par ExManagerCommand().

ofstream logfilecommand [private]
 

Définition à la ligne 133 du fichier ExManagerCommand.h.

Référencé par ExManagerCommand(), et ProcesExCAction().

bool m_flag = false [static, private]
 

Définition à la ligne 26 du fichier ExManagerCommand.cpp.

Référencé par CreateSingleton().

ExManagerCommand * m_instance = NULL [static, private]
 

Définition à la ligne 27 du fichier ExManagerCommand.cpp.

Référencé par CreateSingleton().

std::vector<ExCAction>::iterator m_ItVecAction [private]
 

Définition à la ligne 116 du fichier ExManagerCommand.h.

Référencé par ApplyAction().

std::vector<CommandAction>::iterator m_ItVecCommand [private]
 

Définition à la ligne 113 du fichier ExManagerCommand.h.

Référencé par ProcessCommand().

std::vector<ExCAction>::iterator m_ItVecRepAction [private]
 

Définition à la ligne 120 du fichier ExManagerCommand.h.

Référencé par AddRepAction(), ApplyAction(), et RemoveRepAction().

int m_MousePosX [private]
 

Définition à la ligne 108 du fichier ExManagerCommand.h.

Référencé par SetMousePosition().

int m_MousePosY [private]
 

Définition à la ligne 109 du fichier ExManagerCommand.h.

Référencé par SetMousePosition().

std::vector<ExCAction> m_VecAction [private]
 

Définition à la ligne 115 du fichier ExManagerCommand.h.

Référencé par AddAction(), et ApplyAction().

std::vector<CommandAction> m_VecCommand [private]
 

Définition à la ligne 112 du fichier ExManagerCommand.h.

Référencé par AddCommandAction(), et ProcessCommand().

std::vector<ExCAction> m_VecRepAction [private]
 

Définition à la ligne 119 du fichier ExManagerCommand.h.

Référencé par AddRepAction(), ApplyAction(), et RemoveRepAction().

std::vector<ExCAction> m_VecTempAction [private]
 

Définition à la ligne 117 du fichier ExManagerCommand.h.

Référencé par AddNewAction(), et ApplyAction().

ExManagerAnimation* ManagerAnim [private]
 

Définition à la ligne 93 du fichier ExManagerCommand.h.

Référencé par ProcesExCAction().

ExManagerCamera* ManagerCamera [private]
 

Définition à la ligne 105 du fichier ExManagerCommand.h.

Référencé par ProcesExCAction().

ExManagerCollision* ManagerCollision [private]
 

Définition à la ligne 99 du fichier ExManagerCommand.h.

Référencé par ProcesExCAction().

ExManagerConsole* ManagerConsole [private]
 

Définition à la ligne 102 du fichier ExManagerCommand.h.

Référencé par InputAction(), InputCommand(), LoadSetOfFile(), et ProcesExCAction().

ExManagerFog* ManagerFog [private]
 

Définition à la ligne 92 du fichier ExManagerCommand.h.

Référencé par ProcesExCAction().

ExManagerGizmo* ManagerGizmo [private]
 

Définition à la ligne 95 du fichier ExManagerCommand.h.

Référencé par ProcesExCAction().

ExManagerId* ManagerId [private]
 

Définition à la ligne 100 du fichier ExManagerCommand.h.

Référencé par ProcesExCAction().

ExManagerInterface* ManagerInterface [private]
 

Définition à la ligne 101 du fichier ExManagerCommand.h.

Référencé par InputAction(), LoadSetOfFile(), et ProcesExCAction().

ExManagerLight* ManagerLight [private]
 

Définition à la ligne 96 du fichier ExManagerCommand.h.

Référencé par ProcesExCAction().

ExManagerMap* ManagerMap [private]
 

Définition à la ligne 91 du fichier ExManagerCommand.h.

Référencé par InputAction(), LoadSetOfFile(), et ProcesExCAction().

ExManagerMenu* ManagerMenu [private]
 

Définition à la ligne 90 du fichier ExManagerCommand.h.

Référencé par InputCommand(), et ProcesExCAction().

ExManagerModel* ManagerModel [private]
 

Définition à la ligne 106 du fichier ExManagerCommand.h.

Référencé par InputAction(), LoadSetOfFile(), et ProcesExCAction().

ExManagerNetwork* ManagerNetwork [private]
 

Définition à la ligne 107 du fichier ExManagerCommand.h.

Référencé par ProcesExCAction().

ExManagerParticuleSystem* ManagerParticuleSystem [private]
 

Définition à la ligne 97 du fichier ExManagerCommand.h.

Référencé par InputAction(), et ProcesExCAction().

ExManagerSound* ManagerSound [private]
 

Définition à la ligne 104 du fichier ExManagerCommand.h.

Référencé par InputAction(), LoadSetOfFile(), et ProcesExCAction().

ExManagerSpirit* ManagerSpirit [private]
 

Définition à la ligne 103 du fichier ExManagerCommand.h.

Référencé par ProcesExCAction().

ExManagerTexture* ManagerTexture [private]
 

Définition à la ligne 98 du fichier ExManagerCommand.h.

Référencé par ProcesExCAction().

ExManagerWindow* ManagerWindow [private]
 

Définition à la ligne 94 du fichier ExManagerCommand.h.

Référencé par ProcesExCAction().

bool plok [private]
 

Définition à la ligne 134 du fichier ExManagerCommand.h.

Référencé par ExManagerCommand().


La documentation associée à cette classe a été générée à partir des fichiers suivants :
Généré le Tue Dec 10 18:18:39 2002 pour ExNihilo par doxygen1.3-rc1