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

ExCAction Class Reference

#include <ExCAction.h>


Public Methods

 ExCAction ()
 ExCAction (const ExCAction &Action)
 ExCAction (int Action)
 ExCAction (int Action, std::string Param)
 ExCAction (int Action, std::string Param, std::string Param1)
 ExCAction (int Action, std::string Param, std::string Param1, std::string Param2)
 ~ExCAction ()
void SetParam (std::string Param)
void SetParam1 (std::string Param)
void SetParam2 (std::string Param)
std::string GetParam (void)
std::string GetParam1 (void)
std::string GetParam2 (void)
void SetParam (int ParamNumber, std::string Param)
int GetParamAsInt (int ParamNumber)
float GetParamAsFloat (int ParamNumber)
std::string GetParam (int ParamNumber)
double GetParamAsDouble (int ParamNumber)
bool GetParamAsBool (int ParamNumber)
int GetNumberParam (void)
bool AllActionDone ()

Data Fields

int m_Action
int m_ActionNumber
std::vector< std::string > m_VecParam
std::string m_Param
std::string m_Param1
std::string m_Param2
double m_StartingLife
double m_ExecutingLife
bool m_executed
int m_NumberOfExecution
ExCAction * m_NextAction

Friends

std::ostream & operator<< (std::ostream &s, const ExCAction &action)
std::ostrstream & operator<< (std::ostrstream &s, const ExCAction &action)


Constructor & Destructor Documentation

ExCAction  
 

Definition at line 6 of file ExCAction.cpp.

References ExCAction(), Guard, m_Action, m_ActionNumber, m_executed, m_ExecutingLife, m_NextAction, m_NumberOfExecution, m_Param, m_Param1, m_Param2, and m_StartingLife.

Referenced by ExCAction(), and ~ExCAction().

00007 {
00008 Guard(ExCAction::ExCAction())
00009         m_NextAction=NULL;
00010         m_Action=0;
00011         m_ActionNumber=0;
00012         m_executed=false;
00013         m_StartingLife=(double)((double)glutGet(GLUT_ELAPSED_TIME)/1000);
00014         m_ExecutingLife=-1;
00015         m_NumberOfExecution=1;
00016         m_Param="NULL";
00017         m_Param1="NULL";
00018         m_Param2="NULL";
00019 UnGuard
00020 }

ExCAction const ExCAction &    Action
 

Definition at line 28 of file ExCAction.cpp.

References ExCAction(), Guard, m_Action, m_ActionNumber, m_executed, m_ExecutingLife, m_NextAction, m_NumberOfExecution, m_Param, m_Param1, m_Param2, and m_StartingLife.

00029 {
00030 Guard(ExCAction::ExCAction(const ExCAction& Action))
00031         m_NextAction=Action.m_NextAction;
00032         m_Action=Action.m_Action;
00033         m_ActionNumber=0;
00034         m_NumberOfExecution=Action.m_NumberOfExecution;
00035         m_executed=Action.m_executed;
00036         m_StartingLife=Action.m_StartingLife;
00037         m_ExecutingLife=Action.m_ExecutingLife;
00038         m_Param=Action.m_Param;
00039         m_Param1=Action.m_Param1;
00040         m_Param2=Action.m_Param2;
00041 UnGuard
00042 }

ExCAction int    Action
 

Definition at line 44 of file ExCAction.cpp.

References ExCAction(), Guard, m_Action, m_ActionNumber, m_executed, m_ExecutingLife, m_NextAction, m_NumberOfExecution, m_Param, m_Param1, m_Param2, and m_StartingLife.

00045 {
00046 Guard(ExCAction::ExCAction(int Action))
00047         m_NumberOfExecution=1;
00048         m_NextAction=NULL;
00049         m_Action=Action;
00050         m_ActionNumber=0;
00051         m_executed=false;
00052         m_StartingLife=(double)((double)glutGet(GLUT_ELAPSED_TIME)/1000);
00053         m_ExecutingLife=-1;
00054         m_Param="NULL";
00055         m_Param1="NULL";
00056         m_Param2="NULL";
00057 UnGuard
00058 }

ExCAction int    Action,
std::string    Param
 

Definition at line 60 of file ExCAction.cpp.

References ExCAction(), Guard, m_Action, m_ActionNumber, m_executed, m_ExecutingLife, m_NextAction, m_NumberOfExecution, m_Param, and m_StartingLife.

