2222
2323#include " dynamic-graph/command.h"
2424#include < boost/assign/list_of.hpp>
25- #include < boost/bind/bind .hpp>
25+ #include < boost/bind.hpp>
2626#include < boost/function.hpp>
2727
2828/* --- FUNCTION 0 ARGS ----------------------------------------------------- */
@@ -111,17 +111,15 @@ makeCommandVoid1(E &entity,
111111 // the template arg... why ???
112112 boost::function<void (E *, const T &)> function,
113113 const std::string &docString) {
114- return new CommandVoid1<E, T>(
115- entity, boost::bind (function, &entity, boost::placeholders::_1),
116- docString);
114+ return new CommandVoid1<E, T>(entity, boost::bind (function, &entity, _1),
115+ docString);
117116}
118117
119118template <class E , typename T>
120119CommandVoid1<E, T> *makeCommandVoid1 (E &entity, void (E::*function)(const T &),
121120 const std::string &docString) {
122- return new CommandVoid1<E, T>(
123- entity, boost::bind (function, &entity, boost::placeholders::_1),
124- docString);
121+ return new CommandVoid1<E, T>(entity, boost::bind (function, &entity, _1),
122+ docString);
125123 return NULL ;
126124}
127125
@@ -177,22 +175,16 @@ makeCommandVoid2(E &entity,
177175 // the template arg... why ???
178176 boost::function<void (E *, const T1 &, const T2 &)> function,
179177 const std::string &docString) {
180- return new CommandVoid2<E, T1, T2>(entity,
181- boost::bind (function, &entity,
182- boost::placeholders::_1,
183- boost::placeholders::_2),
184- docString);
178+ return new CommandVoid2<E, T1, T2>(
179+ entity, boost::bind (function, &entity, _1, _2), docString);
185180}
186181
187182template <class E , typename T1, typename T2>
188183CommandVoid2<E, T1, T2> *
189184makeCommandVoid2 (E &entity, void (E::*function)(const T1 &, const T2 &),
190185 const std::string &docString) {
191- return new CommandVoid2<E, T1, T2>(entity,
192- boost::bind (function, &entity,
193- boost::placeholders::_1,
194- boost::placeholders::_2),
195- docString);
186+ return new CommandVoid2<E, T1, T2>(
187+ entity, boost::bind (function, &entity, _1, _2), docString);
196188 return NULL ;
197189}
198190
@@ -251,10 +243,7 @@ CommandVoid3<E, T1, T2, T3> *makeCommandVoid3(
251243 boost::function<void (E *, const T1 &, const T2 &, const T3 &)> function,
252244 const std::string &docString) {
253245 return new CommandVoid3<E, T1, T2, T3>(
254- entity,
255- boost::bind (function, &entity, boost::placeholders::_1,
256- boost::placeholders::_2, boost::placeholders::_3),
257- docString);
246+ entity, boost::bind (function, &entity, _1, _2, _3), docString);
258247}
259248
260249template <class E , typename T1, typename T2, typename T3>
@@ -263,10 +252,7 @@ makeCommandVoid3(E &entity,
263252 void (E::*function)(const T1 &, const T2 &, const T3 &),
264253 const std::string &docString) {
265254 return new CommandVoid3<E, T1, T2, T3>(
266- entity,
267- boost::bind (function, &entity, boost::placeholders::_1,
268- boost::placeholders::_2, boost::placeholders::_3),
269- docString);
255+ entity, boost::bind (function, &entity, _1, _2, _3), docString);
270256 return NULL ;
271257}
272258
@@ -331,11 +317,7 @@ CommandVoid4<E, T1, T2, T3, T4> *makeCommandVoid4(
331317 function,
332318 const std::string &docString) {
333319 return new CommandVoid4<E, T1, T2, T3, T4>(
334- entity,
335- boost::bind (function, &entity, boost::placeholders::_1,
336- boost::placeholders::_2, boost::placeholders::_3,
337- boost::placeholders::_4),
338- docString);
320+ entity, boost::bind (function, &entity, _1, _2, _3, _4), docString);
339321}
340322
341323template <class E , typename T1, typename T2, typename T3, typename T4>
@@ -344,11 +326,7 @@ CommandVoid4<E, T1, T2, T3, T4> *makeCommandVoid4(
344326 void (E::*function)(const T1 &, const T2 &, const T3 &, const T4 &),
345327 const std::string &docString) {
346328 return new CommandVoid4<E, T1, T2, T3, T4>(
347- entity,
348- boost::bind (function, &entity, boost::placeholders::_1,
349- boost::placeholders::_2, boost::placeholders::_3,
350- boost::placeholders::_4),
351- docString);
329+ entity, boost::bind (function, &entity, _1, _2, _3, _4), docString);
352330 return NULL ;
353331}
354332
@@ -401,9 +379,8 @@ template <class E>
401379CommandVerbose<E> *makeCommandVerbose (E &entity,
402380 void (E::*function)(std::ostream &),
403381 const std::string &docString) {
404- return new CommandVerbose<E>(
405- entity, boost::bind (function, &entity, boost::placeholders::_1),
406- docString);
382+ return new CommandVerbose<E>(entity, boost::bind (function, &entity, _1),
383+ docString);
407384 return NULL ;
408385}
409386
@@ -507,17 +484,15 @@ makeCommandReturnType1(E &entity,
507484 boost::function<ReturnType(E *, const T &)> function,
508485 const std::string &docString) {
509486 return new CommandReturnType1<E, ReturnType, T>(
510- entity, boost::bind (function, &entity, boost::placeholders::_1),
511- docString);
487+ entity, boost::bind (function, &entity, _1), docString);
512488}
513489
514490template <class E , typename ReturnType, typename T>
515491CommandReturnType1<E, ReturnType, T> *
516492makeCommandReturnType1 (E &entity, ReturnType (E::*function)(const T &),
517493 const std::string &docString) {
518494 return new CommandReturnType1<E, ReturnType, T>(
519- entity, boost::bind (function, &entity, boost::placeholders::_1),
520- docString);
495+ entity, boost::bind (function, &entity, _1), docString);
521496 return NULL ;
522497}
523498
@@ -576,10 +551,7 @@ CommandReturnType2<E, ReturnType, T1, T2> *makeCommandReturnType2(
576551 boost::function<ReturnType(E *, const T1 &, const T2 &)> function,
577552 const std::string &docString) {
578553 return new CommandReturnType2<E, ReturnType, T1, T2>(
579- entity,
580- boost::bind (function, &entity, boost::placeholders::_1,
581- boost::placeholders::_2),
582- docString);
554+ entity, boost::bind (function, &entity, _1, _2), docString);
583555}
584556
585557template <class E , typename ReturnType, typename T1, typename T2>
@@ -588,10 +560,7 @@ makeCommandReturnType2(E &entity,
588560 ReturnType (E::*function)(const T1 &, const T2 &),
589561 const std::string &docString) {
590562 return new CommandReturnType2<E, ReturnType, T1, T2>(
591- entity,
592- boost::bind (function, &entity, boost::placeholders::_1,
593- boost::placeholders::_2),
594- docString);
563+ entity, boost::bind (function, &entity, _1, _2), docString);
595564 return NULL ;
596565}
597566
0 commit comments