00001 00013 #ifndef CCOMMANDEXECUTOR_H 00014 #define CCOMMANDEXECUTOR_H 00015 00016 00020 class CCommandExecutor 00021 { 00022 public: 00027 static CCommandExecutor* getInstance() 00028 { 00029 if (s_pInstance == NULL) 00030 { 00031 s_pInstance = new CCommandExecutor; 00032 } 00033 return s_pInstance; 00034 } 00035 00040 static void freeInstance() 00041 { 00042 if (s_pInstance) 00043 { 00044 delete s_pInstance; 00045 s_pInstance = NULL; 00046 } 00047 } 00048 00049 00054 void Execute(const CCommand& command, CRenderObj& surfaceobj) const; 00055 00056 private: 00057 00058 static const std::string 00059 s_HelpMessages[CCommand::PARAMETER_END+1]; 00065 CCommandExecutor() {} 00066 00067 00068 static CCommandExecutor* s_pInstance; 00075 static bool FileExist(const std::string& FileName); 00076 }; 00077 00078 #endif // CCOMMANDEXECUTOR_H 00079
1.5.4