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

The scenario event manager will keep track of all scenario event objects and their state. More...

Classes

struct  EventUpdateInformation
struct  ScenarioEventInformation
 Information that is really only needed to keep track of status of scenario events. More...

Public Types

typedef std::map< DtVrfObject
*, EventUpdateInformation
EventsThatNeedUpdate

Public Member Functions

 DtScenarioEventManager (DtSimManager *)
 CTOR.
virtual ~DtScenarioEventManager ()
 DTOR.
virtual DtSimManagersimManager () const
virtual bool isScenarioEvent (const DtVrfObject *o) const
 Returns true if this object is a scenario event (which includes intelligence objects)
virtual bool isScenarioEvent (const DtUUID &o) const
virtual void processScenarioEventMessageCallback (DtSimMessage *)
virtual void setScenarioEventEnabled (const DtUUID &, bool, bool sendMessageIfNotLocal=true)
 Disables/enables the scenario event.
virtual bool scenarioEventIsEnabled (const DtUUID &)
 Whether or not the scenario event is enabled.
virtual void startScenarioEvent (const DtUUID &, bool sendMessageIfNotLocal=true)
 Start the scenario event.
virtual void stopScenarioEvent (const DtUUID &, bool sendMessageIfNotLocal=true)
 Stops the scenario event.
virtual bool scenarioEventInProgress (const DtUUID &) const
 Returns true if scenario event is currently running.
virtual bool scenarioEventIsConcluded (const DtUUID &) const
 Returns true if scenario event is currently concluded.
virtual bool scenarioEventConcluded (const DtUUID &) const
 Returns true if the scenario event has been concluded.
virtual const DtRwScenarioEventscenarioEvent (const DtUUID &)
 Returns the scenario event for the current unique id.
virtual const DtRwScenarioEventscenarioEvent (const DtVrfObject *)
 Returns the scenario event for the supplied object (if exists)
virtual double simulationStartTime (const DtUUID &) const
 Returns the scenario time that the event started.
virtual double simulationEndTime (const DtUUID &) const
 Returns the scenario time that the event ended.
virtual void processScenarioEventAdded (DtVrfObject *)
virtual void processScenarioEventRemoved (DtVrfObject *)
virtual void setOrdinalOrder (const DtUUID &uniqueId, int ordinal)
 Sets the ordinal order for the given event if local. Does not change any other event ordinals.
virtual void resetScenarioEvent (const DtUUID &uniqueId, bool sendMessageIfNotLocal=true)
 If local, resets the scenario event to be ready to start again.
virtual void setTriggerStatus (const DtUUID &uniqueId, int)
 Sets the trigger status of the event if not already at that trigger status.
virtual void merge (DtScenarioEventManager *, const DtString &deconflictingName)
 Merges in scenario information from the specified manager.
const EventsThatNeedUpdateeventsThatNeedUpdate () const
virtual void addScenarioEventStartedCallback (DtScenarioEventManagerCallbackFcn fcn, void *usr)
 Callback that is invoked whenever a scenario event is started.
virtual void removeScenarioEventStartedCallback (DtScenarioEventManagerCallbackFcn fcn, void *usr)
virtual void addScenarioEventEnabledStateChangedCallback (DtScenarioEventManagerEnabledStateChangedCallbackFcn fcn, void *usr)
 Callback that is invoked whenever a scenario enabled state has changed.
virtual void removeScenarioEventEnabledStateChangedCallback (DtScenarioEventManagerEnabledStateChangedCallbackFcn fcn, void *usr)
virtual void addScenarioEventStoppedCallback (DtScenarioEventManagerCallbackFcn fcn, void *usr)
 Callback that is invoked whenever a scenario event is stopped.
virtual void removeScenarioEventStoppedCallback (DtScenarioEventManagerCallbackFcn fcn, void *usr)

Static Public Member Functions

static void scenarioEventMessageCallback (DtSimMessage *, void *usr)
 Processes scenario event operations.
static void scenarioEventAdded (DtVrfObject *, void *)
 Called when a scenario event is added via the object manager.
static void scenarioEventRemoved (DtVrfObject *, void *)
 Called when a scenario event is removed from the object manager.

Protected Types

typedef DtCallbackList< const
DtUUID & > 
ScenarioEventCallbacks
typedef DtCallbackList
< DtEnableStateChanged
ScenarioEventEnableStateChangedCallbacks
typedef std::map< DtUUID,
ScenarioEventInformation
ScenarioEvents
typedef std::map< DtUUID, DtUUIDObjectEvents

Protected Member Functions

virtual void startUpEvent (const DtUUID &uniqueId)
 Internally starts up the event and sends out started message as well as invoking started callbacks.