00061 {
00062 Guard(ExCAction::ExCAction(int Action,std::string Param))       
00063         m_NumberOfExecution=1;
00064         m_NextAction=NULL;
00065         m_Action=Action;
00066         m_ActionNumber=0;
00067         m_executed=false;
00068         m_StartingLife=(double)((double)glutGet(GLUT_ELAPSED_TIME)/1000);
00069         m_ExecutingLife=-1;
00070         m_Param=Param;
00071 UnGuard
00072 }

ExCAction int    Action,
std::string    Param,
std::string    Param1
 

ExCAction int    Action,
std::string    Param,
std::string    Param1,
std::string    Param2
 

~ExCAction  
 

Definition at line 22 of file ExCAction.cpp.

References ExCAction(), and Guard.

00023 {
00024 Guard(ExCAction::~ExCAction())
00025 UnGuard
00026 }


Member Function Documentation

bool AllActionDone  
 

Definition at line 115 of file ExCAction.cpp.

References AllActionDone(), Guard, m_executed, and m_NextAction.

Referenced by AllActionDone(), and ExManagerCommand::ProcesExCAction().

00116 {
00117 Guard(bool ExCAction::AllActionDone())
00118         while(this->m_NextAction!=NULL)
00119         {
00120                 if(this->m_executed==false)
00121                 {
00122                         return false;//one action is not done return false to keep action
00123                 }
00124         }
00125         return true;
00126 UnGuard
00127 }

int GetNumberParam void    [inline]
 

Definition at line 108 of file ExCAction.h.

References m_VecParam.

Referenced by GetParamAsInt(), and SetParam().

00108 {return (int) m_VecParam.size();}

std::string GetParam int    ParamNumber
 

std::string GetParam void    [inline]
 

Definition at line 97 of file ExCAction.h.

References m_Param.

00097 {return m_Param;}

std::string GetParam1 void    [inline]
 

Definition at line 98 of file ExCAction.h.

References m_Param1.

00098 {return m_Param1;}

std::string GetParam2 void    [inline]
 

Definition at line 99 of file ExCAction.h.

References m_Param2.

00099 {return m_Param2;}

bool GetParamAsBool int    ParamNumber
 

double GetParamAsDouble int    ParamNumber
 

float GetParamAsFloat int    ParamNumber
 

int GetParamAsInt int    ParamNumber
 

Definition at line 98 of file ExCAction.cpp.

References GetNumberParam(), GetParamAsInt(), Guard, and m_VecParam.

Referenced by GetParamAsInt().

00099 {
00100         Guard(int ExCAction::GetParamAsInt(int ParamNumber))
00101         if(GetNumberParam()<ParamNumber)throw ExCExpParameterBadNumberParam();
00102         try
00103         {
00104                 return atoi(m_VecParam.at(ParamNumber).data());
00105         }catch (...) 
00106         {
00107                 throw ExCExpParameterConversionError();
00108         }
00109         return true;
00110 UnGuard
00111 }

void SetParam int    ParamNumber,
std::string    Param
 

Definition at line 90 of file ExCAction.cpp.

References GetNumberParam(), Guard, m_VecParam, and SetParam().

00091 {
00092         Guard(void ExCAction::SetParam(int ParamNumber,std::string Param))
00093         if(GetNumberParam()<ParamNumber)throw ExCExpParameterBadNumberParam();
00094         m_VecParam.at(ParamNumber)=Param;
00095 UnGuard
00096 }

void SetParam std::string    Param [inline]
 

Definition at line 94 of file ExCAction.h.

References m_Param.

Referenced by ExManagerConsole::ApplyBuffCommand(), ExCInterface::InputCommand(), ExManagerCommand::LoadFile(), ExManagerCommand::LoadSetOfFile(), and SetParam().

00094 {m_Param=Param;}

void SetParam1 std::string    Param [inline]
 

Definition at line 95 of file ExCAction.h.

References m_Param1.

00095 {m_Param1=Param;}

void SetParam2 std::string    Param [inline]
 

Definition at line 96 of file ExCAction.h.

References m_Param2.

00096 {m_Param2=Param;}


Friends And Related Function Documentation

std::ostrstream& operator<< std::ostrstream &    s,
const ExCAction &    action
[friend]
 

Definition at line 81 of file ExCAction.cpp.

00082 {
00083         s<<" Action :"<<action.m_Action<<" Param :"<<action.m_Param;
00084         s<<" Param1 :"<<action.m_Param1<<" Param2 :"<<action.m_Param2<<std::endl;
00085         return s;
00086 }

