VR-Link API Documentation for DIS
vlObserver.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 *******************************************************************************/
00008 #pragma once
00009 
00010 #include "vlList.h"
00011 #include "vlMachineTypes.h"
00012 #include "vlDeclNotifier.h"
00013 
00014 #ifdef DtUSE_UTILITIES_NAMESPACE
00015 namespace DtUSE_UTILITIES_NAMESPACE
00016 {
00017 #endif
00018 
00019 class DT_DLL_VLUTIL DtAbsNotifyObserver;
00020 class DT_DLL_VLUTIL DtObserver;
00021 
00022 DtDECLARE_OBSERVER_NOTIFIER(DtObserver)
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 class DT_DLL_VLUTIL DtObserver
00037 {
00038 public:
00039 
00041    DtObserver();
00042 
00045    virtual ~DtObserver();
00046 
00050    DtObserver(const DtObserver& orig);
00051 
00057    DtObserver& operator=(const DtObserver& orig);
00058 
00060    virtual bool startObserving(DtObservee* toObserve);
00061 
00063    virtual bool stopObserving(DtObservee* observed);
00064 
00066    virtual bool isBeingObserved(DtObservee* object);
00067 
00071    virtual bool notifyFromYourObserved(
00072       const DtObservee* observed, 
00073       const DtObservee::DtWhyNotifyObserver& why);
00074 
00075 protected:
00076 
00084    virtual bool pendingDeleteOfYourObserved(const DtObservee* observed);
00085 
00093    virtual bool deleteOfYourObserved(const DtObservee* observed);
00094 
00099    virtual bool removeObservedReference(const DtObservee* observed);
00100 
00104 
00109    bool internalStartObserving(DtObservee* toObserve);
00110 
00115    bool internalStopObserving(DtObservee* observed);
00116 
00117 protected:
00118 
00120    DtList myObjectsAmObserving;
00121 
00123    DtObserverNotifier myNotifier;
00124 };
00125 
00126 #ifdef DtUSE_UTILITIES_NAMESPACE
00127 } 
00128 #endif
00129 
00130 

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)