@@ -80,9 +80,7 @@ template <class E, typename T> struct CommandVoid1 : public Command {
8080 typedef boost::function<void (const T &)> function_t ;
8181
8282 CommandVoid1 (E &entity, function_t function, const std::string &docString)
83- : Command(entity,
84- boost::assign::list_of
85- (ValueHelper<T>::TypeID),
83+ : Command(entity, boost::assign::list_of(ValueHelper<T>::TypeID),
8684 docString),
8785 fptr (function) {}
8886
@@ -107,12 +105,12 @@ makeCommandVoid1(E &entity, boost::function<void(const T &)> function,
107105}
108106
109107template <class E , typename T>
110- CommandVoid1<E, T> *makeCommandVoid1 (
111- E &entity,
112- // The following syntaxt don't compile when not specializing the template
113- // arg... why ???
114- boost::function<void (E *, const T &)> function,
115- const std::string &docString) {
108+ CommandVoid1<E, T> *
109+ makeCommandVoid1 ( E &entity,
110+ // The following syntaxt don't compile when not specializing
111+ // the template arg... why ???
112+ boost::function<void (E *, const T &)> function,
113+ const std::string &docString) {
116114 return new CommandVoid1<E, T>(entity, boost::bind (function, &entity, _1),
117115 docString);
118116}
@@ -144,9 +142,8 @@ struct CommandVoid2 : public Command {
144142
145143 CommandVoid2 (E &entity, function_t function, const std::string &docString)
146144 : Command(entity,
147- boost::assign::list_of
148- (ValueHelper<T1>::TypeID)
149- (ValueHelper<T2>::TypeID),
145+ boost::assign::list_of (ValueHelper<T1>::TypeID)(
146+ ValueHelper<T2>::TypeID),
150147 docString),
151148 fptr(function) {}
152149
@@ -172,12 +169,12 @@ makeCommandVoid2(E &entity,
172169}
173170
174171template <class E , typename T1, typename T2>
175- CommandVoid2<E, T1, T2> *makeCommandVoid2 (
176- E &entity,
177- // The following syntaxt don't compile when not specializing the template
178- // arg... why ???
179- boost::function<void (E *, const T1 &, const T2 &)> function,
180- const std::string &docString) {
172+ CommandVoid2<E, T1, T2> *
173+ makeCommandVoid2 ( E &entity,
174+ // The following syntaxt don't compile when not specializing
175+ // the template arg... why ???
176+ boost::function<void (E *, const T1 &, const T2 &)> function,
177+ const std::string &docString) {
181178 return new CommandVoid2<E, T1, T2>(
182179 entity, boost::bind (function, &entity, _1, _2), docString);
183180}
@@ -211,10 +208,8 @@ struct CommandVoid3 : public Command {
211208
212209 CommandVoid3 (E &entity, function_t function, const std::string &docString)
213210 : Command(entity,
214- boost::assign::list_of
215- (ValueHelper<T1>::TypeID)
216- (ValueHelper<T2>::TypeID)
217- (ValueHelper<T3>::TypeID),
211+ boost::assign::list_of (ValueHelper<T1>::TypeID)(
212+ ValueHelper<T2>::TypeID)(ValueHelper<T3>::TypeID),
218213 docString),
219214 fptr(function) {}
220215
@@ -286,11 +281,9 @@ struct CommandVoid4 : public Command {
286281
287282 CommandVoid4 (E &entity, function_t function, const std::string &docString)
288283 : Command(entity,
289- boost::assign::list_of
290- (ValueHelper<T1>::TypeID)
291- (ValueHelper<T2>::TypeID)
292- (ValueHelper<T3>::TypeID)
293- (ValueHelper<T4>::TypeID),
284+ boost::assign::list_of (ValueHelper<T1>::TypeID)(
285+ ValueHelper<T2>::TypeID)(ValueHelper<T3>::TypeID)(
286+ ValueHelper<T4>::TypeID),
294287 docString),
295288 fptr(function) {}
296289
@@ -382,14 +375,11 @@ makeCommandVerbose(E &entity, typename CommandVerbose<E>::function_t function,
382375 return NULL ;
383376}
384377
385-
386378template <class E >
387- CommandVerbose<E> *
388- makeCommandVerbose (E &entity,
389- void (E::*function)(std::ostream &),
390- const std::string &docString) {
391- return new CommandVerbose<E>(entity,
392- boost::bind (function, &entity,_1),
379+ CommandVerbose<E> *makeCommandVerbose (E &entity,
380+ void (E::*function)(std::ostream &),
381+ const std::string &docString) {
382+ return new CommandVerbose<E>(entity, boost::bind (function, &entity, _1),
393383 docString);
394384 return NULL ;
395385}
@@ -462,9 +452,7 @@ struct CommandReturnType1 : public Command {
462452
463453 CommandReturnType1 (E &entity, function_t function,
464454 const std::string &docString)
465- : Command(entity,
466- boost::assign::list_of
467- (ValueHelper<T>::TypeID),
455+ : Command(entity, boost::assign::list_of(ValueHelper<T>::TypeID),
468456 docString),
469457 fptr (function) {}
470458
@@ -489,12 +477,12 @@ makeCommandReturnType1(E &entity,
489477}
490478
491479template <class E , typename ReturnType, typename T>
492- CommandReturnType1<E, ReturnType, T> *makeCommandReturnType1 (
493- E &entity,
494- // The following syntaxt don't compile when not specializing the template
495- // arg... why ???
496- boost::function<ReturnType(E *, const T &)> function,
497- const std::string &docString) {
480+ CommandReturnType1<E, ReturnType, T> *
481+ makeCommandReturnType1 ( E &entity,
482+ // The following syntaxt don't compile when not
483+ // specializing the template arg... why ???
484+ boost::function<ReturnType(E *, const T &)> function,
485+ const std::string &docString) {
498486 return new CommandReturnType1<E, ReturnType, T>(
499487 entity, boost::bind (function, &entity, _1), docString);
500488}
@@ -529,9 +517,8 @@ struct CommandReturnType2 : public Command {
529517 CommandReturnType2 (E &entity, function_t function,
530518 const std::string &docString)
531519 : Command(entity,
532- boost::assign::list_of
533- (ValueHelper<T1>::TypeID)
534- (ValueHelper<T2>::TypeID),
520+ boost::assign::list_of (ValueHelper<T1>::TypeID)(
521+ ValueHelper<T2>::TypeID),
535522 docString),
536523 fptr(function) {}
537524
@@ -589,5 +576,4 @@ inline std::string docCommandReturnType2(const std::string &doc,
589576} // namespace command
590577} // namespace dynamicgraph
591578
592-
593579#endif // __dg_command_bind_h__
0 commit comments