Main Page Namespace List Class Hierarchy Alphabetical List Data Structures File List Namespace Members Data Fields Globals

# ExManagerCommand Class Reference

`#include <ExManagerCommand.h>`

Inheritance diagram for ExManagerCommand:

## Public Methods
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)
## Static Public Methods
ExManagerCommand * | CreateSingleton (void)
## Private Types
typedef std::pair< ExCCommand, ExCAction > | CommandAction
## Private Methods
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)
## Private Attributes
ExManagerMenu * | ManagerMenu
ExManagerMap * | ManagerMap
ExManagerFog * | ManagerFog
ExManagerAnimation * | ManagerAnim
ExManagerWindow * | ManagerWindow
ExManagerGizmo * | ManagerGizmo
ExManagerLight * | ManagerLight
ExManagerParticuleSystem * | ManagerParticuleSystem
ExManagerTexture * | ManagerTexture
ExManagerCollision * | ManagerCollision
ExManagerId * | ManagerId
ExManagerInterface * | ManagerInterface
ExManagerConsole * | ManagerConsole
ExManagerSpirit * | ManagerSpirit
ExManagerSound * | ManagerSound
ExManagerCamera * | ManagerCamera
ExManagerModel * | ManagerModel
ExManagerNetwork * | ManagerNetwork
int | m_MousePosX
int | m_MousePosY
std::vector< CommandAction > | m_VecCommand
std::vector< CommandAction >::iterator | m_ItVecCommand
std::vector< ExCAction > | m_VecAction
std::vector< ExCAction >::iterator | m_ItVecAction
std::vector< ExCAction > | m_VecTempAction
std::vector< ExCAction > | m_VecRepAction
std::vector< ExCAction >::iterator | m_ItVecRepAction
bool | LogCommand
ofstream | logfilecommand
bool | plok
## Static Private Attributes
bool | m_flag = false
ExManagerCommand * | m_instance = NULL

## Member Typedef Documentation

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

| Definition at line 111 of file ExManagerCommand.h. Referenced by AddCommandAction().

## Constructor & Destructor Documentation

ExManagerCommand | ( | void |  | ) | `[private]`

| Definition at line 43 of file ExManagerCommand.cpp. References LogCommand, logfilecommand, and 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]`

| Definition at line 54 of file ExManagerCommand.cpp.
    00055 {
    00056 }

## Member Function Documentation

void AddAction | ( | ExCAction | action | ) | `[private]`

| Definition at line 148 of file ExManagerCommand.cpp. References AddAction(), Guard, ExCAction::m_Action, and m_VecAction. Referenced by AddAction(), ApplyAction(), InputCommand(), and 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]`

| Definition at line 269 of file ExManagerCommand.cpp. References AddCommandAction(), CommandAction, Guard, and 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]`

| Definition at line 276 of file ExManagerCommand.cpp. References AddCommandAction(), CommandAction, Guard, and 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]`

| Definition at line 256 of file ExManagerCommand.cpp. References AddCommandAction(), CommandAction, Guard, and 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]`

| Definition at line 245 of file ExManagerCommand.cpp. References AddCommandAction(), CommandAction, ExCFileDataAction::getAction(), ExCFileDataAction::getCommand(), ExCFileDataAction::getParam(), Guard, and m_VecCommand. Referenced by AddCommandAction(), Init(), and 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 | ) |

| Definition at line 159 of file ExManagerCommand.cpp. References AddNewAction(), Guard, ExCAction::m_Action, and m_VecTempAction. Referenced by AddNewAction(), ApplyAction(), LoadExecFile(), LoadFile(), and 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]`

| Definition at line 184 of file ExManagerCommand.cpp. References AddRepAction(), Guard, ExCAction::m_Action, m_ItVecRepAction, and m_VecRepAction. Referenced by 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 |  | ) |

| Definition at line 203 of file ExManagerCommand.cpp. References AddAction(), AddNewAction(), ApplyAction(), Guard, m_ItVecAction, m_ItVecRepAction, m_VecAction, m_VecRepAction, m_VecTempAction, and ProcesExCAction(). Referenced by ApplyAction(), and 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]`

| Definition at line 29 of file ExManagerCommand.cpp. References CreateSingleton(), Guard, m_flag, and m_instance. Referenced by CreateSingleton(), and 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 |  | ) |

| Definition at line 704 of file ExManagerCommand.cpp. References ExManager::Consol, DisplayFileType(), and Guard. Referenced by DisplayFileType(), and 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]`

