Conscience Core
Bridging
EnvironmentInteractionCommands
FunctionCommandWrapper.h
Go to the documentation of this file.
1
#ifndef FunctionCommandWrapper_h
2
#define FunctionCommandWrapper_h
3
4
#include "
ArtificialIntelligence/CscEntityReflexion.h
"
5
#include "
ArtificialIntelligence/CscEntityReflexions.h
"
6
#include "
Bridging/EnvironmentInteractionCommands/Command.h
"
7
#include "
Bridging/EnvironmentInteractionCommands/Parser/CommandParser.h
"
8
#include "
Bridging/EnvironmentInteractionCommands/Parser/InvalidCommandException.h
"
9
#include "
Bridging/EnvironmentInteractionCommands/Result/CommandExecutionResult.h
"
10
11
namespace
conscience_core::bridging::commands
{
12
using
std::function;
13
14
typedef
function
<
const
CscCommandExecutionResult *(
CscEnvironmentSimulator
&environmentSimulator)>
FunctionCommand
;
15
19
class
CSC_DLL_IMPORTEXPORT
FunctionCommandWrapper
:
public
CscCommand
{
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 :
28
ptr<CscEntityReflexion>
entityReflexion
;
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
Generated by
1.8.17