VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | 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...

Public Types

enum  EvaluationReadinessState { Remove = -1, NotReady = 0, Ready }
typedef std::set< DtUUIDRecentArrivalsMap
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 bool isRemoteComponentAttachment (const DtUUID &) const
 Returns true if the object is a remote component that is attached.
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 DtUUID &)
 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.
DtRwUUID 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

DtRemoteComponentAttachmentManager::DtRemoteComponentAttachmentManager ( )
protected

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

Member Function Documentation

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 bool DtRemoteComponentAttachmentManager::isRemoteComponentAttachment ( const DtUUID ) const
virtual

Returns true if the object is a remote component that is attached.

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
void DtRemoteComponentAttachmentManager::setBuilderCreatorFcn ( DtRemoteComponentConfigurationBuilder::CreatorFcn  fcn)
inline
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 DtUUID )
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.

DtVrfObjectManager * DtRemoteComponentAttachmentManager::vrfObjectManager ( )
inline

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

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

RecentArrivalsMap DtRemoteComponentAttachmentManager::myConfirmedAttachments
protected

keep track of what entities contain attachments

DtTime DtRemoteComponentAttachmentManager::myNextTick
protected

Next scheduled tick time.

RecentArrivalsMap DtRemoteComponentAttachmentManager::myRecentArrivals
protected

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().

DtRwUUID DtRemoteComponentAttachmentManager::myWorkerKey
protected

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().

DtVrfObjectManager* DtRemoteComponentAttachmentManager::pMyObjMgr
protected

This is a pointer to the singleton's parent object.

Referenced by vrfObjectManager().

DtRemoteConfigurationMapper* DtRemoteComponentAttachmentManager::pMyAttachmentRules
protected

The attachment list is a container of attachment rules.


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

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)