OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
coUpdateManager.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef CO_UPDATE_MANAGER_H
9 #define CO_UPDATE_MANAGER_H
10 
11 #include <util/coTypes.h>
12 
13 #include <list>
14 
15 namespace vrui
16 {
17 
19 class OPENVRUIEXPORT coUpdateable
20 {
21 public:
22  coUpdateable();
23 
25  virtual ~coUpdateable();
26 
32  virtual bool update() = 0;
33 };
34 
39 //template class OPENVRUIEXPORT std::list<coUpdateable *>;
40 
41 class OPENVRUIEXPORT coUpdateManager
42 {
43 protected:
44  std::list<coUpdateable *> updateList;
45 
46 public:
47  coUpdateManager();
48  ~coUpdateManager();
49  void update();
50  void add(coUpdateable *, bool first = false);
51  void remove(coUpdateable *);
52  void removeAll();
53 };
54 }
55 #endif
std::list< coUpdateable * > updateList
list of updateable objects
Definition: coUpdateManager.h:44
Definition: coUpdateManager.h:41
objects that are derived from this class are called once per frame
Definition: coUpdateManager.h:19