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

This singleton class keeps track of components that should be added to remote, non VR-Forces entities. More...

List of all members.

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()
DtVrfObjectManagervrfObjectManager ()
 Get/Set the tick interval for the attachment manager.
const DtVrfObjectManagervrfObjectManager () 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.
DtRemoteComponentConfigurationBuilderpMyRemoteConfigBuilder
 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.
DtVrfObjectManagerpMyObjMgr
 This is a pointer to the singleton's parent object.
DtRemoteConfigurationMapperpMyAttachmentRules
 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 &)

Detailed Description

This singleton class keeps track of components that should be added to remote, non VR-Forces entities.


Member Typedef Documentation

typedef RecentArrivalsMap::iterator DtRemoteComponentAttachmentManager::ArrivalIterator
typedef RecentArrivalsMap::const_iterator DtRemoteComponentAttachmentManager::const_ArrivalIterator

Member Enumeration Documentation

Enumerator:
Remove 
NotReady 
Ready 

Constructor & Destructor Documentation

Default Constructor. Do not use.

Constructor.

Destructor.

unused, this is a singleton class


Member Function Documentation

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.

Return myAttachmentList, a list of attachment rules.

Return myAttachmentList, a list of attachment rules.

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.

Empty the recent arrivals list.

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.

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.

Calls clear(), deletes pMyAttachmentRules, sets to NULL.

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.

Removes this object from the recent arrivals queue.

virtual void DtRemoteComponentAttachmentManager::processRemoveFromArrivals ( const DtGlobalObjectDesignator &  globalId) [virtual]

Removes this object from the recent arrivals queue.

For all confirmed attachments, reset VRF-simulated flag.

reset VRF-simulated flag.

virtual void DtRemoteComponentAttachmentManager::tick ( ) [virtual]

Checks next scheduled tick, call doWork()

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.

References pMyObjMgr.

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]

Walk the recent arrivals list, evaluating members against eligibility for attachment.

Called by tick() in order to do work. Override doWork() to extend or override the base class behavior.

const DtRemoteComponentAttachmentManager& DtRemoteComponentAttachmentManager::operator= ( const DtRemoteComponentAttachmentManager ) [private]

Member Data Documentation

keep track of what entities contain attachments

Next scheduled tick time.

This list captures the IDs of newly discovered simulated things.

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.

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.

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.


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)