globjects  1.0.0.000000000000
Strict OpenGL objects wrapper.
ChangeListener.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <set>
5 
6 #include <globjects/globjects_api.h>
7 
8 
9 namespace globjects
10 {
11 
12 
13 class Changeable;
14 
22 class GLOBJECTS_API ChangeListener
23 {
24  friend class Changeable;
25 public:
26  virtual ~ChangeListener();
27 
28  virtual void notifyChanged(const Changeable * sender);
29 
30 private:
31  std::set<Changeable*> m_subjects;
32 
33  void addSubject(Changeable * subject);
34  void removeSubject(Changeable * subject);
35 };
36 
37 
38 } // namespace globjects
Contains all the classes that wrap OpenGL functionality.
Allows listening to any Changeable.
Definition: ChangeListener.h:22
Superclass of all objects that want others to signal that they have changed.
Definition: Changeable.h:22