5 #include "sabundvector.hpp"
7 #include "observable.h"
11 /***********************************************************************/
13 class SummaryData : public Observable {
16 SummaryData() : sabund(0) {};
18 void registerDisplay(Display* o) { displays.insert(o); };
19 void removeDisplay(Display* o) { displays.erase(o); delete o; };
20 SAbundVector* getSabundData() { return sabund; };
21 void sabundDataChanged() { notifyDisplays(); };
22 void updatesabundData(SAbundVector* rv) { sabund = rv; sabundDataChanged(); };
24 void notifyDisplays(){
25 for(set<Display*>::iterator pos=displays.begin();pos!=displays.end();pos++){
26 (*pos)->update(sabund);
31 set<Display*> displays;
36 /***********************************************************************/