aboutsummaryrefslogtreecommitdiff
path: root/src/Subject.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/Subject.hh')
-rw-r--r--src/Subject.hh28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/Subject.hh b/src/Subject.hh
index 95c64f2..08ad15c 100644
--- a/src/Subject.hh
+++ b/src/Subject.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Subject.hh,v 1.1 2002/09/07 20:30:45 fluxgen Exp $ 22// $Id: Subject.hh,v 1.2 2002/12/01 13:42:00 rathnor Exp $
23 23
24#ifndef FBTK_SUBJECT_HH 24#ifndef FBTK_SUBJECT_HH
25#define FBTK_SUBJECT_HH 25#define FBTK_SUBJECT_HH
@@ -32,21 +32,21 @@ class Observer;
32 32
33class Subject { 33class Subject {
34public: 34public:
35 Subject(); 35 Subject();
36 virtual ~Subject(); 36 virtual ~Subject();
37 /// attach an observer 37 /// attach an observer
38 void attach(Observer *obs); 38 void attach(Observer *obs);
39 /// detach an observer 39 /// detach an observer
40 void detach(Observer *obs); 40 void detach(Observer *obs);
41 /// notify all attached observers 41 /// notify all attached observers
42 void notify(); 42 void notify();
43 static void removeObserver(Observer *obs); 43 static void removeObserver(Observer *obs);
44private: 44private:
45 typedef std::vector<Observer *> ObserverList; 45 typedef std::vector<Observer *> ObserverList;
46 ObserverList m_observerlist; 46 ObserverList m_observerlist;
47 47
48 typedef std::vector<Subject *> SubjectList; 48 typedef std::vector<Subject *> SubjectList;
49 static SubjectList s_subjectlist; 49 static SubjectList s_subjectlist;
50}; 50};
51 51
52}; // end namespace FbTk 52}; // end namespace FbTk