| Reimplemented from ExManager. Definition at line 287 of file ExManagerCommand.cpp. References 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, and Init(). Referenced by Init(), and 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]`

| Reimplemented from ExManager. Definition at line 739 of file ExManagerCommand.cpp. References 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, and ManagerSound. Referenced by InputAction(), and 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]`

| Reimplemented from ExManager. Definition at line 109 of file ExManagerCommand.cpp. References AddAction(), ExManager::AskForCommand(), ExManager::AskForExclusifCommand(), Guard, ExManagerMenu::InputCommand(), ExManagerConsole::InputCommand(), InputCommand(), ManagerConsole, ManagerMenu, and 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 | ) |

| Definition at line 101 of file ExManagerCommand.cpp. References Guard, and InputCommand(). Referenced by InputCommand(), ExManagerInputGLUT::Key(), ExManagerInputGLUT::KeySpe(), ExManagerInputGLUT::KeySpeUp(), ExManagerInputGLUT::KeyUp(), and 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 | ) |

| Definition at line 58 of file ExManagerCommand.cpp. References AddCommandAction(), ExManager::Consol, ExCFile::exist(), FILE_COMMAND, ExCFileData::getContent(), ExCFileReader::getContent(), ExCFileData::getType(), Guard, LoadCommandFile(), and PREFIX. Referenced by InputAction(), LoadCommandFile(), and 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 | ) |

| Definition at line 470 of file ExManagerCommand.cpp. References 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, and PREFIX. Referenced by InputAction(), and 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 | ) |

| Definition at line 512 of file ExManagerCommand.cpp. References AddNewAction(), ExCAction::m_Action, and ExCAction::SetParam(). Referenced by 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 | ) |

| Definition at line 346 of file ExManagerCommand.cpp. References ExManager::Consol, Guard, ExManagerModel::Load(), ExManagerInterface::Load(), LoadCommandFile(), ExManagerMap::LoadMap(), LoadSetOfFile(), ExManagerSound::LoadSound(), ExManagerConsole::LoadStringActionFile(), ManagerConsole, ManagerInterface, ManagerMap, ManagerModel, ManagerSound, PREFIX, and ExCAction::SetParam(). Referenced by InputAction(), and 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]`

| Definition at line 523 of file ExManagerCommand.cpp. References 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, and START_WINDOW_ACTION_MAP. Referenced by ApplyAction(), and 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]`

| Definition at line 134 of file ExManagerCommand.cpp. References AddAction(), Guard, ExCCommand::m_Command, m_ItVecCommand, m_VecCommand, and ProcessCommand(). Referenced by InputCommand(), and 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]`

| Definition at line 170 of file ExManagerCommand.cpp. References Guard, ExCAction::m_Action, m_ItVecRepAction, m_VecRepAction, and RemoveRepAction(). Referenced by 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]`

| Reimplemented from ExManager. Definition at line 149 of file ExManagerCommand.h.
    00150 {return;}

void SetManagerAnim | ( | ExManagerAnimation * | Anim | ) | `[inline]`

| Definition at line 153 of file ExManagerCommand.h. References ManagerFog. Referenced by SetManagerLink().
    00153 {ManagerFog = Fog;}

void SetManagerCamera | ( | ExManagerCamera * | Cam | ) | `[inline]`

| Definition at line 167 of file ExManagerCommand.h. Referenced by SetManagerLink().
    00168 {ManagerCamera = Cam;}

void SetManagerCollision | ( | ExManagerCollision * | Collision | ) | `[inline]`

| Definition at line 159 of file ExManagerCommand.h. References ManagerTexture. Referenced by SetManagerLink().
    00159 {ManagerTexture = Texture;}

void SetManagerConsole | ( | ExManagerConsole * | Console | ) | `[inline]`

| Definition at line 163 of file ExManagerCommand.h. References ManagerInterface. Referenced by SetManagerLink().
    00163 {ManagerInterface=Interface;}

void SetManagerFog | ( | ExManagerFog * | Fog | ) | `[inline]`

| Definition at line 152 of file ExManagerCommand.h. References ManagerMap. Referenced by SetManagerLink().
    00152 {ManagerMap = Map;}

