VR-Forces 4.1.1 Class Documentation
List of all members | 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...

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.
DtDisaggregatoroperator= (const DtDisaggregator &orig)
 Not Implemented.
virtual DtVrfObjectbuildVrfObject (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

DtVrfObjectManagermyVrfObjectManager
 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

DtDisaggregator::DtDisaggregator ( DtVrfObjectManager vrfObjectManager)

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)
protectedvirtual

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 
)
protectedvirtual
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 
)
protectedvirtual

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 
)
protectedvirtual
virtual void DtDisaggregator::clearDisaggregationCompleteCallbackInfo ( )
protectedvirtual
virtual void DtDisaggregator::onOrgMgrChangeSetComplete ( )
protectedvirtual
virtual bool DtDisaggregator::shouldCreate ( const DtSubordinateEntry subordinateDescriptor) const
protectedvirtual
virtual bool DtDisaggregator::computeSubordinatePositions ( int  numSubordinates,
const DtString formationName,
const DtAggregateObjectParameters aggregateParams,
const DtVector parentPosition,
const DtDcm &  parentOrientation,
std::list< DtVector > &  subordinateBodyPositions 
) const
protectedvirtual
virtual int DtDisaggregator::numSubordinatesToCreate ( const DtSubordinateObjectsList psrSubordObjList) const
protectedvirtual

Member Data Documentation

DtVrfObjectManager& DtDisaggregator::myVrfObjectManager
protected

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

DtOrganizationChangeSet DtDisaggregator::myOrganizationChangeSet
protected
int DtDisaggregator::myChangeSetRequestId
protected
DtDisaggregationCompleteCallbackInfoType DtDisaggregator::myDisaggregationCompleteCallbackInfo
protected

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

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)