Numworks Epsilon  1.4.1
Graphing Calculator Operating System
run_loop.h
Go to the documentation of this file.
1 #ifndef ESCHER_RUN_LOOP_H
2 #define ESCHER_RUN_LOOP_H
3 
4 #include <ion.h>
5 #include <escher/timer.h>
6 
7 class RunLoop {
8 public:
9  RunLoop();
10  void run();
11  void runWhile(bool (*callback)(void * ctx), void * ctx);
12 protected:
13  virtual bool dispatchEvent(Ion::Events::Event e) = 0;
14  virtual int numberOfTimers();
15  virtual Timer * timerAtIndex(int i);
16 private:
17  bool step();
18  int m_time;
19 };
20 
21 #endif
Definition: timer.h:15
virtual int numberOfTimers()
Definition: run_loop.cpp:11
void run()
Definition: run_loop.cpp:20
RunLoop()
Definition: run_loop.cpp:7
virtual Timer * timerAtIndex(int i)
Definition: run_loop.cpp:15
virtual bool dispatchEvent(Ion::Events::Event e)=0
void runWhile(bool(*callback)(void *ctx), void *ctx)
Definition: run_loop.cpp:24