VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtAggregateModelResolutionController Class Reference

End User Description: This controller manages the switching of an aggregate between Aggregated (true aggregate) and disaggregated (pseudo aggregate) states. More...

Inheritance diagram for DtAggregateModelResolutionController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtAggregateModelResolutionController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=NULL, DtReaderWriterRegistry *parentRegistry=0)
 constructor
virtual ~DtAggregateModelResolutionController ()
 destructor
virtual bool init ()
 Calls createPSR()
virtual bool postAddComponentsInit ()
 Called after all components have been created, initialized and added to the component manager.
virtual DtString type () const
 This returns the string DtTrueAggregateResolutionControllerType (defined above), used to uniquely identify the type of component.
virtual void tick ()
 Update control values.
virtual bool createPSR ()
 Creates myProcessState data member, and adds it to our process state repository manager.
virtual void enable ()
 Override to (re)add set data request callbacks.
virtual void disable ()
 Override to remove set data request callbacks.
virtual bool tickWhileDestroyed () const
 This component needs to tick while destroyed (transitions between aggregate state may take place over mulitple ticks).
virtual void processSetRestore (DtSimMessage *msg)

Static Public Member Functions

static void setDestroyedCallback (DtSimMessage *msg, void *usrData)
static void setRestoreCallback (DtSimMessage *msg, void *usrData)
static void setAggregateStateCallback (DtSimMessage *msg, void *usrData)
static void disaggregationCompleteCallback (void *usr)
 Called when a Pseudo Aggregate is fully created and ready.
static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc, DtReaderWriterRegistry *parentRegistry)
 This is called by the factory.

Protected Member Functions

 DtAggregateModelResolutionController (const DtAggregateModelResolutionController &orig)
 copy constructor - not implemented
DtAggregateModelResolutionControlleroperator= (const DtAggregateModelResolutionController &orig)
 assignment operator - not implmented
virtual void setRadio (DtSimRadio *radio)
 Overrides this so it can register its interest in the set commands.
virtual void addSetDataCallbacks ()
 Add set data request callbacks.
void removeSetDataCallbacks ()
 Callbacks are removed when component is disabled or destroyed.
virtual void processSetAggregateState (DtSimMessage *msg)
virtual void startDisaggregation ()
 Start the transition from aggregated to disaggregated state.
virtual void startAggregation ()
 Start the transition from disaggregated to aggregated state.
virtual void onDisaggregationComplete ()
 Hook function called when disaggregation process is complete.
virtual bool toggleComponentsAndSystems (enum DtAggregateState newAggregateState)
 Hands over existing task (if one exists) handled by current state components to components in new state.
virtual void initAggregated ()
 Initialize an aggregated entity directly from the params.
void updateBoundingGeometry ()
 Update the aggregated entity's Bounding Geometry.
virtual void computeSubordinateObjectsMinMaxVectors (DtSubordinateObjectsList &subordinateObjectsList, DtVector positionOffset, DtVector &minVector, DtVector &maxVector)
 helper recursive function
virtual bool aggregationIsComplete () const
virtual void onAggregationComplete ()
 Hook function that gets called when an aggregation transition completes.
virtual void createAggregator ()
virtual void createDisaggregator ()
virtual bool allowedToTransition (DtAggregateState targetAggregateState) const
 Hook function for checking whether or not we are in a an allowable state for transition.
virtual void processSetDestroyed ()
void enableSystemsAndComponents (DtAggregateState aggregateState)
 Enable/disable all systems and components specific to a given DtAggregateState.
void disableSystemsAndComponents (DtAggregateState aggregateState)
 Enable/disable all systems and components specific to a given DtAggregateState.

Protected Attributes

DtVrfObjectManagermyObjectManager
DtAggregatedResolutionPSRmyProcessState
 Container for state data associated with this component.
DtVrfAggregateStateRepositorymyAggregateStateRepository
DtAggregateModelResolutionDescriptormyAggregateModelResolutionDescriptor
std::vector< DtComponentSystem * > myAggregatedSystemList
std::vector< DtSimComponent * > myAggregatedComponentList
std::vector< DtComponentSystem * > myDisaggregatedSystemList
std::vector< DtSimComponent * > myDisaggregatedComponentList
DtAggregatormyAggregator
DtDisaggregatormyDisaggregator
bool myFirstTick

Detailed Description

End User Description: This controller manages the switching of an aggregate between Aggregated (true aggregate) and disaggregated (pseudo aggregate) states.