virtual void stopEvent (const DtUUID &uniqueId)
 Internally stops event and sends out stopped message as well as invoking stopped callbacks.
virtual void updateEnabledStatesLinkedTo (const DtUUID &)
 Updates the enabled states of any scenario events that are linked to the supplied scenario event, and sends out messages to update enabled states if the events are not local.
virtual DtUUID scenarioEventUUIDBasedOf (const DtUUID &) const
 If the supplied UUID is mapped to another UUID, return it.
virtual void processObjectModifiedViaMessage (DtVrfObject *o)
virtual bool isThisObjectLinkedToMe (const DtUUID &source, const DtUUID &dest) const
 Returns true if the event ID eventually links to the second event ID.

Static Protected Member Functions

static void vrfObjectModifiedViaMessageCallback (DtVrfObject *o, void *)

Protected Attributes

DtSimManagermySimManager
ScenarioEventCallbacks myScenarioEventStartedCallbacks
ScenarioEventCallbacks myScenarioEventStoppedCallbacks
ScenarioEventEnableStateChangedCallbacks myScenarioEventEnabledStateChangedCallbacks
ScenarioEvents myScenarioEvents
ObjectEvents myObjectEvents
EventsThatNeedUpdate myEventsThatNeedUpdate
int myMaxOrdinal

Private Member Functions

 DtScenarioEventManager (const DtScenarioEventManager &orig)
 copy constructor
DtScenarioEventManageroperator= (const DtScenarioEventManager &orig)
 assignment operator

Detailed Description

The scenario event manager will keep track of all scenario event objects and their state.

All calls to start/stop events must be done through this class. If not done through this class then event triggers will not fire

Member Typedef Documentation

typedef std::map<DtUUID, DtUUID> DtScenarioEventManager::ObjectEvents
protected

Constructor & Destructor Documentation

DtScenarioEventManager::DtScenarioEventManager ( DtSimManager )

CTOR.

virtual DtScenarioEventManager::~DtScenarioEventManager ( )
virtual

DTOR.

DtScenarioEventManager::DtScenarioEventManager ( const DtScenarioEventManager orig)
private

copy constructor

Member Function Documentation

DtScenarioEventManager& DtScenarioEventManager::operator= ( const DtScenarioEventManager orig)
private

assignment operator

virtual DtSimManager* DtScenarioEventManager::simManager ( ) const
virtual
virtual bool DtScenarioEventManager::isScenarioEvent ( const DtVrfObject o) const
virtual

Returns true if this object is a scenario event (which includes intelligence objects)

virtual bool DtScenarioEventManager::isScenarioEvent ( const DtUUID o) const
virtual
virtual void DtScenarioEventManager::addScenarioEventStartedCallback ( DtScenarioEventManagerCallbackFcn  fcn,
void *  usr 
)
virtual

Callback that is invoked whenever a scenario event is started.

virtual void DtScenarioEventManager::removeScenarioEventStartedCallback ( DtScenarioEventManagerCallbackFcn  fcn,
void *  usr 
)
virtual
virtual void DtScenarioEventManager::addScenarioEventEnabledStateChangedCallback ( DtScenarioEventManagerEnabledStateChangedCallbackFcn  fcn,
void *  usr 
)
virtual

Callback that is invoked whenever a scenario enabled state has changed.

virtual void DtScenarioEventManager::removeScenarioEventEnabledStateChangedCallback ( DtScenarioEventManagerEnabledStateChangedCallbackFcn  fcn,
void *  usr 
)
virtual
virtual void DtScenarioEventManager::addScenarioEventStoppedCallback ( DtScenarioEventManagerCallbackFcn  fcn,
void *  usr 
)
virtual

Callback that is invoked whenever a scenario event is stopped.

virtual void DtScenarioEventManager::removeScenarioEventStoppedCallback ( DtScenarioEventManagerCallbackFcn  fcn,
void *  usr 
)
virtual
static void DtScenarioEventManager::scenarioEventMessageCallback ( DtSimMessage ,
void *  usr 
)
static

Processes scenario event operations.

virtual void DtScenarioEventManager::processScenarioEventMessageCallback ( DtSimMessage )
virtual
virtual void DtScenarioEventManager::setScenarioEventEnabled ( const DtUUID ,
bool  ,
bool  sendMessageIfNotLocal = true 
)
virtual

Disables/enables the scenario event.

virtual bool DtScenarioEventManager::scenarioEventIsEnabled ( const DtUUID )
virtual

Whether or not the scenario event is enabled.

virtual void DtScenarioEventManager::startScenarioEvent ( const DtUUID ,
bool  sendMessageIfNotLocal = true 
)
virtual

Start the scenario event.

Will send a message to start if the event is not local or start it and send out started message if is. Supply scenario unique id

