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