Skip to content

Commit 2eb0dd0

Browse files
committed
Refactoring gone wrong.
1 parent 09ffdfc commit 2eb0dd0

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

include/react/EventStream.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#pragma once
22

3-
#include <vector>
43
#include <thread>
54
#include <type_traits>
5+
#include <vector>
66

77
#include "ReactiveBase.h"
88
#include "ReactiveDomain.h"

include/react/graph/ConversionNodes.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class FoldNode : public FoldBaseNode<D,S,E>
9797
virtual S calcNewValue() const override
9898
{
9999
S newValue = value_;
100-
for (const auto& e : events_->REvents())
100+
for (const auto& e : events_->Events())
101101
newValue = func_(newValue,e);
102102
return newValue;
103103
}
@@ -139,7 +139,7 @@ class IterateNode : public FoldBaseNode<D,S,E>
139139
virtual S calcNewValue() const override
140140
{
141141
S newValue = value_;
142-
for (const auto& e : events_->REvents())
142+
for (const auto& e : events_->Events())
143143
newValue = func_(newValue);
144144
return newValue;
145145
}
@@ -180,8 +180,8 @@ class HoldNode : public SignalNode<D,S>
180180

181181
D::Log().template Append<NodeEvaluateBeginEvent>(GetObjectId(*this), turn.Id(), std::this_thread::get_id().hash());
182182
S newValue = value_;
183-
if (! events_->REvents().empty())
184-
newValue = events_->REvents().back();
183+
if (! events_->Events().empty())
184+
newValue = events_->Events().back();
185185
D::Log().template Append<NodeEvaluateEndEvent>(GetObjectId(*this), turn.Id(), std::this_thread::get_id().hash());
186186

187187
if (newValue != value_)
@@ -244,7 +244,7 @@ class SnapshotNode : public SignalNode<D,S>
244244

245245
D::Log().template Append<NodeEvaluateBeginEvent>(GetObjectId(*this), turn.Id(), std::this_thread::get_id().hash());
246246
S newValue = value_;
247-
if (! trigger_->REvents().empty())
247+
if (! trigger_->Events().empty())
248248
newValue = target_->Value();
249249
D::Log().template Append<NodeEvaluateEndEvent>(GetObjectId(*this), turn.Id(), std::this_thread::get_id().hash());
250250

@@ -366,7 +366,7 @@ class PulseNode : public EventStreamNode<D,S>
366366
trigger_->SetCurrentTurn(turn);
367367

368368
D::Log().template Append<NodeEvaluateBeginEvent>(GetObjectId(*this), turn.Id(), std::this_thread::get_id().hash());
369-
for (const auto& e : trigger_->REvents())
369+
for (const auto& e : trigger_->Events())
370370
events_.push_back(target_->ValueRef());
371371
D::Log().template Append<NodeEvaluateEndEvent>(GetObjectId(*this), turn.Id(), std::this_thread::get_id().hash());
372372

@@ -445,7 +445,7 @@ class EventFlattenNode : public EventStreamNode<D, TInner>
445445
}
446446

447447
D::Log().template Append<NodeEvaluateBeginEvent>(GetObjectId(*this), turn.Id(), std::this_thread::get_id().hash());
448-
events_.insert(events_.end(), inner_->REvents().begin(), inner_->REvents().end());
448+
events_.insert(events_.end(), inner_->Events().begin(), inner_->Events().end());
449449
D::Log().template Append<NodeEvaluateEndEvent>(GetObjectId(*this), turn.Id(), std::this_thread::get_id().hash());
450450

451451
if (events_.size() > 0)

include/react/graph/EventStreamNodes.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class EventStreamNode : public ReactiveNode<D,E,void>
4646

4747
virtual const char* GetNodeType() const override { return "EventStreamNode"; }
4848

49-
EventListT& REvents()
49+
EventListT& Events()
5050
{
5151
return events_;
5252
}
@@ -63,7 +63,7 @@ class EventStreamNode : public ReactiveNode<D,E,void>
6363
}
6464
}
6565

66-
void ClearREvents() { events_.clear(); }
66+
void ClearEvents() { events_.clear(); }
6767

6868
const E& Front() { events_.front(); }
6969

@@ -206,7 +206,7 @@ class EventMergeNode : public EventStreamNode<D, E>
206206
{
207207
arg->SetCurrentTurn(turn);
208208

209-
events_.insert(events_.end(), arg->REvents().begin(), arg->REvents().end()); // TODO
209+
events_.insert(events_.end(), arg->Events().begin(), arg->Events().end()); // TODO
210210
}
211211
};
212212

@@ -249,7 +249,7 @@ class EventFilterNode : public EventStreamNode<D, E>
249249
SetCurrentTurn(turn, true);
250250

251251
D::Log().template Append<NodeEvaluateBeginEvent>(GetObjectId(*this), turn.Id(), std::this_thread::get_id().hash());
252-
std::copy_if(src_->REvents().begin(), src_->REvents().end(), std::back_inserter(events_), filter_);
252+
std::copy_if(src_->Events().begin(), src_->Events().end(), std::back_inserter(events_), filter_);
253253
D::Log().template Append<NodeEvaluateEndEvent>(GetObjectId(*this), turn.Id(), std::this_thread::get_id().hash());
254254

255255
if (events_.size() > 0)
@@ -312,7 +312,7 @@ class EventTransformNode : public EventStreamNode<D,TOut>
312312
SetCurrentTurn(turn, true);
313313

314314
D::Log().template Append<NodeEvaluateBeginEvent>(GetObjectId(*this), turn.Id(), std::this_thread::get_id().hash());
315-
std::transform(src_->REvents().begin(), src_->REvents().end(), std::back_inserter(events_), func_);
315+
std::transform(src_->Events().begin(), src_->Events().end(), std::back_inserter(events_), func_);
316316
D::Log().template Append<NodeEvaluateEndEvent>(GetObjectId(*this), turn.Id(), std::this_thread::get_id().hash());
317317

318318
if (events_.size() > 0)

include/react/graph/ObserverNodes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class EventObserverNode : public ObserverNode<D>
155155

156156
if (auto p = subject_.lock())
157157
{
158-
for (const auto& e : p->REvents())
158+
for (const auto& e : p->Events())
159159
func_(e);
160160
}
161161

0 commit comments

Comments
 (0)