ProgressSubjectMultiStep.h

Go to the documentation of this file.
00001 #ifndef PROGRESSSUBJECTMULTISTEP_H
00002 #define PROGRESSSUBJECTMULTISTEP_H
00003 
00011 #include <list>
00012 
00013 class ProgressObserverMultiStep;
00014 
00018 class ProgressSubjectMultiStep
00019 {
00020   public:
00021     virtual ~ProgressSubjectMultiStep() {}
00022 
00028     virtual void attach(ProgressObserverMultiStep *observer, int perStepFreq);
00029 
00034     virtual void detach(ProgressObserverMultiStep *observer);
00035 
00039     virtual int stepCount() const =0;
00040 
00044     virtual int currentStep() const =0;
00045     
00049     virtual int patchCount() const =0;
00050 
00054     virtual int currentPatch() const =0;
00055     
00056   protected:
00060     void notifyStep();
00061     
00067     void notifyPerStepProgress();
00068   
00069   private:
00070     struct TItem {
00071       int offset;
00072       int ratio;
00073       int last;
00074       ProgressObserverMultiStep *observer;
00075     };
00076     typedef std::list<TItem> TList;
00077     TList observerList_;
00078     friend class ObserverFinder;
00079 };
00080 
00081 #endif // PROGRESSSUBJECTMULTISTEP_H

Generated on Thu Dec 6 19:33:11 2007 for Radiosity Renderer and Visualizer by  doxygen 1.5.2