void SetManagerGizmo | ( | ExManagerGizmo * | Gizmo | ) | `[inline]`

| Definition at line 155 of file ExManagerCommand.h. References ManagerWindow. Referenced by SetManagerLink().
    00155 {ManagerWindow = Window;}

void SetManagerId | ( | ExManagerId * | Id | ) | `[inline]`

| Definition at line 160 of file ExManagerCommand.h. References ManagerCollision. Referenced by SetManagerLink().
    00160 {ManagerCollision = Collision;}

void SetManagerInterface | ( | ExManagerInterface * | Interface | ) | `[inline]`

| Definition at line 162 of file ExManagerCommand.h. References ManagerMenu. Referenced by SetManagerLink().
    00162 {ManagerMenu=Menu;}

void SetManagerLight | ( | ExManagerLight * | Light | ) | `[inline]`

| Definition at line 156 of file ExManagerCommand.h. References ManagerGizmo. Referenced by SetManagerLink().
    00156 {ManagerGizmo = Gizmo;}

void SetManagerMap | ( | ExManagerMap * | Map | ) | `[inline]`

| Definition at line 151 of file ExManagerCommand.h. Referenced by SetManagerLink().
    00152 {ManagerMap = Map;}

void SetManagerMenu | ( | ExManagerMenu * | Menu | ) | `[inline]`

| Definition at line 161 of file ExManagerCommand.h. References ManagerId. Referenced by SetManagerLink().
    00161 {ManagerId      = Id;}

void SetManagerModel | ( | ExManagerModel * | Model | ) | `[inline]`

| Definition at line 168 of file ExManagerCommand.h. References ManagerCamera. Referenced by SetManagerLink().
    00168 {ManagerCamera = Cam;}

void SetManagerNetwork | ( | ExManagerNetwork * | Network | ) | `[inline]`

| Definition at line 169 of file ExManagerCommand.h. Referenced by SetManagerLink().
    00169 {ManagerModel = Model;}

void SetManagerParticuleSystem | ( | ExManagerParticuleSystem * | ParticuleSystem | ) | `[inline]`

| Definition at line 157 of file ExManagerCommand.h. References ManagerLight. Referenced by SetManagerLink().
    00157 {ManagerLight = Light;}

void SetManagerSound | ( | ExManagerSound * | Sound | ) | `[inline]`

| Definition at line 164 of file ExManagerCommand.h. References ManagerConsole. Referenced by SetManagerLink().
    00164 {ManagerConsole=Console;}

void SetManagerSpirit | ( | ExManagerSpirit * | Spirit | ) | `[inline]`

| Definition at line 165 of file ExManagerCommand.h. References ManagerSound. Referenced by SetManagerLink().
    00165 {ManagerSound=Sound;}

void SetManagerTexture | ( | ExManagerTexture * | Texture | ) | `[inline]`

| Definition at line 158 of file ExManagerCommand.h. References ManagerParticuleSystem. Referenced by SetManagerLink().
    00158 {ManagerParticuleSystem = ParticuleSystem;}

void SetManagerWindow | ( | ExManagerWindow * | Window | ) | `[inline]`

| Definition at line 154 of file ExManagerCommand.h. Referenced by SetManagerLink().
    00154 {ManagerAnim = Anim;}

void SetMousePosition | ( | int | posx,
|  | int | posy
| ) | `[inline]`

| Definition at line 180 of file ExManagerCommand.h. References m_MousePosX, and m_MousePosY.
    00181 {m_MousePosX=posx;m_MousePosY=posy;}

## Field Documentation

bool LogCommand`[private]`

| Definition at line 132 of file ExManagerCommand.h. Referenced by ExManagerCommand().

ofstream logfilecommand`[private]`

| Definition at line 133 of file ExManagerCommand.h. Referenced by ExManagerCommand(), and ProcesExCAction().

bool m_flag = false`[static, private]`

| Definition at line 26 of file ExManagerCommand.cpp. Referenced by CreateSingleton().

ExManagerCommand * m_instance = NULL`[static, private]`

| Definition at line 27 of file ExManagerCommand.cpp. Referenced by CreateSingleton().

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

| Definition at line 116 of file ExManagerCommand.h. Referenced by ApplyAction().

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

| Definition at line 113 of file ExManagerCommand.h. Referenced by ProcessCommand().

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

