22
22
23
23
#include " dynamic-graph/command.h"
24
24
#include < boost/assign/list_of.hpp>
25
- #include < boost/bind.hpp>
25
+ #include < boost/bind/bind .hpp>
26
26
#include < boost/function.hpp>
27
27
28
28
/* --- FUNCTION 0 ARGS ----------------------------------------------------- */
@@ -111,15 +111,17 @@ makeCommandVoid1(E &entity,
111
111
// the template arg... why ???
112
112
boost::function<void (E *, const T &)> function,
113
113
const std::string &docString) {
114
- return new CommandVoid1<E, T>(entity, boost::bind (function, &entity, _1),
115
- docString);
114
+ return new CommandVoid1<E, T>(
115
+ entity, boost::bind (function, &entity, boost::placeholders::_1),
116
+ docString);
116
117
}
117
118
118
119
template <class E , typename T>
119
120
CommandVoid1<E, T> *makeCommandVoid1 (E &entity, void (E::*function)(const T &),
120
121
const std::string &docString) {
121
- return new CommandVoid1<E, T>(entity, boost::bind (function, &entity, _1),
122
- docString);
122
+ return new CommandVoid1<E, T>(
123
+ entity, boost::bind (function, &entity, boost::placeholders::_1),
124
+ docString);
123
125
return NULL ;
124
126
}
125
127
@@ -175,16 +177,22 @@ makeCommandVoid2(E &entity,
175
177
// the template arg... why ???
176
178
boost::function<void (E *, const T1 &, const T2 &)> function,
177
179
const std::string &docString) {
178
- return new CommandVoid2<E, T1, T2>(
179
- entity, boost::bind (function, &entity, _1, _2), docString);
180
+ return new CommandVoid2<E, T1, T2>(entity,
181
+ boost::bind (function, &entity,
182
+ boost::placeholders::_1,
183
+ boost::placeholders::_2),
184
+ docString);
180
185
}
181
186
182
187
template <class E , typename T1, typename T2>
183
188
CommandVoid2<E, T1, T2> *
184
189
makeCommandVoid2 (E &entity, void (E::*function)(const T1 &, const T2 &),
185
190
const std::string &docString) {
186
- return new CommandVoid2<E, T1, T2>(
187
- entity, boost::bind (function, &entity, _1, _2), docString);
191
+ return new CommandVoid2<E, T1, T2>(entity,
192
+ boost::bind (function, &entity,
193
+ boost::placeholders::_1,
194
+ boost::placeholders::_2),
195
+ docString);
188
196
return NULL ;
189
197
}
190
198
@@ -243,7 +251,10 @@ CommandVoid3<E, T1, T2, T3> *makeCommandVoid3(
243
251
boost::function<void (E *, const T1 &, const T2 &, const T3 &)> function,
244
252
const std::string &docString) {
245
253
return new CommandVoid3<E, T1, T2, T3>(
246
- entity, boost::bind (function, &entity, _1, _2, _3), docString);
254
+ entity,
255
+ boost::bind (function, &entity, boost::placeholders::_1,
256
+ boost::placeholders::_2, boost::placeholders::_3),
257
+ docString);
247
258
}
248
259
249
260
template <class E , typename T1, typename T2, typename T3>
@@ -252,7 +263,10 @@ makeCommandVoid3(E &entity,
252
263
void (E::*function)(const T1 &, const T2 &, const T3 &),
253
264
const std::string &docString) {
254
265
return new CommandVoid3<E, T1, T2, T3>(
255
- entity, boost::bind (function, &entity, _1, _2, _3), docString);
266
+ entity,
267
+ boost::bind (function, &entity, boost::placeholders::_1,
268
+ boost::placeholders::_2, boost::placeholders::_3),
269
+ docString);
256
270
return NULL ;
257
271
}
258
272
@@ -317,7 +331,11 @@ CommandVoid4<E, T1, T2, T3, T4> *makeCommandVoid4(
317
331
function,
318
332
const std::string &docString) {
319
333
return new CommandVoid4<E, T1, T2, T3, T4>(
320
- entity, boost::bind (function, &entity, _1, _2, _3, _4), docString);
334
+ entity,
335
+ boost::bind (function, &entity, boost::placeholders::_1,
336
+ boost::placeholders::_2, boost::placeholders::_3,
337
+ boost::placeholders::_4),
338
+ docString);
321
339
}
322
340
323
341
template <class E , typename T1, typename T2, typename T3, typename T4>
@@ -326,7 +344,11 @@ CommandVoid4<E, T1, T2, T3, T4> *makeCommandVoid4(
326
344
void (E::*function)(const T1 &, const T2 &, const T3 &, const T4 &),
327
345
const std::string &docString) {
328
346
return new CommandVoid4<E, T1, T2, T3, T4>(
329
- entity, boost::bind (function, &entity, _1, _2, _3, _4), docString);
347
+ entity,
348
+ boost::bind (function, &entity, boost::placeholders::_1,
349
+ boost::placeholders::_2, boost::placeholders::_3,
350
+ boost::placeholders::_4),
351
+ docString);
330
352
return NULL ;
331
353
}
332
354
@@ -379,8 +401,9 @@ template <class E>
379
401
CommandVerbose<E> *makeCommandVerbose (E &entity,
380
402
void (E::*function)(std::ostream &),
381
403
const std::string &docString) {
382
- return new CommandVerbose<E>(entity, boost::bind (function, &entity, _1),
383
- docString);
404
+ return new CommandVerbose<E>(
405
+ entity, boost::bind (function, &entity, boost::placeholders::_1),
406
+ docString);
384
407
return NULL ;
385
408
}
386
409
@@ -484,15 +507,17 @@ makeCommandReturnType1(E &entity,
484
507
boost::function<ReturnType(E *, const T &)> function,
485
508
const std::string &docString) {
486
509
return new CommandReturnType1<E, ReturnType, T>(
487
- entity, boost::bind (function, &entity, _1), docString);
510
+ entity, boost::bind (function, &entity, boost::placeholders::_1),
511
+ docString);
488
512
}
489
513
490
514
template <class E , typename ReturnType, typename T>
491
515
CommandReturnType1<E, ReturnType, T> *
492
516
makeCommandReturnType1 (E &entity, ReturnType (E::*function)(const T &),
493
517
const std::string &docString) {
494
518
return new CommandReturnType1<E, ReturnType, T>(
495
- entity, boost::bind (function, &entity, _1), docString);
519
+ entity, boost::bind (function, &entity, boost::placeholders::_1),
520
+ docString);
496
521
return NULL ;
497
522
}
498
523
@@ -551,7 +576,10 @@ CommandReturnType2<E, ReturnType, T1, T2> *makeCommandReturnType2(
551
576
boost::function<ReturnType(E *, const T1 &, const T2 &)> function,
552
577
const std::string &docString) {
553
578
return new CommandReturnType2<E, ReturnType, T1, T2>(
554
- entity, boost::bind (function, &entity, _1, _2), docString);
579
+ entity,
580
+ boost::bind (function, &entity, boost::placeholders::_1,
581
+ boost::placeholders::_2),
582
+ docString);
555
583
}
556
584
557
585
template <class E , typename ReturnType, typename T1, typename T2>
@@ -560,7 +588,10 @@ makeCommandReturnType2(E &entity,
560
588
ReturnType (E::*function)(const T1 &, const T2 &),
561
589
const std::string &docString) {
562
590
return new CommandReturnType2<E, ReturnType, T1, T2>(
563
- entity, boost::bind (function, &entity, _1, _2), docString);
591
+ entity,
592
+ boost::bind (function, &entity, boost::placeholders::_1,
593
+ boost::placeholders::_2),
594
+ docString);
564
595
return NULL ;
565
596
}
566
597
0 commit comments