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

Class DtDisaggregator is a helper class that knows how to transform an aggregate in the aggregate state (subordinates not explicitly modeled), into one that is in the disaggregate state (subordinates explicitly modeled as separate entities). More...

List of all members.

Public Member Functions

 DtDisaggregator (DtVrfObjectManager &vrfObjectManager)
 constructor
virtual ~DtDisaggregator ()
 destructor
virtual bool disaggregate (const DtVrfObject &aggregate, const DtSubordinateObjectsList &subordinateObjectsList, DtDisaggregationCompleteCallbackFcn completionCallback, void *userData)
 Transform aggregate from aggregate state to disaggregate state.

Static Public Member Functions

static void orgMgrChangeSetCompleteCallback (void *usr)

Protected Types

typedef std::pair
< DtDisaggregationCompleteCallbackFcn,
void * > 
DtDisaggregationCompleteCallbackInfoType

Protected Member Functions

virtual void createAndInitSubordinates (const DtVrfObject &parent)
 This is the main recursive function that utilizes the builder pattern it iterates through the list of subordinates creating the individual vrfObjects using the buildVrfObject() and adding a connection to a list using addSubordinateSuperiorConnection()
virtual void createAndInitSubordinates (const DtVrfObject &parent, const DtSubordinateObjectsList &subordinateObjectsList)
 DtDisaggregator (const DtDisaggregator &orig)
 Not Implemented.
DtDisaggregator & operator= (const DtDisaggregator &orig)
 Not Implemented.
virtual DtVrfObject * buildVrfObject (const DtObjectType &objectType, DtForceType forceType, const DtVector &geocentricPosition, const DtTaitBryan *orientation, bool publishLocalObject, bool createSubObjects, DtVrfObjectManager::DtAggregateCreationMode initialAggregateState, const DtString &formationName)
 Creates a new DtVrfObject of the given entity and force type.
virtual void setDisaggregationCompleteCallbackInfo (DtDisaggregationCompleteCallbackFcn fcn, void *usr)
virtual void clearDisaggregationCompleteCallbackInfo ()
virtual void onOrgMgrChangeSetComplete ()
virtual bool shouldCreate (const DtSubordinateEntry &subordinateDescriptor) const
virtual bool computeSubordinatePositions (int numSubordinates, const DtString &formationName, const DtAggregateObjectParameters &aggregateParams, const DtVector &parentPosition, const DtDcm &parentOrientation, std::list< DtVector > &subordinateBodyPositions) const
virtual int numSubordinatesToCreate (const DtSubordinateObjectsList &psrSubordObjList) const

Protected Attributes

DtVrfObjectManager & myVrfObjectManager
 Creator function to be registered with the DtDefaultVrfCreator from main.cxx static DtDisaggregator* creator(DtSimManager* simManager,.
DtOrganizationChangeSet myOrganizationChangeSet
int myChangeSetRequestId
DtDisaggregationCompleteCallbackInfoType myDisaggregationCompleteCallbackInfo

Detailed Description

Class DtDisaggregator is a helper class that knows how to transform an aggregate in the aggregate state (subordinates not explicitly modeled), into one that is in the disaggregate state (subordinates explicitly modeled as separate entities).

Note that it creates all subordinates at the location and heading of the aggregate.


Member Typedef Documentation


Constructor & Destructor Documentation

constructor

virtual DtDisaggregator::~DtDisaggregator ( ) [virtual]

destructor

DtDisaggregator::DtDisaggregator ( const DtDisaggregator &  orig) [protected]

Not Implemented.


Member Function Documentation

virtual bool DtDisaggregator::disaggregate ( const DtVrfObject &  aggregate,
const DtSubordinateObjectsList &  subordinateObjectsList,
DtDisaggregationCompleteCallbackFcn  completionCallback,
void *  userData 
) [virtual]

Transform aggregate from aggregate state to disaggregate state.

Parameters:
aggregateAggregate to be transformed.
subordinateObjectsListList containing details about subordinates to create.
completionCallbackCallback to be invoked upon completion of disaggregation operation (takes place over time).
userDataPointer to user data that will be supplied in above callback.
recurseIf true, recursively disaggregate to leaf level. Otherwise disaggregate immediate subordinates only.
Returns:
true if disaggregation is complete, false otherwise (will be notified in callback when its done).
static void DtDisaggregator::orgMgrChangeSetCompleteCallback ( void *  usr) [static]
virtual void DtDisaggregator::createAndInitSubordinates ( const DtVrfObject &  parent) [protected, virtual]

This is the main recursive function that utilizes the builder pattern it iterates through the list of subordinates creating the individual vrfObjects using the buildVrfObject() and adding a connection to a list using addSubordinateSuperiorConnection()

virtual void DtDisaggregator::createAndInitSubordinates ( const DtVrfObject &  parent,
const DtSubordinateObjectsList &  subordinateObjectsList 
) [protected, virtual]
DtDisaggregator& DtDisaggregator::operator= ( const DtDisaggregator &  orig) [protected]

Not Implemented.

virtual DtVrfObject* DtDisaggregator::buildVrfObject ( const DtObjectType &  objectType,
DtForceType  forceType,
const DtVector &  geocentricPosition,
const DtTaitBryan *  orientation,
bool  publishLocalObject,
bool  createSubObjects,
DtVrfObjectManager::DtAggregateCreationMode  initialAggregateState,
const DtString &  formationName 
) [protected, virtual]

Creates a new DtVrfObject of the given entity and force type.

Parameters:
objectTypeType of entity to create
forceTypeDIS/RPR force type of entity to create
geocentricPositionInitial position, in geocentric coordinates
orientationInitial orientation, expressed as a Tait-Bryan sequence of Euler angles, in radians
publishLocalObjectFlag indicating whether or not entity should be published on the network
createSubObjectsFlag indicating whether or not to create subordinate entities
formationNamename of formation to apply (if object is aggregate). formation names are defined in formType.h
initialaggregate state (DtAggregated or DtDisaggregated)
Returns:
Newly created instance of a DtVrfObject.
virtual void DtDisaggregator::setDisaggregationCompleteCallbackInfo ( DtDisaggregationCompleteCallbackFcn  fcn,
void *  usr 
) [protected, virtual]
virtual void DtDisaggregator::clearDisaggregationCompleteCallbackInfo ( ) [protected, virtual]
virtual void DtDisaggregator::onOrgMgrChangeSetComplete ( ) [protected, virtual]
virtual bool DtDisaggregator::shouldCreate ( const DtSubordinateEntry &  subordinateDescriptor) const [protected, virtual]
virtual bool DtDisaggregator::computeSubordinatePositions ( int  numSubordinates,
const DtString &  formationName,
const DtAggregateObjectParameters &  aggregateParams,
const DtVector &  parentPosition,
const DtDcm &  parentOrientation,
std::list< DtVector > &  subordinateBodyPositions 
) const [protected, virtual]
virtual int DtDisaggregator::numSubordinatesToCreate ( const DtSubordinateObjectsList &  psrSubordObjList) const [protected, virtual]

Member Data Documentation

Creator function to be registered with the DtDefaultVrfCreator from main.cxx static DtDisaggregator* creator(DtSimManager* simManager,.


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)