27 #ifndef IMG_OBSERVABLE_H
28 #define IMG_OBSERVABLE_H
33 namespace ost {
namespace img {
43 typedef std::list<T *> ObserverList;
44 typedef typename ObserverList::iterator ObserverIter;
45 typedef typename ObserverList::const_iterator ObserverConstIter;
59 for(ObserverIter it=list_.begin();it!=list_.end();++it) {
60 (*it)->ObserverInvalidate();
61 (*it)->ObserverRelease();
82 for(ObserverConstIter it=list_.begin();it!=list_.end();++it)
83 (*it)->ObserverUpdate();
86 for(ObserverConstIter it=list_.begin();it!=list_.end();++it)
87 (*it)->ObserverUpdate(e);
90 for(ObserverConstIter it=list_.begin();it!=list_.end();++it)
91 (*it)->ObserverUpdate(p);
99 return sizeof(list_) + list_.size()*
sizeof(T*);