![]() |
VR-Forces 4.0.4 Class Documentation
|
This singleton class keeps track of components that should be added to remote, non VR-Forces entities. More...
Public Types | |
| enum | EvaluationReadinessState { Remove = -1, NotReady = 0, Ready } |
| typedef std::map < DtGlobalObjectDesignatorKey, DtGlobalObjectDesignator > | RecentArrivalsMap |
| typedef RecentArrivalsMap::iterator | ArrivalIterator |
| typedef RecentArrivalsMap::const_iterator | const_ArrivalIterator |
Public Member Functions | |
| DtRemoteComponentAttachmentManager (DtVrfObjectManager *pObjMgr) | |
| Constructor. | |
| virtual | ~DtRemoteComponentAttachmentManager () |
| Destructor. | |
| virtual void | addRecentArrival (DtVrfObject *pVrfObj) |
| adds the global object designator to the list of recent arrivals | |
| virtual void | attach (const DtRemoteConfigurationMapEntry &entry, DtVrfObject &obj) |
| Arrange for component attachment through pMyRemoteConfigBuilder. | |
| virtual void | clear () |
| Purge all lists, return memory to the heap. | |
| virtual DtRemoteConfigurationMapper * | createAttachmentRules (const char *pReaderWriterName) |
| Create pMyAttachmentRules, override to instantiate derived type. | |
| virtual void | clearRecentArrivals () |
| Empty the recent arrivals list. | |
| virtual EvaluationReadinessState | checkReadinessCriteria (DtVrfObject &obj) |
| Inspect the the given object, determine if it's ready to be evaluated for attachment. | |
| virtual bool | checkRejectionCriteria (DtVrfObject &obj) |
| Inspect the given object, and perform exclusion checks to eliminate the object from consideration. | |
| virtual void | destroyAttachmentRules () |
| Calls clear(), deletes pMyAttachmentRules, sets to NULL. | |
| virtual void | evaluateAndAttach (DtVrfObject &obj) |
| Examine if remote component attachment should take place, and call attach(). | |
| virtual bool | initialize (const DtFilename &fromFile) |
| Purge the remote component attachment system, then reinitialize from the file. | |
| virtual void | resetAllReflectedObjectsToNonVrfSimulated () |
| For all confirmed attachments, reset VRF-simulated flag. | |
| virtual void | resetReflectedObjectToNonVrfSimulated (DtVrfObject *pVrfObj) |
| reset VRF-simulated flag. | |
| virtual void | tick () |
| Checks next scheduled tick, call doWork() | |
| DtVrfObjectManager * | vrfObjectManager () |
| Get/Set the tick interval for the attachment manager. | |
| const DtVrfObjectManager * | vrfObjectManager () const |
| virtual void | processVrfObjectToBeRemoved (DtVrfObject *pVrfObject) |
| Reset the reflected object back to non-vrf simulated, if it is listed in myConfirmedAttachments. | |
| virtual DtRemoteConfigurationMapper * | attachmentRules () |
| Return myAttachmentList, a list of attachment rules. | |
| virtual const DtRemoteConfigurationMapper * | attachmentRules () const |
| Return myAttachmentList, a list of attachment rules. | |
| DtRemoteComponentConfigurationBuilder::CreatorFcn | builderCreatorFcn () |
| Get/Set the DtRemoteComponentConfigurationBuilder factory function. | |
| void | setBuilderCreatorFcn (DtRemoteComponentConfigurationBuilder::CreatorFcn fcn) |
| Get/Set the DtRemoteComponentConfigurationBuilder factory function. | |
| virtual void | processRemoveFromArrivals (DtVrfObject *pVrfObj) |
| Removes this object from the recent arrivals queue. | |
| virtual void | processRemoveFromArrivals (const DtGlobalObjectDesignator &globalId) |
| Removes this object from the recent arrivals queue. | |
| DtTime | tickRate () const |
| Get/Set the tick interval for the attachment manager. | |
| void | setTickRate (DtTime interval) |
| Get/Set the tick interval for the attachment manager. | |
Static Public Member Functions | |
| static void | vrfObjectToBeRemovedCallback (DtVrfObject *pVrfObject, void *pUsr) |
| Registered with DtVrfObjectManager::addSimObjectAboutToBeRemovedCallback() to reset the reflected object back to non-vrf simulated. | |
Protected Member Functions | |
| DtRemoteComponentAttachmentManager () | |
| Default Constructor. Do not use. | |
| virtual void | doWork () |
| Walk the recent arrivals list, evaluating members against eligibility for attachment. | |
Protected Attributes | |
| RecentArrivalsMap | myConfirmedAttachments |
| keep track of what entities contain attachments | |
| DtTime | myNextTick |
| Next scheduled tick time. | |
| RecentArrivalsMap | myRecentArrivals |
| This list captures the IDs of newly discovered simulated things. | |
| DtRemoteComponentConfigurationBuilder * | pMyRemoteConfigBuilder |
| This helps parse configuration files and add components to remote entities. | |
| DtRemoteComponentConfigurationBuilder::CreatorFcn | myRemoteConfigBuilderCreatorFcn |
| This creator function is used by initialize() to create pMyRemoteConfigBuilder. | |
| DtGlobalObjectDesignatorKey | myWorkerKey |
| This is a worker key, to facilitate searching without requiring allocations. | |
| DtTime | myTickRate |
| Tick Rate, default 5.0 secs. | |
| DtVrfObjectManager * | pMyObjMgr |
| This is a pointer to the singleton's parent object. | |
| DtRemoteConfigurationMapper * | pMyAttachmentRules |
| The attachment list is a container of attachment rules. | |
Private Member Functions | |
| DtRemoteComponentAttachmentManager (DtRemoteComponentAttachmentManager &) | |
| unused, this is a singleton class | |
| const DtRemoteComponentAttachmentManager & | operator= (const DtRemoteComponentAttachmentManager &) |
This singleton class keeps track of components that should be added to remote, non VR-Forces entities.
| typedef std::map<DtGlobalObjectDesignatorKey,DtGlobalObjectDesignator> DtRemoteComponentAttachmentManager::RecentArrivalsMap |
| typedef RecentArrivalsMap::iterator DtRemoteComponentAttachmentManager::ArrivalIterator |
| typedef RecentArrivalsMap::const_iterator DtRemoteComponentAttachmentManager::const_ArrivalIterator |
Default Constructor. Do not use.
| DtRemoteComponentAttachmentManager::DtRemoteComponentAttachmentManager | ( | DtVrfObjectManager * | pObjMgr | ) |
Constructor.
| virtual DtRemoteComponentAttachmentManager::~DtRemoteComponentAttachmentManager | ( | ) | [virtual] |
Destructor.
| DtRemoteComponentAttachmentManager::DtRemoteComponentAttachmentManager | ( | DtRemoteComponentAttachmentManager & | ) | [private] |
unused, this is a singleton class
| virtual void DtRemoteComponentAttachmentManager::addRecentArrival | ( | DtVrfObject * | pVrfObj | ) | [virtual] |
adds the global object designator to the list of recent arrivals
| virtual void DtRemoteComponentAttachmentManager::attach | ( | const DtRemoteConfigurationMapEntry & | entry, |
| DtVrfObject & | obj | ||
| ) | [virtual] |
Arrange for component attachment through pMyRemoteConfigBuilder.
| virtual DtRemoteConfigurationMapper* DtRemoteComponentAttachmentManager::attachmentRules | ( | ) | [virtual] |
Return myAttachmentList, a list of attachment rules.
| virtual const DtRemoteConfigurationMapper* DtRemoteComponentAttachmentManager::attachmentRules | ( | ) | const [virtual] |
Return myAttachmentList, a list of attachment rules.
| DtRemoteComponentConfigurationBuilder::CreatorFcn DtRemoteComponentAttachmentManager::builderCreatorFcn | ( | ) | [inline] |
Get/Set the DtRemoteComponentConfigurationBuilder factory function.
References myRemoteConfigBuilderCreatorFcn.
| void DtRemoteComponentAttachmentManager::setBuilderCreatorFcn | ( | DtRemoteComponentConfigurationBuilder::CreatorFcn | fcn | ) | [inline] |
Get/Set the DtRemoteComponentConfigurationBuilder factory function.
References myRemoteConfigBuilderCreatorFcn.
| virtual void DtRemoteComponentAttachmentManager::clear | ( | ) | [virtual] |
Purge all lists, return memory to the heap.
This also calls clearRecentArrivals();
| virtual DtRemoteConfigurationMapper* DtRemoteComponentAttachmentManager::createAttachmentRules | ( | const char * | pReaderWriterName | ) | [virtual] |
Create pMyAttachmentRules, override to instantiate derived type.
Example name: "remote-configurations" This does not set pMyAttachmentRules. Rather this is called from initialize(), and initialize() assigns the results to pMyAttachmentRules. createAttachmentRules() will only be called if pMyAttachmentRules is NULL.
| virtual void DtRemoteComponentAttachmentManager::clearRecentArrivals | ( | ) | [virtual] |
Empty the recent arrivals list.
| virtual EvaluationReadinessState DtRemoteComponentAttachmentManager::checkReadinessCriteria | ( | DtVrfObject & | obj | ) | [virtual] |
Inspect the the given object, determine if it's ready to be evaluated for attachment.
Returns: Remove - this object shouldn't be evaluated, and should be removed. NotReady - there isn't enough information for evaluation. true - the object is ready to be evaluated for remote component attachment.
| virtual bool DtRemoteComponentAttachmentManager::checkRejectionCriteria | ( | DtVrfObject & | obj | ) | [virtual] |
Inspect the given object, and perform exclusion checks to eliminate the object from consideration.
This is called at the beginning of checkReadinessCriteria(). The base class rejects objects that are local to the simulation, and objects that are simulated by VR-Forces. Returns true to signal reject. Returns false to accept object for further evaluation.
| virtual void DtRemoteComponentAttachmentManager::destroyAttachmentRules | ( | ) | [virtual] |
Calls clear(), deletes pMyAttachmentRules, sets to NULL.
| virtual void DtRemoteComponentAttachmentManager::evaluateAndAttach | ( | DtVrfObject & | obj | ) | [virtual] |
Examine if remote component attachment should take place, and call attach().
The evaluation order is: entity identifier, marking text, object type.
| virtual bool DtRemoteComponentAttachmentManager::initialize | ( | const DtFilename & | fromFile | ) | [virtual] |
Purge the remote component attachment system, then reinitialize from the file.
| virtual void DtRemoteComponentAttachmentManager::processRemoveFromArrivals | ( | DtVrfObject * | pVrfObj | ) | [virtual] |
Removes this object from the recent arrivals queue.
| virtual void DtRemoteComponentAttachmentManager::processRemoveFromArrivals | ( | const DtGlobalObjectDesignator & | globalId | ) | [virtual] |
Removes this object from the recent arrivals queue.
| virtual void DtRemoteComponentAttachmentManager::resetAllReflectedObjectsToNonVrfSimulated | ( | ) | [virtual] |
For all confirmed attachments, reset VRF-simulated flag.
| virtual void DtRemoteComponentAttachmentManager::resetReflectedObjectToNonVrfSimulated | ( | DtVrfObject * | pVrfObj | ) | [virtual] |
reset VRF-simulated flag.
| virtual void DtRemoteComponentAttachmentManager::tick | ( | ) | [virtual] |
Checks next scheduled tick, call doWork()
| DtTime DtRemoteComponentAttachmentManager::tickRate | ( | ) | const [inline] |
Get/Set the tick interval for the attachment manager.
References myTickRate.
| void DtRemoteComponentAttachmentManager::setTickRate | ( | DtTime | interval | ) | [inline] |
Get/Set the tick interval for the attachment manager.
References myTickRate.
Get/Set the tick interval for the attachment manager.
References pMyObjMgr.
| const DtVrfObjectManager * DtRemoteComponentAttachmentManager::vrfObjectManager | ( | ) | const [inline] |
References pMyObjMgr.
| virtual void DtRemoteComponentAttachmentManager::processVrfObjectToBeRemoved | ( | DtVrfObject * | pVrfObject | ) | [virtual] |
Reset the reflected object back to non-vrf simulated, if it is listed in myConfirmedAttachments.
| static void DtRemoteComponentAttachmentManager::vrfObjectToBeRemovedCallback | ( | DtVrfObject * | pVrfObject, |
| void * | pUsr | ||
| ) | [static] |
Registered with DtVrfObjectManager::addSimObjectAboutToBeRemovedCallback() to reset the reflected object back to non-vrf simulated.
| virtual void DtRemoteComponentAttachmentManager::doWork | ( | ) | [protected, virtual] |
| const DtRemoteComponentAttachmentManager& DtRemoteComponentAttachmentManager::operator= | ( | const DtRemoteComponentAttachmentManager & | ) | [private] |
keep track of what entities contain attachments
DtTime DtRemoteComponentAttachmentManager::myNextTick [protected] |
Next scheduled tick time.
This list captures the IDs of newly discovered simulated things.
DtRemoteComponentConfigurationBuilder* DtRemoteComponentAttachmentManager::pMyRemoteConfigBuilder [protected] |
This helps parse configuration files and add components to remote entities.
The remote builder is used when objects are discovered, and an attachment entry exists for the object in pMyAttachmentRules. Call "setBuilderCreatorFcn()" to cause the Remote Attachment Manager to use a different kind of builder. DtMtlRemoteComponentConfigurationBuilder is use by default.
DtRemoteComponentConfigurationBuilder::CreatorFcn DtRemoteComponentAttachmentManager::myRemoteConfigBuilderCreatorFcn [protected] |
This creator function is used by initialize() to create pMyRemoteConfigBuilder.
By default, it is set to use DtMtlRemoteComponentConfigurationBuilder
Referenced by builderCreatorFcn(), and setBuilderCreatorFcn().
This is a worker key, to facilitate searching without requiring allocations.
DtTime DtRemoteComponentAttachmentManager::myTickRate [protected] |
Tick Rate, default 5.0 secs.
Referenced by setTickRate(), and tickRate().
This is a pointer to the singleton's parent object.
Referenced by vrfObjectManager().
The attachment list is a container of attachment rules.