VR-Link API Documentation for DIS
vlObservee.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 
00011 #include "vlList.h"
00012 #include "vlMachineTypes.h"
00013 
00014 #ifdef DtUSE_UTILITIES_NAMESPACE
00015 namespace DtUSE_UTILITIES_NAMESPACE
00016 {
00017 #endif
00018 
00019 class DT_DLL_VLUTIL DtAbsNotifyObserver;
00020 
00039 class DT_DLL_VLUTIL DtObservee
00040 {
00041 public:
00042 
00045    enum DtWhyNotifyObserver
00046    {
00057       DtPendingDeleteOfYourObserved,
00058 
00070       DtDeleteOfYourObserved
00071    };
00072 
00073 public:
00074 
00076    DtObservee();
00077 
00096    virtual ~DtObservee();
00097 
00100    DtObservee(const DtObservee& orig);
00101 
00104    DtObservee& operator=(const DtObservee& orig);
00105 
00108    virtual bool registerObservedBy(DtAbsNotifyObserver* observer);
00109 
00112    virtual bool deRegisterObservedBy(DtAbsNotifyObserver* observer);
00113 
00116    virtual void notifyAllObservers(const DtWhyNotifyObserver& why);
00117 
00118 public:
00119 
00123    static void destroy(DtObservee* object);
00124 
00125 protected:
00126 
00129    void internalNotifyAllObservers(const DtWhyNotifyObserver& why);
00130 
00131 protected:
00132 
00135    DtList myObservedByNotifiers;
00136    bool myNotifiedPendingDelete;
00137 };
00138 
00139 #ifdef DtUSE_UTILITIES_NAMESPACE
00140 } 
00141 #endif
00142 
00143 

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)