File tree Expand file tree Collapse file tree 2 files changed +18
-15
lines changed Expand file tree Collapse file tree 2 files changed +18
-15
lines changed Original file line number Diff line number Diff line change @@ -103,21 +103,7 @@ namespace dynamicgraph {
103
103
typedef SignalBase<int >* Trigger_t;
104
104
typedef std::vector<Trigger_t> Triggers_t;
105
105
106
- bool & check (bool & ret, const int & time)
107
- {
108
- const bool & val = conditionSIN (time);
109
- ret = (val != lastVal_);
110
- bool trigger = onlyUp_ ? (!lastVal_ && val) : ret;
111
- if (ret) {
112
- lastVal_ = val;
113
- if (trigger) {
114
- for (Triggers_t::const_iterator _s = triggers.begin ();
115
- _s != triggers.end (); ++_s)
116
- (*_s)->recompute (time);
117
- }
118
- }
119
- return ret;
120
- }
106
+ bool & check (bool & ret, const int & time);
121
107
122
108
Signal <bool , int > checkSOUT;
123
109
Original file line number Diff line number Diff line change 20
20
21
21
namespace dynamicgraph {
22
22
namespace sot {
23
+
24
+ bool & Event::check (bool & ret, const int & time)
25
+ {
26
+ const bool & val = conditionSIN (time);
27
+ ret = (val != lastVal_);
28
+ bool trigger = onlyUp_ ? (!lastVal_ && val) : ret;
29
+ if (ret) {
30
+ lastVal_ = val;
31
+ if (trigger) {
32
+ for (Triggers_t::const_iterator _s = triggers.begin ();
33
+ _s != triggers.end (); ++_s)
34
+ (*_s)->recompute (time);
35
+ }
36
+ }
37
+ return ret;
38
+ }
39
+
23
40
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN (Event, " Event" );
24
41
} // namespace sot
25
42
} // namespace dynamicgraph
You can’t perform that action at this time.
0 commit comments