Abstract base class for all simCommand executors.
More...
Protected Member Functions |
| virtual bool | execute (const DtSimCommand *command, const DtPlan *plan=0)=0 |
| | Perform the actual execution of the DtSimCommand.
|
| virtual bool | execute (const DtSimCommand *command, const DtUUID &objectName, const DtPlan *plan=0) |
| | Performs the actual executor of the DtSimCommand in the context of a specific entity.
|
| virtual void | distribute (const DtSimCommand *command, const DtPlan *plan=0) |
| | Calls on the sim command distributor to distribute the command to registered callback functions.
|
| virtual void | distribute (const DtSimCommand *command, const DtUUID &objectName, const DtPlan *plan=0) |
| | Calls on the sim command distributor to distribute the command to registered callback functions, providing the context of a specific entity.
|
Detailed Description
Abstract base class for all simCommand executors.
Every DtSimCommand should have a corresponding DtSimCommandExecutor subclass that implements the execution of that command.
- Examples
-
Constructor & Destructor Documentation
| DtSimCommandExecutor::DtSimCommandExecutor |
( |
DtSimManager * |
simManager | ) |
|
| virtual DtSimCommandExecutor::~DtSimCommandExecutor |
( |
| ) |
|
|
virtual |
| DtSimCommandExecutor::DtSimCommandExecutor |
( |
| ) |
|
|
private |
Member Function Documentation
| virtual bool DtSimCommandExecutor::executeAndDistribute |
( |
const DtSimCommand * |
command, |
|
|
const DtPlan * |
plan = 0 |
|
) |
| |
|
virtual |
Executes and then distributes the sim command by calling the execute and distribute functions in turn.
- Returns
- True if the execute command was successful.
| virtual bool DtSimCommandExecutor::executeAndDistribute |
( |
const DtSimCommand * |
command, |
|
|
const DtUUID & |
objectName, |
|
|
const DtPlan * |
plan = 0 |
|
) |
| |
|
virtual |
Executes and then distributes the sim command in the context of a specific entity by calling the execute and distribute functions in turn.
- Returns
- True if the execute command was successful.
Sets the static factory member.
Uses the static factory member to create a new executor of the specified type.
Perform the actual execution of the DtSimCommand.
Pure virtual function; must be overloaded by derived classes. This method executes the command in the global context. If the command should be executed differently when in the context of a specific entity (i.e. in that entity's plan), see execute() which takes an object name.
- Returns
- True if command was successfully carried out, false otherwise.
Implemented in DtSimCommandDistributionExecutor, DtDeleteObjectCommandExecutor, DtConsoleMessageCommandExecutor, DtCreateObjectCommandExecutor, DtAbandonPlanCommandExecutor, DtLaunchGlobalPlanCommandExecutor, DtNoopCommandExecutor, DtRestartPlanCommandExecutor, DtChangeHostilityCommandExecutor, DtChangeTimeOfDayCommandExecutor, DtIssuePlanCommandExecutor, DtScenarioEventCommandExecutor, DtChangeWeatherCommandExecutor, DtSetDataCommandExecutor, DtStealthCommandExecutor, DtTaskCommandExecutor, and MySimCommandExecutor.
| virtual void DtSimCommandExecutor::distribute |
( |
const DtSimCommand * |
command, |
|
|
const DtPlan * |
plan = 0 |
|
) |
| |
|
protectedvirtual |
Calls on the sim command distributor to distribute the command to registered callback functions.
| virtual void DtSimCommandExecutor::distribute |
( |
const DtSimCommand * |
command, |
|
|
const DtUUID & |
objectName, |
|
|
const DtPlan * |
plan = 0 |
|
) |
| |
|
protectedvirtual |
Calls on the sim command distributor to distribute the command to registered callback functions, providing the context of a specific entity.
The default implementation of this is to call distribute(command), and simply throw out the objectName. This method should be reimplemented by deriving classes if the command is executed differently when in in the context of an object. The default sim command distributor does not support specific entity contexts.
Member Data Documentation
The documentation for this class was generated from the following file: