42 defineBinding (topic);
48 return val == getAdvice();
66 link_.defineBinding (topic);
72 link_.setAdvice (val);
78 link_.retractAdvice();
108 createCollaboration();
109 overwriting_and_retracting();
119 CHECK (client.got (0));
122 CHECK (client.got (0));
124 int rr{ 1 +
rani(1000)};
127 CHECK (client.got (rr));
135 TheAdvised client1 (
"topic1()");
136 TheAdvisor server2 (
"topic2()");
138 int r1{ 1 +
rani(1000)};
139 int r2{ 1 +
rani(1000)};
141 server2.publish (r2);
142 CHECK (client1.got(0));
144 TheAdvised client2 (
"topic2()");
145 CHECK (client2.got(r2));
148 CHECK (client1.got(0));
150 server1.publish (r1);
151 CHECK (client1.got(0));
152 CHECK (client2.got(r2));
154 server1.rebind (
"topic1()");
155 CHECK (client1.got(r1));
156 CHECK (client2.got(r2));
172 TheAdvised client1 (
"slot1");
173 TheAdvised client2 (
"slot2");
174 CHECK (client1.got(0));
175 CHECK (client2.got(0));
177 int r1{ 1 +
rani(1000)};
178 int r2{ 1 +
rani(1000)};
181 TheAdvisor server(
"slot1()");
182 CHECK (client1.got(0));
183 CHECK (client2.got(0));
186 CHECK (client1.got(r1));
187 CHECK (client2.got(0));
190 CHECK (client1.got(r2));
191 CHECK (client2.got(0));
193 server.rebind(
"slot2()");
194 CHECK (client1.got(0));
195 CHECK (client2.got(r2));
198 CHECK (client1.got(0));
199 CHECK (client2.got(r2));
202 TheAdvisor anotherServer(
"slot1");
203 CHECK (client1.got(0));
204 CHECK (client2.got(r2));
206 anotherServer.publish (r1);
207 CHECK (client1.got(r1));
208 CHECK (client2.got(r2));
211 CHECK (client1.got(r1));
212 CHECK (client2.got(r2));
215 TheAdvisor yetAnotherServer(
"slot2");
216 CHECK (client1.got(r1));
217 CHECK (client2.got(r2));
219 yetAnotherServer.publish (r1);
220 CHECK (client1.got(r1));
221 CHECK (client2.got(r1));
223 yetAnotherServer.rebind(
"slot1");
224 CHECK (client1.got(r1));
225 CHECK (client2.got(r2));
227 yetAnotherServer.clear();
228 CHECK (client1.got(r1));
229 CHECK (client2.got(r2));
231 yetAnotherServer.rebind(
"slot2");
232 CHECK (client1.got(r1));
233 CHECK (client2.got(r2));
235 yetAnotherServer.publish (5);
236 CHECK (client1.got(r1));
237 CHECK (client2.got(5));
240 CHECK (client1.got(r1));
241 CHECK (client2.got(5));
243 client1.rebind(
"slot2");
244 CHECK (client1.got(5));
245 CHECK (client2.got(5));
247 client2.rebind(
"nonExistingSlot");
248 CHECK (client1.got(5));
249 CHECK (client2.got(0));
Access point for the advised entity (client).
void createCollaboration()
inline string literal This is a marker type to indicate that
int rani(uint bound=_iBOUND())
Expecting Advice and giving Advice: a cross-cutting collaboration of loosely coupled participants...
Simplistic test class runner.
Lumiera public interface.
void overwriting_and_retracting()