virtual void DtScenarioEventManager::stopScenarioEvent ( const DtUUID ,
bool  sendMessageIfNotLocal = true 
)
virtual

Stops the scenario event.

Will send a message to stop if the event is not local or stop it and send out stopped message if is. Supply scenario unique id

virtual bool DtScenarioEventManager::scenarioEventInProgress ( const DtUUID ) const
virtual

Returns true if scenario event is currently running.

virtual bool DtScenarioEventManager::scenarioEventIsConcluded ( const DtUUID ) const
virtual

Returns true if scenario event is currently concluded.

virtual bool DtScenarioEventManager::scenarioEventConcluded ( const DtUUID ) const
virtual

Returns true if the scenario event has been concluded.

virtual const DtRwScenarioEvent& DtScenarioEventManager::scenarioEvent ( const DtUUID )
virtual

Returns the scenario event for the current unique id.

virtual const DtRwScenarioEvent& DtScenarioEventManager::scenarioEvent ( const DtVrfObject )
virtual

Returns the scenario event for the supplied object (if exists)

virtual double DtScenarioEventManager::simulationStartTime ( const DtUUID ) const
virtual

Returns the scenario time that the event started.

virtual double DtScenarioEventManager::simulationEndTime ( const DtUUID ) const
virtual

Returns the scenario time that the event ended.

static void DtScenarioEventManager::scenarioEventAdded ( DtVrfObject ,
void *   
)
static

Called when a scenario event is added via the object manager.

virtual void DtScenarioEventManager::processScenarioEventAdded ( DtVrfObject )
virtual
static void DtScenarioEventManager::scenarioEventRemoved ( DtVrfObject ,
void *   
)
static

Called when a scenario event is removed from the object manager.

virtual void DtScenarioEventManager::processScenarioEventRemoved ( DtVrfObject )
virtual
virtual void DtScenarioEventManager::setOrdinalOrder ( const DtUUID uniqueId,
int  ordinal 
)
virtual

Sets the ordinal order for the given event if local. Does not change any other event ordinals.

virtual void DtScenarioEventManager::resetScenarioEvent ( const DtUUID uniqueId,
bool  sendMessageIfNotLocal = true 
)
virtual

If local, resets the scenario event to be ready to start again.

virtual void DtScenarioEventManager::setTriggerStatus ( const DtUUID uniqueId,
int   
)
virtual

Sets the trigger status of the event if not already at that trigger status.

virtual void DtScenarioEventManager::merge ( DtScenarioEventManager ,
const DtString deconflictingName 
)
virtual

Merges in scenario information from the specified manager.

const EventsThatNeedUpdate& DtScenarioEventManager::eventsThatNeedUpdate ( ) const
inline
virtual void DtScenarioEventManager::startUpEvent ( const DtUUID uniqueId)
protectedvirtual

Internally starts up the event and sends out started message as well as invoking started callbacks.

virtual void DtScenarioEventManager::stopEvent ( const DtUUID uniqueId)
protectedvirtual

Internally stops event and sends out stopped message as well as invoking stopped callbacks.

virtual void DtScenarioEventManager::updateEnabledStatesLinkedTo ( const DtUUID )
protectedvirtual

Updates the enabled states of any scenario events that are linked to the supplied scenario event, and sends out messages to update enabled states if the events are not local.

virtual DtUUID DtScenarioEventManager::scenarioEventUUIDBasedOf ( const DtUUID ) const
protectedvirtual

If the supplied UUID is mapped to another UUID, return it.

static void DtScenarioEventManager::vrfObjectModifiedViaMessageCallback ( DtVrfObject o,
void *   
)
staticprotected
virtual void DtScenarioEventManager::processObjectModifiedViaMessage ( DtVrfObject o)
protectedvirtual
virtual bool DtScenarioEventManager::isThisObjectLinkedToMe ( const DtUUID source,
const DtUUID dest 
) const
protectedvirtual

Returns true if the event ID eventually links to the second event ID.

Member Data Documentation

DtSimManager* DtScenarioEventManager::mySimManager
protected
ScenarioEventCallbacks DtScenarioEventManager::myScenarioEventStartedCallbacks
protected
ScenarioEventCallbacks DtScenarioEventManager::myScenarioEventStoppedCallbacks
protected
ScenarioEventEnableStateChangedCallbacks DtScenarioEventManager::myScenarioEventEnabledStateChangedCallbacks
protected
ScenarioEvents DtScenarioEventManager::myScenarioEvents
protected
ObjectEvents DtScenarioEventManager::myObjectEvents
protected
EventsThatNeedUpdate DtScenarioEventManager::myEventsThatNeedUpdate
protected
int DtScenarioEventManager::myMaxOrdinal
protected

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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)