Skip to content

Commit b7ec9da

Browse files
committed
done getting rid of unique/shared wrapper types. everything is shared by default now.
1 parent 6ce4440 commit b7ec9da

11 files changed

Lines changed: 99 additions & 99 deletions

File tree

‎examples/src/BasicAlgorithms.cpp‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace example1
2222
using namespace std;
2323
using namespace react;
2424

25-
ReactiveGroup<> group;
25+
ReactiveGroup group;
2626

2727
struct Sensor
2828
{
@@ -36,7 +36,7 @@ namespace example1
3636

3737
Sensor mySensor;
3838

39-
Observer<> obs(
39+
Observer obs(
4040
[] (int v)
4141
{
4242
cout << v << endl;
@@ -62,7 +62,7 @@ namespace example2
6262
using namespace std;
6363
using namespace react;
6464

65-
ReactiveGroup<> group;
65+
ReactiveGroup group;
6666

6767
struct Employee
6868
{
@@ -76,7 +76,7 @@ namespace example2
7676

7777
Employee bob;
7878

79-
Observer<> obs(
79+
Observer obs(
8080
[] (EventRange<int> in, const string& name)
8181
{
8282
for (int newSalary : in)
@@ -96,7 +96,7 @@ namespace example3
9696
using namespace std;
9797
using namespace react;
9898

99-
ReactiveGroup<> group;
99+
ReactiveGroup group;
100100

101101
struct Counter
102102
{
@@ -137,7 +137,7 @@ namespace example4
137137
using namespace std;
138138
using namespace react;
139139

140-
ReactiveGroup<> group;
140+
ReactiveGroup group;
141141

142142
struct Sensor
143143
{
@@ -188,7 +188,7 @@ namespace example5
188188
using namespace std;
189189
using namespace react;
190190

191-
ReactiveGroup<> group;
191+
ReactiveGroup group;
192192

193193
enum ECmd { increment, decrement, reset };
194194

@@ -255,7 +255,7 @@ namespace example6
255255
using namespace std;
256256
using namespace react;
257257

258-
ReactiveGroup<> group;
258+
ReactiveGroup group;
259259

260260
class Sensor
261261
{

‎examples/src/BasicEvents.cpp‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace example1
2222
// Defines a group.
2323
// Each group represents a separate dependency graph.
2424
// Reactives from different groups can not be mixed.
25-
ReactiveGroup<> group;
25+
ReactiveGroup group;
2626

2727
// An event source that emits values of type string
2828
namespace v1
@@ -33,7 +33,7 @@ namespace example1
3333
{
3434
cout << "Example 1 - Hello world (string source)" << endl;
3535

36-
Observer<> obs(
36+
Observer obs(
3737
[] (EventRange<string> in)
3838
{
3939
for (const auto& s : in)
@@ -61,7 +61,7 @@ namespace example1
6161

6262
int count = 0;
6363

64-
Observer<> obs(
64+
Observer obs(
6565
[&] (EventRange<> in)
6666
{
6767
for (auto t : in)
@@ -87,7 +87,7 @@ namespace example2
8787
using namespace std;
8888
using namespace react;
8989

90-
ReactiveGroup<> group;
90+
ReactiveGroup group;
9191

9292
// An event stream that merges both sources
9393
EventSource<> leftClick( group );
@@ -101,7 +101,7 @@ namespace example2
101101

102102
int count = 0;
103103

104-
Observer<> obs(
104+
Observer obs(
105105
[&] (EventRange<> in)
106106
{
107107
for (auto t : in)
@@ -124,7 +124,7 @@ namespace example3
124124
using namespace std;
125125
using namespace react;
126126

127-
ReactiveGroup<> group;
127+
ReactiveGroup group;
128128

129129
EventSource<int> numbers( group );
130130

@@ -134,7 +134,7 @@ namespace example3
134134
{
135135
cout << "Example 3 - Filtering events" << endl;
136136

137-
Observer<> obs(
137+
Observer obs(
138138
[&] (EventRange<int> in)
139139
{
140140
for (auto n : in)
@@ -156,7 +156,7 @@ namespace example4
156156
using namespace std;
157157
using namespace react;
158158

159-
ReactiveGroup<> group;
159+
ReactiveGroup group;
160160

161161
// Data types
162162
enum class Tag { normal, critical };
@@ -178,7 +178,7 @@ namespace example4
178178
{
179179
cout << "Example 4 - Transforming events" << endl;
180180

181-
Observer<> obs(
181+
Observer obs(
182182
[] (EventRange<TaggedNum> in)
183183
{
184184
for (TaggedNum e : in)
@@ -206,15 +206,15 @@ namespace example5
206206
using namespace std;
207207
using namespace react;
208208

209-
ReactiveGroup<> group;
209+
ReactiveGroup group;
210210

211211
EventSource<int> src( group );
212212

213213
void Run()
214214
{
215215
cout << "Example 5 - Queuing multiple inputs" << endl;
216216

217-
Observer<> obs(
217+
Observer obs(
218218
[] (EventRange<int> in)
219219
{
220220
for (int e : in)

‎examples/src/BasicObservers.cpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace example1
2020
using namespace std;
2121
using namespace react;
2222

23-
ReactiveGroup<> group;
23+
ReactiveGroup group;
2424

2525
VarSignal<int> x( group, 1 );
2626

@@ -31,7 +31,7 @@ namespace example1
3131
{
3232
Signal<int> mySignal( [] (int x) { return x; }, x );
3333

34-
Observer<> obs( [] (int mySignal) { cout << mySignal << endl; }, mySignal );
34+
Observer obs( [] (int mySignal) { cout << mySignal << endl; }, mySignal );
3535

3636
x <<= 2; // output: 2
3737
}
@@ -50,15 +50,15 @@ namespace example2
5050
using namespace std;
5151
using namespace react;
5252

53-
ReactiveGroup<> group;
53+
ReactiveGroup group;
5454

5555
EventSource<> trigger( group );
5656

5757
void Run()
5858
{
5959
cout << "Example 2 - Detaching observers manually" << endl;
6060

61-
Observer<> obs(
61+
Observer obs(
6262
[] (EventRange<> in)
6363
{
6464
for (auto _ : in)

‎examples/src/BasicSignals.cpp‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace example1
2929
// Defines a group.
3030
// Each group represents a separate dependency graph.
3131
// Reactives from different groups can not be mixed.
32-
ReactiveGroup<> group;
32+
ReactiveGroup group;
3333

3434
// The two words
3535
VarSignal<string> firstWord( group, string("Change") );
@@ -64,7 +64,7 @@ namespace example2
6464
using namespace std;
6565
using namespace react;
6666

67-
ReactiveGroup<> group;
67+
ReactiveGroup group;
6868

6969
VarSignal<int> x( group, 1 );
7070

@@ -74,7 +74,7 @@ namespace example2
7474
{
7575
cout << "Example 2 - Reacting to value changes" << endl;
7676

77-
Observer<> obs(
77+
Observer obs(
7878
[] (int newValue) { cout << "xAbs changed to " << newValue << endl; },
7979
xAbs );
8080

@@ -98,7 +98,7 @@ namespace example3
9898
int sumFunc(int a, int b)
9999
{ return a + b; }
100100

101-
ReactiveGroup<> group;
101+
ReactiveGroup group;
102102

103103
VarSignal<int> a( group, 1 );
104104
VarSignal<int> b( group, 1 );
@@ -111,7 +111,7 @@ namespace example3
111111
{
112112
cout << "Example 3 - Changing multiple inputs" << endl;
113113

114-
Observer<> obs(
114+
Observer obs(
115115
[] (int newValue) { cout << "z changed to " << newValue << endl; },
116116
z );
117117

@@ -136,7 +136,7 @@ namespace example4
136136
using namespace std;
137137
using namespace react;
138138

139-
ReactiveGroup<> group;
139+
ReactiveGroup group;
140140

141141
VarSignal<vector<string>> data( group );
142142

@@ -167,7 +167,7 @@ namespace example5
167167
using namespace std;
168168
using namespace react;
169169

170-
ReactiveGroup<> group;
170+
ReactiveGroup group;
171171

172172
// Helpers
173173
using ExprPairType = pair<string, int>;
@@ -204,7 +204,7 @@ namespace example5
204204
{
205205
cout << "Example 5 - Complex signals (v3)" << endl;
206206

207-
Observer<> obs(PrintExpressions, expressions);
207+
Observer obs(PrintExpressions, expressions);
208208

209209
a <<= 50;
210210
b <<= 60;

0 commit comments

Comments
 (0)