gramods
Loading...
Searching...
No Matches
Updateable.hh
1
2#ifndef GRAMODS_CORE_UPDATEABLE
3#define GRAMODS_CORE_UPDATEABLE
4
5#include <gmCore/config.hh>
6
7#include <chrono>
8#include <memory>
9#include <optional>
10
11BEGIN_NAMESPACE_GMCORE;
12
19
20public:
21
22 typedef std::chrono::steady_clock clock;
23
31 Updateable(int priority = 0);
32
33 virtual ~Updateable();
34
38 static void updateAll(clock::time_point t = clock::now(),
39 std::optional<size_t> frame = std::nullopt);
40
44 virtual void update(clock::time_point t, size_t frame) = 0;
45
46private:
47
48 struct Impl;
49 Impl * _impl;
50
51};
52
53
54END_NAMESPACE_GMCORE;
55
56#endif
The Updateable class defines an interface for objects that may be updated, for example each execution...
Definition Updateable.hh:18
virtual void update(clock::time_point t, size_t frame)=0
Called by updateAll to make the object up-to-date.
Definition Updateable.cpp:9