std::ostream& operator<< std::ostream &    s,
const ExCAction &    action
[friend]
 

Definition at line 75 of file ExCAction.cpp.

00076 {
00077         s<<" Action :"<<action.m_Action<<" Param :"<<action.m_Param;
00078         s<<" Param1 :"<<action.m_Param1<<" Param2 :"<<action.m_Param2<<std::endl;
00079         return s;
00080 }


Field Documentation

int m_Action
 

Definition at line 65 of file ExCAction.h.

Referenced by ExManagerCommand::AddAction(), ExManagerCommand::AddNewAction(), ExManagerCommand::AddRepAction(), ExManagerConsole::ApplyBuffCommand(), ExCAction(), ExManagerWindow::InputAction(), ExManagerTexture::InputAction(), ExManagerSound::InputAction(), ExManagerParticuleSystem::InputAction(), ExManagerNetwork::InputAction(), ExManagerModel::InputAction(), ExManagerMenu::InputAction(), ExManagerMap::InputAction(), ExManagerInterface::InputAction(), ExManagerId::InputAction(), ExManagerFog::InputAction(), ExManagerConsole::InputAction(), ExManagerCommand::InputAction(), ExManagerCamera::InputAction(), ExCInterface::InputCommand(), ExManagerCommand::LoadExecFile(), ExManagerCommand::LoadFile(), ExCMenu::LoadFile(), operator<<(), ExManagerCommand::ProcesExCAction(), and ExManagerCommand::RemoveRepAction().

int m_ActionNumber
 

Definition at line 66 of file ExCAction.h.

Referenced by ExCAction(), and ExManagerCommand::ProcesExCAction().

bool m_executed
 

Definition at line 76 of file ExCAction.h.

Referenced by AllActionDone(), ExCAction(), and ExManagerCommand::ProcesExCAction().

double m_ExecutingLife
 

Definition at line 75 of file ExCAction.h.

Referenced by ExCAction(), ExManagerCommand::LoadExecFile(), and ExManagerCommand::ProcesExCAction().

ExCAction* m_NextAction
 

Definition at line 79 of file ExCAction.h.

Referenced by AllActionDone(), ExCAction(), ExManagerTexture::InputAction(), ExManagerSound::InputAction(), ExManagerParticuleSystem::InputAction(), ExManagerNetwork::InputAction(), ExManagerModel::InputAction(), ExManagerMap::InputAction(), ExManagerInterface::InputAction(), ExManagerId::InputAction(), ExManagerFog::InputAction(), ExManagerConsole::InputAction(), ExManagerCommand::InputAction(), ExCInterface::InputCommand(), and ExManagerCommand::ProcesExCAction().

int m_NumberOfExecution
 

Definition at line 78 of file ExCAction.h.

Referenced by ExCAction().

std::string m_Param
 

Definition at line 70 of file ExCAction.h.

Referenced by ExCAction(), GetParam(), ExManagerSound::InputAction(), ExManagerParticuleSystem::InputAction(), ExManagerModel::InputAction(), ExManagerMenu::InputAction(), ExManagerInterface::InputAction(), ExManagerFog::InputAction(), ExManagerConsole::InputAction(), ExManagerCommand::InputAction(), ExManagerCamera::InputAction(), ExManagerCommand::LoadExecFile(), ExCMenu::LoadFile(), operator<<(), ExManagerCommand::ProcesExCAction(), and SetParam().

std::string m_Param1
 

Definition at line 71 of file ExCAction.h.

Referenced by ExCAction(), GetParam1(), ExManagerModel::InputAction(), ExManagerCommand::LoadExecFile(), operator<<(), and SetParam1().

std::string m_Param2
 

Definition at line 72 of file ExCAction.h.

Referenced by ExCAction(), GetParam2(), ExManagerCommand::LoadExecFile(), operator<<(), and SetParam2().

double m_StartingLife
 

Definition at line 74 of file ExCAction.h.

Referenced by ExManagerConsole::ApplyBuffCommand(), ExCAction(), ExManagerCommand::LoadExecFile(), and ExManagerCommand::ProcesExCAction().

std::vector<std::string> m_VecParam
 

Definition at line 68 of file ExCAction.h.

Referenced by GetNumberParam(), GetParamAsInt(), and SetParam().


The documentation for this class was generated from the following files:
Generated on Tue Dec 10 18:20:18 2002 for ExNihilo by doxygen1.3-rc1