VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions
DtGlobalPlanManager Class Reference

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 Types

typedef boost::unordered_map
< DtUUID, DtVrfObject * > 
GlobalPlans

Public Member Functions

 DtGlobalPlanManager (DtSimManager *simManager)
 Basic constructor.
virtual ~DtGlobalPlanManager ()
 Destructor.
virtual bool init ()
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.
const GlobalPlansglobalPlans () const
 Accessor for the global plans currently in use on this back-end.
virtual void sendPlanList ()
 Sends a DtIfGlobalPlanList with the current plan names.
virtual void completeInitialization ()

Protected Member Functions

virtual void registerInterfaceMessageCallbacks ()
 Registers for any interface messages that the manager listens to.
virtual void objectAdded (DtVrfObject *object)
 See if this is a global plan object. If it is send out an updated list after addition.
virtual void objectAboutToBeRemoved (DtVrfObject *object)
 See if this is a global plan object. If it is send out an updated list after removal.
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 addOrUpdatePlan (DtPlan *aNewPlan)
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 void processLaunchGlobalPlan (DtSimMessage *msg)
 If global plan exists (and is local) and is not already in launch state, launch it.
virtual void setPlan (DtIfPlan *plan)
 Creates a new plan in the plan manager with the specified name, and with the specified statements passed in the statement list.
virtual void watchPlan (DtPlan *)
 If quick launch add statement change callback such that when plan is complete the list can be sent around with new status.
virtual void processPlanStatementChanged (const DtPlan &)

Static Protected Member Functions

static void requestPlanListCallback (DtSimMessage *msg, void *usr)
 Calls sendPlanList().
static void objectAddedCallback (DtVrfObject *object, void *usr)
static void objectAboutToBeRemovedCallback (DtVrfObject *object, void *usr)
static void setPlanCallback (DtSimMessage *msg, void *usr)
 Calls processSetPlan().
static void deletePlanCallback (DtSimMessage *msg, void *usr)
 Calls processDeletePlan().
static void launchGlobalPlanCallback (DtSimMessage *msg, void *usr)
 Calls processLaunchGlobalPlan().
static void planStatementChangedCallback (const DtPlan &, void *usr)

Protected Attributes

GlobalPlans myGlobalPlans
DtSimManagermySimManager
bool myReadingPlanFile

Private Member Functions

 DtGlobalPlanManager ()
 Not implemented.
 DtGlobalPlanManager (const DtGlobalPlanManager &orig)
 Not implemented.
DtGlobalPlanManageroperator= (const DtGlobalPlanManager &orig)
 Not implemented.

Detailed Description

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.

This class will not longer write out plan files as the plans will be associated with locally simulated global plan entities. It will read in old plan files and then create local entities based on the plan names for that plan

Member Typedef Documentation

typedef boost::unordered_map<DtUUID, DtVrfObject*> DtGlobalPlanManager::GlobalPlans

Constructor & Destructor Documentation

DtGlobalPlanManager::DtGlobalPlanManager ( DtSimManager simManager)

Basic constructor.

virtual DtGlobalPlanManager::~DtGlobalPlanManager ( )
virtual

Destructor.

DtGlobalPlanManager::DtGlobalPlanManager ( )
private

Not implemented.

DtGlobalPlanManager::DtGlobalPlanManager ( const DtGlobalPlanManager orig)
private

Not implemented.

Member Function Documentation

virtual bool DtGlobalPlanManager::init ( )
virtual
virtual bool DtGlobalPlanManager::readPlanFile ( const DtString filename)
virtual

Reads the global plan file to the specified name and replaces all current plans with plans from the file.

const GlobalPlans& DtGlobalPlanManager::globalPlans ( ) const
inline

Accessor for the global plans currently in use on this back-end.

virtual void DtGlobalPlanManager::sendPlanList ( )
virtual

Sends a DtIfGlobalPlanList with the current plan names.

virtual void DtGlobalPlanManager::completeInitialization ( )
virtual
virtual void DtGlobalPlanManager::registerInterfaceMessageCallbacks ( )
protectedvirtual

Registers for any interface messages that the manager listens to.

static void DtGlobalPlanManager::requestPlanListCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected
static void DtGlobalPlanManager::objectAddedCallback ( DtVrfObject object,
void *  usr 
)
staticprotected
virtual void DtGlobalPlanManager::objectAdded ( DtVrfObject object)
protectedvirtual

See if this is a global plan object. If it is send out an updated list after addition.

static void DtGlobalPlanManager::objectAboutToBeRemovedCallback ( DtVrfObject object,
void *  usr 
)
staticprotected
virtual void DtGlobalPlanManager::objectAboutToBeRemoved ( DtVrfObject object)
protectedvirtual

See if this is a global plan object. If it is send out an updated list after removal.

static void DtGlobalPlanManager::setPlanCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected
virtual void DtGlobalPlanManager::processSetPlan ( DtSimMessage msg)
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.

virtual void DtGlobalPlanManager::addOrUpdatePlan ( DtPlan aNewPlan)
protectedvirtual
static void DtGlobalPlanManager::deletePlanCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected
virtual void DtGlobalPlanManager::processDeletePlan ( DtSimMessage msg)
protectedvirtual

Looks up and removes any global plan that exists with the name specified in the delete plan message (DtIfDeletePlan).

static void DtGlobalPlanManager::launchGlobalPlanCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected
virtual void DtGlobalPlanManager::processLaunchGlobalPlan ( DtSimMessage msg)
protectedvirtual

If global plan exists (and is local) and is not already in launch state, launch it.

virtual void DtGlobalPlanManager::setPlan ( DtIfPlan plan)
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.

Parameters
statementListA list of DtSimStatement objects.
virtual void DtGlobalPlanManager::watchPlan ( DtPlan )
protectedvirtual

If quick launch add statement change callback such that when plan is complete the list can be sent around with new status.

static void DtGlobalPlanManager::planStatementChangedCallback ( const DtPlan ,
void *  usr 
)
staticprotected
virtual void DtGlobalPlanManager::processPlanStatementChanged ( const DtPlan )
protectedvirtual
DtGlobalPlanManager& DtGlobalPlanManager::operator= ( const DtGlobalPlanManager orig)
private

Not implemented.

Member Data Documentation

GlobalPlans DtGlobalPlanManager::myGlobalPlans
protected
DtSimManager* DtGlobalPlanManager::mySimManager
protected
bool DtGlobalPlanManager::myReadingPlanFile
protected

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

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)