![]() |
VR-Link API Documentation for HLA Evolved
|
Instances of DtObserver are used to manage interest in other objects by this object. More...
Collaboration diagram for DtObserver:Public Member Functions | |
| DtObserver () | |
| default constructor More... | |
| virtual | ~DtObserver () |
| destructor Deregisters this object from observing any other objects. More... | |
| DtObserver (const DtObserver &orig) | |
| copy constructor Copies what the original is observing to this object. More... | |
| DtObserver & | operator= (const DtObserver &orig) |
| assignment operator Stops observing any objects which this object has seen. More... | |
| virtual bool | startObserving (DtObservee *toObserve) |
| Start observing another object from this object. More... | |
| virtual bool | stopObserving (DtObservee *observed) |
| Stop observing another object from this object. More... | |
| virtual bool | isBeingObserved (DtObservee *object) |
| Determine if object is being observed. More... | |
| virtual bool | notifyFromYourObserved (const DtObservee *observed, const DtObservee::DtWhyNotifyObserver &why) |
| Called by DtAbsNotifyObserver for notification from objects which this object is observing. More... | |
Protected Member Functions | |
| virtual bool | pendingDeleteOfYourObserved (const DtObservee *observed) |
| Called by notifyFromYourObserved when an observed object is pending deletion. More... | |
| virtual bool | deleteOfYourObserved (const DtObservee *observed) |
| Called by notifyFromYourObserved when an observed object is being deleted. More... | |
| virtual bool | removeObservedReference (const DtObservee *observed) |
| Remove reference to observed object which is being deleted. More... | |
| bool | internalStartObserving (DtObservee *toObserve) |
| Non-virtual members for calling from constructors/destructors. More... | |
| bool | internalStopObserving (DtObservee *observed) |
| Stop observing another object from this object. More... | |
Protected Attributes | |
| DtList | myObjectsAmObserving |
| List of DtObservee's which this object is observing. More... | |
| DtObserverNotifier | myNotifier |
| Used to get notification from objects this object is observing. More... | |
Instances of DtObserver are used to manage interest in other objects by this object.
This class works in conjunction with DtObservee, since without its cooperation, this observer cannot know when the watched object goes away.
Uses DtDECLARE_OBSERVER_NOTIFIER and DtDEFINE_OBSERVER_NOTIFIER to create a derived notifier class which knows how to communicate with this observer class which can observe DtObservee objects. A single instance of DtObserver can watch multiple instances of the DtObservee class.
| DtObserver::DtObserver | ( | ) |
default constructor
|
virtual |
destructor Deregisters this object from observing any other objects.
| DtObserver::DtObserver | ( | const DtObserver & | orig | ) |
copy constructor Copies what the original is observing to this object.
Does NOT copy what is observing the original to this object.
|
protectedvirtual |
Called by notifyFromYourObserved when an observed object is being deleted.
Observers must not examine the observed object as it is almost entirely deconstructed. Observers do not need to deregister themselves, but they should no longer try to observe the deleted object or reference it, i.e. they should remove it from their list of items they are observing. Default calls removeObservedReference();
|
protected |
Non-virtual members for calling from constructors/destructors.
Start observing another object from this object. Registers observation with the observed object. Returns false if already observing the object. Non-virtual, since meant to be used from constructors/destructors.
|
protected |
Stop observing another object from this object.
Deregisters observation with the observed object. Returns false if not already observing the object. Non-virtual, since meant to be used from constructors/destructors.
|
virtual |
Determine if object is being observed.
|
virtual |
Called by DtAbsNotifyObserver for notification from objects which this object is observing.
Returns false if the reason why was not handled.
| DtObserver& DtObserver::operator= | ( | const DtObserver & | orig | ) |
assignment operator Stops observing any objects which this object has seen.
Maintains what was observing this object. Copies what the original is observing to this object. Does NOT copy what is observing the original to this object.
|
protectedvirtual |
Called by notifyFromYourObserved when an observed object is pending deletion.
Observers may examine the observed object for any information one last time before the object is deleted. Observers do not need to deregister themselves, but they should no longer try to observe the deleted object or reference it, i.e. they should remove it from their list of items they are observing. Default calls removeObservedReference();
|
protectedvirtual |
Remove reference to observed object which is being deleted.
Should only be called upon notification of one of the deletion statuses. Returns whether observed was found and removed.
|
virtual |
Start observing another object from this object.
|
virtual |
Stop observing another object from this object.
|
protected |
Used to get notification from objects this object is observing.
|
protected |
List of DtObservee's which this object is observing.