![]() |
VR-Forces 4.3.1 Class Documentation
|
The global plan manager maintains the list of "Global Plans." These are plans that are not specific to an entity, but are run stand-alone on a sim engine, possibly creating and deleting entities during execution. More...
Public Member Functions | |
| DtGlobalPlanManager (DtSimManager *simManager) | |
| Basic constructor. | |
| virtual | ~DtGlobalPlanManager () |
| Destructor. | |
| virtual bool | init () |
| virtual void | tick () |
| virtual void | clearPlans () |
| Removes all plans from this plan manager. | |
| virtual void | writePlanFile (const DtString &filename) const |
| Saves all the current plans to the global plan file to the specified name. | |
| virtual bool | readPlanFile (const DtString &filename) |
| Reads the global plan file to the specified name and replaces all current plans with plans from the file. | |
| virtual void | enableExecutionState () |
| Sets the execution state of all plans in the manager. | |
| virtual void | disableExecutionState () |
| Sets the execution state of all plans in the manager. | |
Static Public Member Functions | |
| static void | tickCallback (void *args) |
Protected Types | |
| typedef std::map< DtString, DtPlan * > | DtPlanMap |
Protected Member Functions | |
| virtual void | registerInterfaceMessageCallbacks () |
| Registers for any interface messages that the manager listens to. | |
| virtual void | sendPlanList () |
| Sends a DtIfGlobalPlanList with the current plan names. | |
| virtual void | processRequestPlan (DtSimMessage *msg) |
| Sends a DtIfPlan message for the requested plan if it exists on this sim engine. | |
| virtual void | processSetPlan (DtSimMessage *msg) |
| If this message is applicable to this sim engine, and contains a global plan, this plan is added to the system. | |
| virtual void | setPlan (const DtString &name, const DtList &statementList) |
| Creates a new plan in the plan manager with the specified name, and with the specified statements passed in the statement list. | |
| virtual void | appendToPlan (const DtString &name, const DtList &statementList) |
| Appends the specified statements to the plan of the specified name. | |
| virtual void | processDeletePlan (DtSimMessage *msg) |
| Looks up and removes any global plan that exists with the name specified in the delete plan message (DtIfDeletePlan). | |
| virtual DtPlan * | makePlan (const DtString &name) const |
| Creates and returns a new DtPlan instance, configured with the plan manager's plan executor. | |
| virtual DtGlobalPlanExecutor * | createPlanExecutor () |
| virtual void | processCurrentStatementChanged (const DtPlan &plan) |
| Sends off a DtIfPlanCurStatement message indicating the current statement of this plan. | |
| void | deletePlans () |
| Removes all plans from the manager and deletes them. | |
Static Protected Member Functions | |
| static void | requestPlanListCallback (DtSimMessage *msg, void *usr) |
| Calls sendPlanList(). | |
| static void | requestPlanCallback (DtSimMessage *msg, void *usr) |
| Calls processRequestPlan(). | |
| static void | setPlanCallback (DtSimMessage *msg, void *usr) |
| Calls processSetPlan(). | |
| static void | deletePlanCallback (DtSimMessage *msg, void *usr) |
| Calls processDeletePlan(). | |
| static void | currentStatementChangedCallback (const DtPlan &plan, void *usrData) |
| Calls processCurrentStatementChanged(). | |
Protected Attributes | |
| DtSimManager * | mySimManager |
| DtPlanMap | myPlanMap |
| bool | myExecutionState |
| DtGlobalPlanExecutor * | myPlanExecutor |
Private Member Functions | |
| DtGlobalPlanManager () | |
| Not implemented. | |
| DtGlobalPlanManager (const DtGlobalPlanManager &orig) | |
| Not implemented. | |
| DtGlobalPlanManager & | operator= (const DtGlobalPlanManager &orig) |
| Not implemented. | |
The global plan manager maintains the list of "Global Plans." These are plans that are not specific to an entity, but are run stand-alone on a sim engine, possibly creating and deleting entities during execution.
|
protected |
| DtGlobalPlanManager::DtGlobalPlanManager | ( | DtSimManager * | simManager | ) |
Basic constructor.
|
virtual |
Destructor.
|
private |
Not implemented.
|
private |
Not implemented.
|
virtual |
|
virtual |
|
static |
|
virtual |
Sets the execution state of all plans in the manager.
Plans are only executed when the execution state is enabled.
|
virtual |
Sets the execution state of all plans in the manager.
Plans are only executed when the execution state is enabled.
|
virtual |
Removes all plans from this plan manager.
|
virtual |
Saves all the current plans to the global plan file to the specified name.
Reads the global plan file to the specified name and replaces all current plans with plans from the file.
|
protectedvirtual |
Registers for any interface messages that the manager listens to.
|
staticprotected |
Calls sendPlanList().
|
protectedvirtual |
Sends a DtIfGlobalPlanList with the current plan names.
|
staticprotected |
Calls processRequestPlan().
|
protectedvirtual |
Sends a DtIfPlan message for the requested plan if it exists on this sim engine.
Also adds a statement changed callback to the plan so that current statement messages will be sent out whenever the current statement changes for this plan.
|
staticprotected |
Calls processSetPlan().
|
protectedvirtual |
If this message is applicable to this sim engine, and contains a global plan, this plan is added to the system.
Any plan currently in the system with the same name will be replaced.
|
protectedvirtual |
Creates a new plan in the plan manager with the specified name, and with the specified statements passed in the statement list.
Any already existing plan with the same name will be replaced.
| statementList | A list of DtSimStatement objects. |
|
protectedvirtual |
Appends the specified statements to the plan of the specified name.
If no plan exists, a new one is created with the statements.
| statementList | A list of DtSimStatement objects. |
|
staticprotected |
Calls processDeletePlan().
|
protectedvirtual |
Looks up and removes any global plan that exists with the name specified in the delete plan message (DtIfDeletePlan).
Creates and returns a new DtPlan instance, configured with the plan manager's plan executor.
|
protectedvirtual |
|
staticprotected |
|
protectedvirtual |
Sends off a DtIfPlanCurStatement message indicating the current statement of this plan.
|
protected |
Removes all plans from the manager and deletes them.
Non-virtual since it is called from the destructor.
|
private |
Not implemented.
|
protected |
|
protected |
|
protected |
|
protected |