Conscience Core
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
conscience_core::bridging::commands::FunctionCommandWrapper Class Reference

#include <FunctionCommandWrapper.h>

Inheritance diagram for conscience_core::bridging::commands::FunctionCommandWrapper:
conscience_core::bridging::commands::CscCommand

Public Member Functions

 FunctionCommandWrapper (ptr< CscEntityReflexion > entityReflexion, string commandId, FunctionCommand functionCommand, const string &originalCommandString, const vector< string > &originalCommandArguments)
 
const string & getOriginalCommandString () const
 
const vector< string > & getOriginalCommandArguments () const
 
- Public Member Functions inherited from conscience_core::bridging::commands::CscCommand
const CscCommandExecutionResult_execute (CscEnvironmentSimulator &environmentSimulator)
 
template<class TResult = CscCommandExecutionResult>
const TResult * execute (CscEnvironmentSimulator &environmentSimulator)
 
const CommandTypeIdgetTypeId () const
 
virtual ~CscCommand ()
 
void setOriginalCommandString (string command)
 

Protected Member Functions

ptr< CscEntityReflexiongetEntityReflexion () const override
 
const CscCommandExecutionResultdoExecute (CscEnvironmentSimulator &environmentSimulator) override
 
- Protected Member Functions inherited from conscience_core::bridging::commands::CscCommand
 CscCommand (const CommandTypeId &typeId)
 
const CscCommandExecutionResultNoneresultNone ()
 
const CscCommandExecutionResultSequenceresultSequence (CscSequence *sequence, const string &entitySerialNumber, bool doNotPlay=false)
 
const CscCommandExecutionResultFileresultFile (const fs::path &resultingFilePath)
 
template<class TResult >
const CscCommandExecutionResultObject< TResult > * resultObject (TResult *result)
 
const CscWorldElementId getEntityId () const
 

Protected Attributes

ptr< CscEntityReflexionentityReflexion
 
- Protected Attributes inherited from conscience_core::bridging::commands::CscCommand
const CommandTypeId typeId
 
optional< string > originalCommandString = {}
 

Additional Inherited Members

- Public Types inherited from conscience_core::bridging::commands::CscCommand
typedef function< void(CscCommand *command)> CommandExecutedListener
 
- Static Public Member Functions inherited from conscience_core::bridging::commands::CscCommand
static void addCommandExecutedListener (CommandExecutedListener listener)
 

Detailed Description

This class is used to wrap a FunctionCommand in order to normalize the returned type of commands

Constructor & Destructor Documentation

◆ FunctionCommandWrapper()

conscience_core::bridging::commands::FunctionCommandWrapper::FunctionCommandWrapper ( ptr< CscEntityReflexion entityReflexion,
string  commandId,
FunctionCommand  functionCommand,
const string &  originalCommandString,
const vector< string > &  originalCommandArguments 
)

Member Function Documentation

◆ doExecute()

const CscCommandExecutionResult * conscience_core::bridging::commands::FunctionCommandWrapper::doExecute ( CscEnvironmentSimulator environmentSimulator)
overrideprotectedvirtual

◆ getEntityReflexion()

ptr< CscEntityReflexion > conscience_core::bridging::commands::FunctionCommandWrapper::getEntityReflexion ( ) const
overrideprotectedvirtual

return entity reflexion if this command applies on an entityReflexion, otherwise return nullptr

Implements conscience_core::bridging::commands::CscCommand.

◆ getOriginalCommandArguments()

const vector< string > & conscience_core::bridging::commands::FunctionCommandWrapper::getOriginalCommandArguments ( ) const

◆ getOriginalCommandString()

const string & conscience_core::bridging::commands::FunctionCommandWrapper::getOriginalCommandString ( ) const

Member Data Documentation

◆ entityReflexion

ptr<CscEntityReflexion> conscience_core::bridging::commands::FunctionCommandWrapper::entityReflexion
protected

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