This controller enables and disables other controllers on the DtVrfObject associated with each of these states. This controller also processes the set aggregate state message to trigger this process. Uses Descriptor Type: DtAggregateModelResolutionDescriptor


Constructor & Destructor Documentation

constructor

destructor

copy constructor - not implemented


Member Function Documentation

Calls createPSR()

Reimplemented from DtControllerComponent.

Called after all components have been created, initialized and added to the component manager.

Walk through lists of components/systems and enable/disable components depending on what mode we are in (aggregated versus disaggregated). The descriptor contains information identifying which systems/components are specific to aggregated state versus disaggregated state.

Reimplemented from DtSimComponent.

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

Reimplemented from DtControllerComponent.

virtual void DtAggregateModelResolutionController::tick ( ) [virtual]

Update control values.

Reimplemented from DtSimComponent.

Creates myProcessState data member, and adds it to our process state repository manager.

Passes in the name and type specified in the component descriptor (if they exist) to the DtVrfProcessStateRepository::createRepository factory method. If name and/or type is not specified, uses the appropriate default strings defined in procSRTypes.h.

Override to (re)add set data request callbacks.

Reimplemented from DtSimComponent.

Override to remove set data request callbacks.

Reimplemented from DtSimComponent.

This component needs to tick while destroyed (transitions between aggregate state may take place over mulitple ticks).

Returns:
true

Reimplemented from DtSimComponent.

static void DtAggregateModelResolutionController::setDestroyedCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static void DtAggregateModelResolutionController::setRestoreCallback ( DtSimMessage msg,
void *  usrData 
) [static]
static void DtAggregateModelResolutionController::setAggregateStateCallback ( DtSimMessage msg,
void *  usrData 
) [static]

Called when a Pseudo Aggregate is fully created and ready.

static DtSimComponent* DtAggregateModelResolutionController::creator ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc,
DtReaderWriterRegistry parentRegistry 
) [static]

This is called by the factory.

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

assignment operator - not implmented

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

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

Reimplemented from DtControllerComponent.

virtual void DtAggregateModelResolutionController::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 DtAggregateModelResolutionController::startDisaggregation ( ) [protected, virtual]

Start the transition from aggregated to disaggregated state.

Registers disaggregationCompleteCallback with organization manager for notification when disaggregation operation is complete.

virtual void DtAggregateModelResolutionController::startAggregation ( ) [protected, virtual]

Start the transition from disaggregated to aggregated state.

Hook function called when disaggregation process is complete.

virtual bool DtAggregateModelResolutionController::toggleComponentsAndSystems ( enum DtAggregateState  newAggregateState) [protected, virtual]

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

void DtAggregateModelResolutionController::enableSystemsAndComponents ( DtAggregateState  aggregateState) [protected]

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

void DtAggregateModelResolutionController::disableSystemsAndComponents ( DtAggregateState  aggregateState) [protected]

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

virtual void DtAggregateModelResolutionController::initAggregated ( ) [protected, virtual]

Initialize an aggregated entity directly from the params.

Update the aggregated entity's Bounding Geometry.

virtual void DtAggregateModelResolutionController::computeSubordinateObjectsMinMaxVectors ( DtSubordinateObjectsList subordinateObjectsList,
DtVector  positionOffset,
DtVector minVector,
DtVector maxVector 
) [protected, virtual]

helper recursive function

virtual bool DtAggregateModelResolutionController::aggregationIsComplete ( ) const [protected, virtual]
Returns:
true if aggregation process is complete (i.e. there are no more explicitly modeled subordinates).
virtual void DtAggregateModelResolutionController::onAggregationComplete ( ) [protected, virtual]

Hook function that gets called when an aggregation transition completes.

Updates the transition mode, aggregate state, and bounding geometry of the entity.

virtual void DtAggregateModelResolutionController::createAggregator ( ) [protected, virtual]
virtual void DtAggregateModelResolutionController::createDisaggregator ( ) [protected, virtual]
virtual bool DtAggregateModelResolutionController::allowedToTransition ( DtAggregateState  targetAggregateState) const [protected, virtual]

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

Rules governing transitions: Must be in DtNotTransitioningState Transitions from DtDisaggregate state are only allowed if entity is not embarked.

virtual void DtAggregateModelResolutionController::processSetDestroyed ( ) [protected, virtual]

Member Data Documentation

Container for state data associated with this component.

This state is saved and restored as part of a scenario (or checkpoint).


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)