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

#include <CustomCommandTemplate.h>

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

Public Member Functions

 CustomCommandTemplate (ptr< CscEntityReflexion > entityReflexion, const string &param2, bool param3)
 
- 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)
 

Static Public Attributes

static const CommandTypeId COMMAND_ID = "CUSTOM_COMMAND_TEMPLATE"
 

Protected Member Functions

const CscCommandExecutionResultStringdoExecute (CscEnvironmentSimulator &environmentSimulator) override
 
ptr< CscEntityReflexiongetEntityReflexion () const 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
 
const string param2
 
const bool param3
 
std::unique_ptr< CscLoggerlogger = CscLogger::getForCategory("CustomCommandTemplate")
 
- 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

Description of your command..

Constructor & Destructor Documentation

◆ CustomCommandTemplate()

conscience_core::bridging::commands::CustomCommandTemplate::CustomCommandTemplate ( ptr< CscEntityReflexion entityReflexion,
const string &  param2,
bool  param3 
)

You can use following types for params

  • primitives: string, int, long, unsigned long long, float double, bool
  • vector: vector of any type listed here
  • map: map having int or string keys, and values of any type listed here
  • optional: optional of any type listed here
  • object: ptr<YourNameCommandDataType> a pointer to a simple type (struct or class), with parameters defined by constructor having the most args

Member Function Documentation

◆ doExecute()

const CscCommandExecutionResultString * conscience_core::bridging::commands::CustomCommandTemplate::doExecute ( CscEnvironmentSimulator environmentSimulator)
overrideprotectedvirtual

◆ getEntityReflexion()

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

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

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

Member Data Documentation

◆ COMMAND_ID

const CommandTypeId conscience_core::bridging::commands::CustomCommandTemplate::COMMAND_ID = "CUSTOM_COMMAND_TEMPLATE"
inlinestatic

◆ entityReflexion

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

◆ logger

std::unique_ptr<CscLogger> conscience_core::bridging::commands::CustomCommandTemplate::logger = CscLogger::getForCategory("CustomCommandTemplate")
protected

◆ param2

const string conscience_core::bridging::commands::CustomCommandTemplate::param2
protected

◆ param3

const bool conscience_core::bridging::commands::CustomCommandTemplate::param3
protected

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