VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtSystemSwitcherComponent Class Reference
Inheritance diagram for DtSystemSwitcherComponent:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtSystemSwitcherComponent (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=NULL, DtReaderWriterRegistry *parentRegistry=0)
 constructor
virtual ~DtSystemSwitcherComponent ()
 destructor
virtual bool init ()
 Calls createPSR(),set pointer to our base sim component network.
virtual DtString type () const
 This returns the string DtSystemSwitcherType (defined above), used to uniquely identify the type of component.
virtual void tick ()
 This gives the thread of control to the component.
virtual void enable ()
 Override to (re)add set data request callbacks.
virtual void disable ()
 Override to remove set data request callbacks.
virtual bool transitionIsComplete () const
virtual void onTransitionComplete ()

Static Public Member Functions

static void setSwitchSystemsCallback (DtSimMessage *msg, void *usrData)
static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc, DtReaderWriterRegistry *parentRegistry)
 This is called by the factory.

Protected Member Functions

 DtSystemSwitcherComponent (const DtSystemSwitcherComponent &orig)
 copy constructor - not implemented
DtSystemSwitcherComponentoperator= (const DtSystemSwitcherComponent &orig)
 assignment operator - not implmented
virtual void setRadio (DtSimRadio *radio)
 Overrides this so it can register its interest in the set commands.
virtual bool createPSR ()
virtual void addSetDataCallbacks ()
 Add set data request callbacks.
void removeSetDataCallbacks ()
 Callbacks are removed when component is disabled or destroyed.
virtual void processSetSwitchSystems (DtSimMessage *msg)
virtual bool switchSystems ()
 Hands over existing task (if one exists) handled by current state components to components in new state.
virtual bool allowedToTransition () const
 Hook function for checking whether or not we are in a an allowable state for transition.
void enableComponentSystem (DtComponentSystem *activateSystem)
 Enable/disable all systems and components specific to a given DtAggregateState.
void disableComponentSystem (DtComponentSystem *deactivateSystem)
 Enable/disable all systems and components specific to a given DtAggregateState.
void enableSimComponent (DtSimComponent *simComponent)
 Enable/disable all systems and components specific to a given DtAggregateState.
void disableSimComponent (DtSimComponent *simComponent)
 Enable/disable all systems and components specific to a given DtAggregateState.

Protected Attributes

DtSimComponentNetworkmyComponentNetwork
DtComponentSystemmySystemToDeactivate
DtComponentSystemmySystemToActivate
DtSwitchSystemComponentPSRmyProcessState
bool myFirstTick
bool mySwitchingSystems

Constructor & Destructor Documentation

DtSystemSwitcherComponent::DtSystemSwitcherComponent ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = NULL,
DtReaderWriterRegistry parentRegistry = 0 
)

constructor

destructor

copy constructor - not implemented


Member Function Documentation

virtual bool DtSystemSwitcherComponent::init ( ) [virtual]

Calls createPSR(),set pointer to our base sim component network.

Reimplemented from DtControllerComponent.

virtual DtString DtSystemSwitcherComponent::type ( ) const [virtual]

This returns the string DtSystemSwitcherType (defined above), used to uniquely identify the type of component.

Reimplemented from DtControllerComponent.

virtual void DtSystemSwitcherComponent::tick ( ) [virtual]

This gives the thread of control to the component.

The component is ticked once each simulation from by the component list it's on. This base class tick has no functionality.

Reimplemented from DtSimComponent.

virtual void DtSystemSwitcherComponent::enable ( ) [virtual]

Override to (re)add set data request callbacks.

This will allow this entity to switch systems.

Reimplemented from DtSimComponent.

virtual void DtSystemSwitcherComponent::disable ( ) [virtual]

Override to remove set data request callbacks.

This will disable this entity's ability to switch systems.

Reimplemented from DtSimComponent.

static void DtSystemSwitcherComponent::setSwitchSystemsCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static DtSimComponent* DtSystemSwitcherComponent::creator ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc,
DtReaderWriterRegistry parentRegistry 
) [static]

This is called by the factory.

DtSystemSwitcherComponent& DtSystemSwitcherComponent::operator= ( const DtSystemSwitcherComponent orig) [protected]

assignment operator - not implmented

virtual void DtSystemSwitcherComponent::setRadio ( DtSimRadio radio) [protected, virtual]

Overrides this so it can register its interest in the set commands.

Reimplemented from DtControllerComponent.

virtual bool DtSystemSwitcherComponent::createPSR ( ) [protected, virtual]
virtual void DtSystemSwitcherComponent::addSetDataCallbacks ( ) [protected, virtual]

Add set data request callbacks.

Set data request callbacks are added when component is first created, and whenever component is enabled.

Callbacks are removed when component is disabled or destroyed.

Non-virtual because it is called from the destructor.

virtual void DtSystemSwitcherComponent::processSetSwitchSystems ( DtSimMessage msg) [protected, virtual]
virtual bool DtSystemSwitcherComponent::switchSystems ( ) [protected, virtual]

Hands over existing task (if one exists) handled by current state components to components in new state.

Enable/disable all systems and components specific to a given DtAggregateState.

void DtSystemSwitcherComponent::disableComponentSystem ( DtComponentSystem deactivateSystem) [protected]

Enable/disable all systems and components specific to a given DtAggregateState.

void DtSystemSwitcherComponent::enableSimComponent ( DtSimComponent simComponent) [protected]

Enable/disable all systems and components specific to a given DtAggregateState.

void DtSystemSwitcherComponent::disableSimComponent ( DtSimComponent simComponent) [protected]

Enable/disable all systems and components specific to a given DtAggregateState.

virtual bool DtSystemSwitcherComponent::allowedToTransition ( ) const [protected, virtual]

Hook function for checking whether or not we are in a an allowable state for transition.

Currently just returns true.


Member Data Documentation


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)