trigger.hpp
Go to the documentation of this file.
1 
6 #ifndef TRIGGER_HPP
7 #define TRIGGER_HPP 1
8 
9 #include "../two_dimensional/hdsim2d.hpp"
10 
12 class Trigger
13 {
14 public:
15 
20  virtual bool operator()(const hdsim& sim) = 0;
21 
23  virtual ~Trigger(void);
24 };
25 
28 {
29 public:
30 
35  ConstantTimeInterval(double dt, double t_next=0);
36 
37  bool operator()(const hdsim& sim);
38 
39 private:
40 
41  const double dt_;
42  mutable double t_next_;
43 };
44 
45 #endif // TRIGGER_HPP
virtual ~Trigger(void)
Class destructor.
Definition: trigger.cpp:3
Triggers at constant time intervals.
Definition: trigger.hpp:27
Newtonian hydrodynamic simulation.
Definition: hdsim2d.hpp:43
virtual bool operator()(const hdsim &sim)=0
Returns true if event happened.
Abstract class for triggering events.
Definition: trigger.hpp:12