| Definition at line 120 of file ExManagerCommand.h. Referenced by AddRepAction(), ApplyAction(), and RemoveRepAction().

int m_MousePosX`[private]`

| Definition at line 108 of file ExManagerCommand.h. Referenced by SetMousePosition().

int m_MousePosY`[private]`

| Definition at line 109 of file ExManagerCommand.h. Referenced by SetMousePosition().

std::vector<ExCAction> m_VecAction`[private]`

| Definition at line 115 of file ExManagerCommand.h. Referenced by AddAction(), and ApplyAction().

std::vector<CommandAction> m_VecCommand`[private]`

| Definition at line 112 of file ExManagerCommand.h. Referenced by AddCommandAction(), and ProcessCommand().

std::vector<ExCAction> m_VecRepAction`[private]`

| Definition at line 119 of file ExManagerCommand.h. Referenced by AddRepAction(), ApplyAction(), and RemoveRepAction().

std::vector<ExCAction> m_VecTempAction`[private]`

| Definition at line 117 of file ExManagerCommand.h. Referenced by AddNewAction(), and ApplyAction().

ExManagerAnimation* ManagerAnim`[private]`

| Definition at line 93 of file ExManagerCommand.h. Referenced by ProcesExCAction().

ExManagerCamera* ManagerCamera`[private]`

| Definition at line 105 of file ExManagerCommand.h. Referenced by ProcesExCAction().

ExManagerCollision* ManagerCollision`[private]`

| Definition at line 99 of file ExManagerCommand.h. Referenced by ProcesExCAction().

ExManagerConsole* ManagerConsole`[private]`

| Definition at line 102 of file ExManagerCommand.h. Referenced by InputAction(), InputCommand(), LoadSetOfFile(), and ProcesExCAction().

ExManagerFog* ManagerFog`[private]`

| Definition at line 92 of file ExManagerCommand.h. Referenced by ProcesExCAction().

ExManagerGizmo* ManagerGizmo`[private]`

| Definition at line 95 of file ExManagerCommand.h. Referenced by ProcesExCAction().

ExManagerId* ManagerId`[private]`

| Definition at line 100 of file ExManagerCommand.h. Referenced by ProcesExCAction().

ExManagerInterface* ManagerInterface`[private]`

| Definition at line 101 of file ExManagerCommand.h. Referenced by InputAction(), LoadSetOfFile(), and ProcesExCAction().

ExManagerLight* ManagerLight`[private]`

| Definition at line 96 of file ExManagerCommand.h. Referenced by ProcesExCAction().

ExManagerMap* ManagerMap`[private]`

| Definition at line 91 of file ExManagerCommand.h. Referenced by InputAction(), LoadSetOfFile(), and ProcesExCAction().

ExManagerMenu* ManagerMenu`[private]`

| Definition at line 90 of file ExManagerCommand.h. Referenced by InputCommand(), and ProcesExCAction().

ExManagerModel* ManagerModel`[private]`

| Definition at line 106 of file ExManagerCommand.h. Referenced by InputAction(), LoadSetOfFile(), and ProcesExCAction().

ExManagerNetwork* ManagerNetwork`[private]`

| Definition at line 107 of file ExManagerCommand.h. Referenced by ProcesExCAction().

ExManagerParticuleSystem* ManagerParticuleSystem`[private]`

| Definition at line 97 of file ExManagerCommand.h. Referenced by InputAction(), and ProcesExCAction().

ExManagerSound* ManagerSound`[private]`

| Definition at line 104 of file ExManagerCommand.h. Referenced by InputAction(), LoadSetOfFile(), and ProcesExCAction().

ExManagerSpirit* ManagerSpirit`[private]`

| Definition at line 103 of file ExManagerCommand.h. Referenced by ProcesExCAction().

ExManagerTexture* ManagerTexture`[private]`

| Definition at line 98 of file ExManagerCommand.h. Referenced by ProcesExCAction().

ExManagerWindow* ManagerWindow`[private]`

| Definition at line 94 of file ExManagerCommand.h. Referenced by ProcesExCAction().

bool plok`[private]`

| Definition at line 134 of file ExManagerCommand.h. Referenced by ExManagerCommand().

The documentation for this class was generated from the following files:

- ExManagerCommand.h
- ExManagerCommand.cpp