Conscience Core
FunctionCommandWrapper.h
Go to the documentation of this file.
1 #ifndef FunctionCommandWrapper_h
2 #define FunctionCommandWrapper_h
3 
10 
12 using std::function;
13 
14 typedef function<const CscCommandExecutionResult *(CscEnvironmentSimulator &environmentSimulator)> FunctionCommand;
15 
20  public:
21  FunctionCommandWrapper(ptr<CscEntityReflexion> entityReflexion, string commandId, FunctionCommand functionCommand,
22  const string &originalCommandString, const vector<string> &originalCommandArguments);
23 
24  const string &getOriginalCommandString() const;
25  const vector<string> & getOriginalCommandArguments() const;
26 
27  protected :
29  ptr<CscEntityReflexion> getEntityReflexion() const override;
30  const CscCommandExecutionResult * doExecute(CscEnvironmentSimulator &environmentSimulator) override;
31 
32  private:
33  FunctionCommand functionCommand;
34 
35  const string originalCommandString;
36  const vector<string> originalCommandArguments;
37 };
38 }
39 #endif
40 
CSC_DLL_IMPORTEXPORT
#define CSC_DLL_IMPORTEXPORT
Definition: os.h:31
Command.h
conscience_core::bridging::commands::FunctionCommandWrapper::entityReflexion
ptr< CscEntityReflexion > entityReflexion
Definition: FunctionCommandWrapper.h:28
CommandParser.h
InvalidCommandException.h
CscEntityReflexion.h
CscEntityReflexions.h
conscience_core::bridging::commands
Definition: cartographyCommands.cpp:4
conscience_core::bridging::commands::CscCommand
Definition: Command.h:40
CommandExecutionResult.h
conscience_core::bridging::commands::result::CscCommandExecutionResult
Definition: CommandExecutionResult.h:44
conscience_core::bridging::commands::FunctionCommandWrapper
Definition: FunctionCommandWrapper.h:19
CscEnvironmentSimulator
Definition: CscEnvironmentSimulator.h:35
conscience_core::bridging::commands::FunctionCommand
function< const CscCommandExecutionResult *(CscEnvironmentSimulator &environmentSimulator)> FunctionCommand
Definition: Command.h:38
ptr
std::shared_ptr< T > ptr
Definition: CscCommon.h:29