OpenCOVER
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
15namespace vrui
16{
17
19class OPENVRUIEXPORT coUpdateable
20{
21public:
25 virtual ~coUpdateable();
32 virtual bool update() = 0;
33};
34
39//template class OPENVRUIEXPORT std::list<coUpdateable *>;
40
41class OPENVRUIEXPORT coUpdateManager
42{
43protected:
44 std::list<coUpdateable *> updateList;
45
46public:
49 void update();
50 void add(coUpdateable *, bool first = false);
52 void removeAll();
53};
54}
55#endif
collaborative interface manager
Definition: coVRCommunication.h:41
objects that are derived from this class are called once per frame
Definition: coUpdateManager.h:20
virtual ~coUpdateable()
Destructor.
virtual bool update()=0
coUpdateable()
Constructor.
Definition: coUpdateManager.h:42
coUpdateManager()
Constructor.
void remove(coUpdateable *)
remove an updateable object
std::list< coUpdateable * > updateList
list of updateable objects
Definition: coUpdateManager.h:44
~coUpdateManager()
Desctructor.
void update()
all objectpreFrame
void removeAll()
remove all updateable object
void add(coUpdateable *, bool first=false)
add an updateable object