CARMA C++
HandleMethodFunctorGroup.h
1 #ifndef CARMA_CONTROL_HANDLE_METHOD_FUNCTOR_GROUP_H
2 #define CARMA_CONTROL_HANDLE_METHOD_FUNCTOR_GROUP_H
3 
4 
5 #include <map>
6 #include <set>
7 #include <string>
8 
9 #include "carma/control/MethodFunctors.h"
10 
11 // Definitions for up to 5 arguments to method pointer.
12 // If invoked method needs more, add to this file
13 // or consider consolidating your method arguments.
14 //
15 /**********************************************************************/
16 // NOTE: If you get compile time errors on makeHandleMethodFunctorGroup
17 // calls, check the number of parameters in your invocation.
18 // HandleMethodFunctorGroup.h only defines templates for
19 // up to 9 parameters and you'll get a error message:
20 //
21 // "no matching function call to to makeHandleMethodFunctorGroup(...) ...".
22 //
23 // ##### Note also you can get a similar error if you use references
24 // ##### anywhere in the method signature which you are dispatching.
25 // ##### This is a common error! (mwp)
26 /**********************************************************************/
27 
28 namespace carma {
29 namespace control {
30 
31 
32 template < typename H >
33 ::std::map< ::std::string, MethodFunctor0< H > >
34 makeHandleMethodFunctorGroup(
35  const ::std::set< H * > & hGroup,
36  void (H::*methodPtr)( ) );
37 
38 
39 template < typename H, typename A0 >
40 ::std::map< ::std::string, MethodFunctor1< H, A0 > >
41 makeHandleMethodFunctorGroup(
42  const ::std::set< H * > & hGroup,
43  void (H::*methodPtr)( A0 ),
44  const A0 & arg0 );
45 
46 
47 template < typename H, typename A0, typename A1 >
48 ::std::map< ::std::string, MethodFunctor2< H, A0, A1 > >
49 makeHandleMethodFunctorGroup(
50  const ::std::set< H * > & hGroup,
51  void (H::*methodPtr)( A0, A1 ),
52  const A0 & arg0,
53  const A1 & arg1 );
54 
55 
56 template < typename H, typename A0, typename A1, typename A2 >
57 ::std::map< ::std::string, MethodFunctor3< H, A0, A1, A2 > >
58 makeHandleMethodFunctorGroup(
59  const ::std::set< H * > & hGroup,
60  void (H::*methodPtr)( A0, A1, A2 ),
61  const A0 & arg0,
62  const A1 & arg1,
63  const A2 & arg2 );
64 
65 
66 template < typename H, typename A0, typename A1, typename A2, typename A3 >
67 ::std::map< ::std::string, MethodFunctor4< H, A0, A1, A2, A3 > >
68 makeHandleMethodFunctorGroup(
69  const ::std::set< H * > & hGroup,
70  void (H::*methodPtr)( A0, A1, A2, A3 ),
71  const A0 & arg0,
72  const A1 & arg1,
73  const A2 & arg2,
74  const A3 & arg3 );
75 
76 
77 template < typename H,
78  typename A0,
79  typename A1,
80  typename A2,
81  typename A3,
82  typename A4 >
83 ::std::map< ::std::string, MethodFunctor5< H, A0, A1, A2, A3, A4 > >
84 makeHandleMethodFunctorGroup(
85  const ::std::set< H * > & hGroup,
86  void (H::*methodPtr)( A0, A1, A2, A3, A4 ),
87  const A0 & arg0,
88  const A1 & arg1,
89  const A2 & arg2,
90  const A3 & arg3,
91  const A4 & arg4 );
92 
93 
94 template < typename H,
95  typename A0,
96  typename A1,
97  typename A2,
98  typename A3,
99  typename A4,
100  typename A5 >
101 ::std::map< ::std::string, MethodFunctor6< H, A0, A1, A2, A3, A4, A5 > >
102 makeHandleMethodFunctorGroup(
103  const ::std::set< H * > & hGroup,
104  void (H::*methodPtr)( A0, A1, A2, A3, A4, A5 ),
105  const A0 & arg0,
106  const A1 & arg1,
107  const A2 & arg2,
108  const A3 & arg3,
109  const A4 & arg4,
110  const A5 & arg5 );
111 
112 
113 template < typename H,
114  typename A0,
115  typename A1,
116  typename A2,
117  typename A3,
118  typename A4,
119  typename A5,
120  typename A6 >
121 ::std::map< ::std::string, MethodFunctor7< H, A0, A1, A2, A3, A4, A5, A6 > >
122 makeHandleMethodFunctorGroup(
123  const ::std::set< H * > & hGroup,
124  void (H::*methodPtr)( A0, A1, A2, A3, A4, A5, A6 ),
125  const A0 & arg0,
126  const A1 & arg1,
127  const A2 & arg2,
128  const A3 & arg3,
129  const A4 & arg4,
130  const A5 & arg5,
131  const A6 & arg6 );
132 
133 template < typename H,
134  typename A0,
135  typename A1,
136  typename A2,
137  typename A3,
138  typename A4,
139  typename A5,
140  typename A6,
141  typename A7>
142 ::std::map< ::std::string, MethodFunctor8< H, A0, A1, A2, A3, A4, A5, A6, A7 > >
143 makeHandleMethodFunctorGroup(
144  const ::std::set< H * > & hGroup,
145  void (H::*methodPtr)(A0, A1, A2, A3, A4, A5, A6, A7),
146  const A0 & arg0,
147  const A1 & arg1,
148  const A2 & arg2,
149  const A3 & arg3,
150  const A4 & arg4,
151  const A5 & arg5,
152  const A6& arg6,
153  const A7& arg7);
154 
155 template < typename H,
156  typename A0,
157  typename A1,
158  typename A2,
159  typename A3,
160  typename A4,
161  typename A5,
162  typename A6,
163  typename A7,
164  typename A8 >
165 ::std::map< ::std::string, MethodFunctor9< H, A0, A1, A2, A3, A4, A5, A6, A7, A8 > >
166 makeHandleMethodFunctorGroup(
167  const ::std::set< H * > & hGroup,
168  void (H::*methodPtr)(A0, A1, A2, A3, A4, A5, A6, A7, A8),
169  const A0 & arg0,
170  const A1 & arg1,
171  const A2 & arg2,
172  const A3 & arg3,
173  const A4 & arg4,
174  const A5 & arg5,
175  const A6& arg6,
176  const A7& arg7,
177  const A8& arg8);
178 
179 template < typename H,
180  typename A0,
181  typename A1,
182  typename A2,
183  typename A3,
184  typename A4,
185  typename A5,
186  typename A6,
187  typename A7,
188  typename A8,
189  typename A9 >
190 ::std::map< ::std::string, MethodFunctor10< H, A0, A1, A2, A3, A4,
191  A5, A6, A7, A8, A9 > >
192 makeHandleMethodFunctorGroup(
193  const ::std::set< H * > & hGroup,
194  void (H::*methodPtr)( A0, A1, A2, A3, A4,
195  A5, A6, A7, A8, A9 ),
196  const A0 & arg0,
197  const A1 & arg1,
198  const A2 & arg2,
199  const A3 & arg3,
200  const A4 & arg4,
201  const A5 & arg5,
202  const A6 & arg6,
203  const A7 & arg7,
204  const A8 & arg8,
205  const A9 & arg9 );
206 
207 // 11 args
208 template < typename H,
209  typename A0,
210  typename A1,
211  typename A2,
212  typename A3,
213  typename A4,
214  typename A5,
215  typename A6,
216  typename A7,
217  typename A8,
218  typename A9,
219  typename A10 >
220 ::std::map< ::std::string, MethodFunctor11< H, A0, A1, A2, A3, A4,
221  A5, A6, A7, A8, A9, A10 > >
222 makeHandleMethodFunctorGroup(
223  const ::std::set< H * > & hGroup,
224  void (H::*methodPtr)( A0, A1, A2, A3, A4,
225  A5, A6, A7, A8, A9, A10 ),
226  const A0 & arg0,
227  const A1 & arg1,
228  const A2 & arg2,
229  const A3 & arg3,
230  const A4 & arg4,
231  const A5 & arg5,
232  const A6 & arg6,
233  const A7 & arg7,
234  const A8 & arg8,
235  const A9 & arg9,
236  const A10 & arg10 );
237 
238 // 12 args
239 template < typename H,
240  typename A0,
241  typename A1,
242  typename A2,
243  typename A3,
244  typename A4,
245  typename A5,
246  typename A6,
247  typename A7,
248  typename A8,
249  typename A9,
250  typename A10,
251  typename A11 >
252 ::std::map< ::std::string, MethodFunctor12< H, A0, A1, A2, A3, A4,
253  A5, A6, A7, A8, A9, A10, A11 > >
254 makeHandleMethodFunctorGroup(
255  const ::std::set< H * > & hGroup,
256  void (H::*methodPtr)(A0, A1, A2, A3, A4,
257  A5, A6, A7, A8, A9, A10, A11),
258  const A0 & arg0,
259  const A1 & arg1,
260  const A2 & arg2,
261  const A3 & arg3,
262  const A4 & arg4,
263  const A5 & arg5,
264  const A6 & arg6,
265  const A7 & arg7,
266  const A8 & arg8,
267  const A9 & arg9,
268  const A10 & arg10,
269  const A11& arg11);
270 
271 // 19 args
272 template < typename H,
273  typename A0,
274  typename A1,
275  typename A2,
276  typename A3,
277  typename A4,
278  typename A5,
279  typename A6,
280  typename A7,
281  typename A8,
282  typename A9,
283  typename A10,
284  typename A11,
285  typename A12,
286  typename A13,
287  typename A14,
288  typename A15,
289  typename A16,
290  typename A17,
291  typename A18,
292  typename A19 >
293 ::std::map< ::std::string, MethodFunctor19< H, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18 > >
294 makeHandleMethodFunctorGroup(
295  const ::std::set< H * > & hGroup,
296  void (H::*methodPtr)( A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10,
297  A11, A12, A13, A14, A15, A16, A17, A18 ),
298  const A0 & arg0,
299  const A1 & arg1,
300  const A2 & arg2,
301  const A3 & arg3,
302  const A4 & arg4,
303  const A5 & arg5,
304  const A6 & arg6,
305  const A7 & arg7,
306  const A8 & arg8,
307  const A9 & arg9,
308  const A10 & arg10,
309  const A11 & arg11,
310  const A12 & arg12,
311  const A13 & arg13,
312  const A14 & arg14,
313  const A15 & arg15,
314  const A16 & arg16,
315  const A17 & arg17,
316  const A18 & arg18
317  );
318 
319 // NOTE: Below here is simply implementation
320 
321 
322 template < typename H >
323 ::std::map< ::std::string, MethodFunctor0< H > >
324 makeHandleMethodFunctorGroup(
325  const ::std::set< H * > & hGroup,
326  void (H::*methodPtr)( ) ) {
327  typedef typename ::std::set< H * >::const_iterator HGroupConstIterator;
328  typedef ::std::map< ::std::string, MethodFunctor0< H > > FunctorGroup;
329 
330  FunctorGroup result;
331 
332  HGroupConstIterator i = hGroup.begin( );
333  const HGroupConstIterator iEnd = hGroup.end( );
334 
335  for ( ; i != iEnd; ++i ) {
336  H * const h = *i;
337 
338  if ( h == 0 )
339  continue;
340 
341  result.insert(
342  ::std::make_pair(
343  h->doName( ),
344  MethodFunctor0< H >(
345  h,
346  methodPtr ) ) );
347  }
348 
349  return result;
350 }
351 
352 
353 template < typename H, typename A0 >
354 ::std::map< ::std::string, MethodFunctor1< H, A0 > >
355 makeHandleMethodFunctorGroup(
356  const ::std::set< H * > & hGroup,
357  void (H::*methodPtr)( A0 ),
358  const A0 & arg0 ) {
359  typedef typename ::std::set< H * >::const_iterator HGroupConstIterator;
360  typedef ::std::map< ::std::string, MethodFunctor1< H, A0 > > FunctorGroup;
361 
362  FunctorGroup result;
363 
364  HGroupConstIterator i = hGroup.begin( );
365  const HGroupConstIterator iEnd = hGroup.end( );
366 
367  for ( ; i != iEnd; ++i ) {
368  H * const h = *i;
369 
370  if ( h == 0 )
371  continue;
372 
373  result.insert(
374  ::std::make_pair(
375  h->doName( ),
376  MethodFunctor1< H, A0 >(
377  h,
378  methodPtr,
379  arg0 ) ) );
380  }
381 
382  return result;
383 }
384 
385 
386 template < typename H, typename A0, typename A1 >
387 ::std::map< ::std::string, MethodFunctor2< H, A0, A1 > >
388 makeHandleMethodFunctorGroup(
389  const ::std::set< H * > & hGroup,
390  void (H::*methodPtr)( A0, A1 ),
391  const A0 & arg0,
392  const A1 & arg1 ) {
393  typedef typename ::std::set< H * >::const_iterator HGroupConstIterator;
394  typedef ::std::map< ::std::string, MethodFunctor2< H, A0, A1 > > FunctorGroup;
395 
396  FunctorGroup result;
397 
398  HGroupConstIterator i = hGroup.begin( );
399  const HGroupConstIterator iEnd = hGroup.end( );
400 
401  for ( ; i != iEnd; ++i ) {
402  H * const h = *i;
403 
404  if ( h == 0 )
405  continue;
406 
407  result.insert(
408  ::std::make_pair(
409  h->doName( ),
410  MethodFunctor2< H, A0, A1 >(
411  h,
412  methodPtr,
413  arg0,
414  arg1 ) ) );
415  }
416 
417  return result;
418 }
419 
420 
421 template < typename H, typename A0, typename A1, typename A2 >
422 ::std::map< ::std::string, MethodFunctor3< H, A0, A1, A2 > >
423 makeHandleMethodFunctorGroup(
424  const ::std::set< H * > & hGroup,
425  void (H::*methodPtr)( A0, A1, A2 ),
426  const A0 & arg0,
427  const A1 & arg1,
428  const A2 & arg2 ) {
429  typedef typename ::std::set< H * >::const_iterator HGroupConstIterator;
430  typedef ::std::map< ::std::string, MethodFunctor3< H, A0, A1, A2 > > FunctorGroup;
431 
432  FunctorGroup result;
433 
434  HGroupConstIterator i = hGroup.begin( );
435  const HGroupConstIterator iEnd = hGroup.end( );
436 
437  for ( ; i != iEnd; ++i ) {
438  H * const h = *i;
439 
440  if ( h == 0 )
441  continue;
442 
443  result.insert(
444  ::std::make_pair(
445  h->doName( ),
446  MethodFunctor3< H, A0, A1, A2 >(
447  h,
448  methodPtr,
449  arg0,
450  arg1,
451  arg2 ) ) );
452  }
453 
454  return result;
455 }
456 
457 
458 template < typename H, typename A0, typename A1, typename A2, typename A3 >
459 ::std::map< ::std::string, MethodFunctor4< H, A0, A1, A2, A3 > >
460 makeHandleMethodFunctorGroup(
461  const ::std::set< H * > & hGroup,
462  void (H::*methodPtr)( A0, A1, A2, A3 ),
463  const A0 & arg0,
464  const A1 & arg1,
465  const A2 & arg2,
466  const A3 & arg3 ) {
467  typedef typename ::std::set< H * >::const_iterator HGroupConstIterator;
468  typedef ::std::map< ::std::string, MethodFunctor4< H, A0, A1, A2, A3> > FunctorGroup;
469 
470  FunctorGroup result;
471 
472  HGroupConstIterator i = hGroup.begin( );
473  const HGroupConstIterator iEnd = hGroup.end( );
474 
475  for ( ; i != iEnd; ++i ) {
476  H * const h = *i;
477 
478  if ( h == 0 )
479  continue;
480 
481  result.insert(
482  ::std::make_pair(
483  h->doName( ),
484  MethodFunctor4< H, A0, A1, A2, A3 >(
485  h,
486  methodPtr,
487  arg0,
488  arg1,
489  arg2,
490  arg3 ) ) );
491  }
492 
493  return result;
494 }
495 
496 
497 template < typename H,
498  typename A0,
499  typename A1,
500  typename A2,
501  typename A3,
502  typename A4 >
503 ::std::map< ::std::string, MethodFunctor5< H, A0, A1, A2, A3, A4 > >
504 makeHandleMethodFunctorGroup(
505  const ::std::set< H * > & hGroup,
506  void (H::*methodPtr)( A0, A1, A2, A3, A4 ),
507  const A0 & arg0,
508  const A1 & arg1,
509  const A2 & arg2,
510  const A3 & arg3,
511  const A4 & arg4 ) {
512  typedef typename ::std::set< H * >::const_iterator HGroupConstIterator;
513  typedef ::std::map< ::std::string, MethodFunctor5< H, A0, A1, A2, A3, A4 > >
514  FunctorGroup;
515 
516  FunctorGroup result;
517 
518  HGroupConstIterator i = hGroup.begin( );
519  const HGroupConstIterator iEnd = hGroup.end( );
520 
521  for ( ; i != iEnd; ++i ) {
522  H * const h = *i;
523 
524  if ( h == 0 )
525  continue;
526 
527  result.insert(
528  ::std::make_pair(
529  h->doName( ),
530  MethodFunctor5< H, A0, A1, A2, A3, A4 >(
531  h,
532  methodPtr,
533  arg0,
534  arg1,
535  arg2,
536  arg3,
537  arg4 ) ) );
538  }
539 
540  return result;
541 }
542 
543 
544 template < typename H,
545  typename A0,
546  typename A1,
547  typename A2,
548  typename A3,
549  typename A4,
550  typename A5 >
551 ::std::map< ::std::string, MethodFunctor6< H, A0, A1, A2, A3, A4, A5 > >
552 makeHandleMethodFunctorGroup(
553  const ::std::set< H * > & hGroup,
554  void (H::*methodPtr)( A0, A1, A2, A3, A4, A5 ),
555  const A0 & arg0,
556  const A1 & arg1,
557  const A2 & arg2,
558  const A3 & arg3,
559  const A4 & arg4,
560  const A5 & arg5 ) {
561  typedef typename ::std::set< H * >::const_iterator HGroupConstIterator;
562  typedef ::std::map< ::std::string,
563  MethodFunctor6< H, A0, A1, A2, A3, A4, A5 > >
564  FunctorGroup;
565 
566  FunctorGroup result;
567 
568  HGroupConstIterator i = hGroup.begin( );
569  const HGroupConstIterator iEnd = hGroup.end( );
570 
571  for ( ; i != iEnd; ++i ) {
572  H * const h = *i;
573 
574  if ( h == 0 )
575  continue;
576 
577  result.insert(
578  ::std::make_pair(
579  h->doName( ),
580  MethodFunctor6< H, A0, A1, A2, A3, A4, A5 >(
581  h,
582  methodPtr,
583  arg0,
584  arg1,
585  arg2,
586  arg3,
587  arg4,
588  arg5 ) ) );
589  }
590 
591  return result;
592 }
593 
594 template < typename H,
595  typename A0,
596  typename A1,
597  typename A2,
598  typename A3,
599  typename A4,
600  typename A5,
601  typename A6 >
602 ::std::map< ::std::string, MethodFunctor7< H, A0, A1, A2, A3, A4, A5, A6 > >
603 makeHandleMethodFunctorGroup(
604  const ::std::set< H * > & hGroup,
605  void (H::*methodPtr)( A0, A1, A2, A3, A4, A5, A6 ),
606  const A0 & arg0,
607  const A1 & arg1,
608  const A2 & arg2,
609  const A3 & arg3,
610  const A4 & arg4,
611  const A5 & arg5,
612  const A6 & arg6 ) {
613  typedef typename ::std::set< H * >::const_iterator HGroupConstIterator;
614  typedef ::std::map< ::std::string,
615  MethodFunctor7< H, A0, A1, A2, A3, A4, A5, A6 > >
616  FunctorGroup;
617 
618  FunctorGroup result;
619  HGroupConstIterator i = hGroup.begin( );
620  const HGroupConstIterator iEnd = hGroup.end( );
621 
622  for ( ; i != iEnd; ++i ) {
623  H * const h = *i;
624  if ( h == 0 ) continue;
625  result.insert(
626  ::std::make_pair(
627  h->doName( ),
628  MethodFunctor7< H, A0, A1, A2, A3, A4, A5, A6 >(
629  h,
630  methodPtr,
631  arg0,
632  arg1,
633  arg2,
634  arg3,
635  arg4,
636  arg5,
637  arg6 ) ) );
638  }
639  return result;
640 }
641 
642 template < typename H,
643  typename A0,
644  typename A1,
645  typename A2,
646  typename A3,
647  typename A4,
648  typename A5,
649  typename A6,
650  typename A7 >
651 ::std::map< ::std::string, MethodFunctor8< H, A0, A1, A2, A3, A4, A5, A6, A7 > >
652 makeHandleMethodFunctorGroup(
653  const ::std::set< H * > & hGroup,
654  void (H::*methodPtr)(A0, A1, A2, A3, A4, A5, A6, A7 ),
655  const A0 & arg0,
656  const A1 & arg1,
657  const A2 & arg2,
658  const A3 & arg3,
659  const A4 & arg4,
660  const A5 & arg5,
661  const A6 & arg6,
662  const A7 & arg7) {
663  typedef typename ::std::set< H * >::const_iterator HGroupConstIterator;
664  typedef ::std::map< ::std::string,
665  MethodFunctor8< H, A0, A1, A2, A3, A4, A5, A6, A7 > >
666  FunctorGroup;
667 
668  FunctorGroup result;
669  HGroupConstIterator i = hGroup.begin( );
670  const HGroupConstIterator iEnd = hGroup.end( );
671 
672  for ( ; i != iEnd; ++i ) {
673  H * const h = *i;
674  if ( h == 0 ) continue;
675  result.insert(
676  ::std::make_pair(
677  h->doName( ),
678  MethodFunctor8< H, A0, A1, A2, A3, A4, A5, A6, A7 >(
679  h,
680  methodPtr,
681  arg0,
682  arg1,
683  arg2,
684  arg3,
685  arg4,
686  arg5,
687  arg6,
688  arg7 ) ) );
689  }
690  return result;
691 }
692 
693 template < typename H,
694  typename A0,
695  typename A1,
696  typename A2,
697  typename A3,
698  typename A4,
699  typename A5,
700  typename A6,
701  typename A7,
702  typename A8 >
703 ::std::map< ::std::string, MethodFunctor9< H, A0, A1, A2, A3, A4, A5, A6, A7, A8 > >
704 makeHandleMethodFunctorGroup(
705  const ::std::set< H * > & hGroup,
706  void (H::*methodPtr)(A0, A1, A2, A3, A4, A5, A6, A7, A8),
707  const A0 & arg0,
708  const A1 & arg1,
709  const A2 & arg2,
710  const A3 & arg3,
711  const A4 & arg4,
712  const A5 & arg5,
713  const A6 & arg6,
714  const A7 & arg7,
715  const A8& arg8) {
716  typedef typename ::std::set< H * >::const_iterator HGroupConstIterator;
717  typedef ::std::map< ::std::string,
718  MethodFunctor9< H, A0, A1, A2, A3, A4, A5, A6, A7, A8 > >
719  FunctorGroup;
720 
721  FunctorGroup result;
722  HGroupConstIterator i = hGroup.begin( );
723  const HGroupConstIterator iEnd = hGroup.end( );
724 
725  for ( ; i != iEnd; ++i ) {
726  H * const h = *i;
727  if ( h == 0 ) continue;
728  result.insert(
729  ::std::make_pair(
730  h->doName( ),
731  MethodFunctor9< H, A0, A1, A2, A3, A4, A5, A6, A7, A8 >(
732  h,
733  methodPtr,
734  arg0,
735  arg1,
736  arg2,
737  arg3,
738  arg4,
739  arg5,
740  arg6,
741  arg7,
742  arg8) ) );
743  }
744  return result;
745 }
746 
747 template < typename H,
748  typename A0,
749  typename A1,
750  typename A2,
751  typename A3,
752  typename A4,
753  typename A5,
754  typename A6,
755  typename A7,
756  typename A8,
757  typename A9 >
758 ::std::map< ::std::string, MethodFunctor10< H, A0, A1, A2, A3, A4,
759  A5, A6, A7, A8, A9 > >
760 makeHandleMethodFunctorGroup(
761  const ::std::set< H * > & hGroup,
762  void (H::*methodPtr)( A0, A1, A2, A3, A4,
763  A5, A6, A7, A8, A9 ),
764  const A0 & arg0,
765  const A1 & arg1,
766  const A2 & arg2,
767  const A3 & arg3,
768  const A4 & arg4,
769  const A5 & arg5,
770  const A6 & arg6,
771  const A7 & arg7,
772  const A8 & arg8,
773  const A9 & arg9 ) {
774  typedef typename ::std::set< H * >::const_iterator HGroupConstIterator;
775  typedef ::std::map< ::std::string, MethodFunctor10< H, A0, A1, A2, A3, A4,
776  A5, A6, A7, A8, A9 > >
777  FunctorGroup;
778 
779  FunctorGroup result;
780 
781  HGroupConstIterator i = hGroup.begin( );
782  const HGroupConstIterator iEnd = hGroup.end( );
783 
784  for ( ; i != iEnd; ++i ) {
785  H * const h = *i;
786 
787  if ( h == 0 )
788  continue;
789 
790  result.insert(
791  ::std::make_pair(
792  h->doName( ),
793  MethodFunctor10< H, A0, A1, A2, A3, A4,
794  A5, A6, A7, A8, A9 >(
795  h,
796  methodPtr,
797  arg0,
798  arg1,
799  arg2,
800  arg3,
801  arg4,
802  arg5,
803  arg6,
804  arg7,
805  arg8,
806  arg9 ) ) );
807  }
808 
809  return result;
810  }
811 
812 template < typename H,
813  typename A0,
814  typename A1,
815  typename A2,
816  typename A3,
817  typename A4,
818  typename A5,
819  typename A6,
820  typename A7,
821  typename A8,
822  typename A9,
823  typename A10 >
824 ::std::map< ::std::string, MethodFunctor11< H, A0, A1, A2, A3, A4,
825  A5, A6, A7, A8, A9, A10 > >
826 makeHandleMethodFunctorGroup(
827  const ::std::set< H * > & hGroup,
828  void (H::*methodPtr)( A0, A1, A2, A3, A4,
829  A5, A6, A7, A8, A9, A10 ),
830  const A0 & arg0,
831  const A1 & arg1,
832  const A2 & arg2,
833  const A3 & arg3,
834  const A4 & arg4,
835  const A5 & arg5,
836  const A6 & arg6,
837  const A7 & arg7,
838  const A8 & arg8,
839  const A9 & arg9,
840  const A10 & arg10 ) {
841  typedef typename ::std::set< H * >::const_iterator HGroupConstIterator;
842  typedef ::std::map< ::std::string, MethodFunctor11< H, A0, A1, A2, A3, A4,
843  A5, A6, A7, A8, A9, A10 > >
844  FunctorGroup;
845 
846  FunctorGroup result;
847 
848  HGroupConstIterator i = hGroup.begin( );
849  const HGroupConstIterator iEnd = hGroup.end( );
850  for ( ; i != iEnd; ++i ) {
851  H * const h = *i;
852  if ( h == 0 ) continue;
853 
854  result.insert(
855  ::std::make_pair(
856  h->doName( ),
857  MethodFunctor11< H, A0, A1, A2, A3, A4,
858  A5, A6, A7, A8, A9, A10 >(
859  h,
860  methodPtr,
861  arg0,
862  arg1,
863  arg2,
864  arg3,
865  arg4,
866  arg5,
867  arg6,
868  arg7,
869  arg8,
870  arg9,
871  arg10 ) ) );
872  }
873 
874  return result;
875  }
876 
877 template < typename H,
878  typename A0,
879  typename A1,
880  typename A2,
881  typename A3,
882  typename A4,
883  typename A5,
884  typename A6,
885  typename A7,
886  typename A8,
887  typename A9,
888  typename A10,
889  typename A11 >
890 ::std::map< ::std::string, MethodFunctor12< H, A0, A1, A2, A3, A4,
891  A5, A6, A7, A8, A9, A10, A11 > >
892 makeHandleMethodFunctorGroup(
893  const ::std::set< H * > & hGroup,
894  void (H::*methodPtr)(A0, A1, A2, A3, A4,
895  A5, A6, A7, A8, A9, A10, A11),
896  const A0 & arg0,
897  const A1 & arg1,
898  const A2 & arg2,
899  const A3 & arg3,
900  const A4 & arg4,
901  const A5 & arg5,
902  const A6 & arg6,
903  const A7 & arg7,
904  const A8 & arg8,
905  const A9 & arg9,
906  const A10& arg10,
907  const A11& arg11) {
908  typedef typename ::std::set< H * >::const_iterator HGroupConstIterator;
909  typedef ::std::map< ::std::string, MethodFunctor12< H, A0, A1, A2, A3, A4,
910  A5, A6, A7, A8, A9, A10, A11 > >
911  FunctorGroup;
912  FunctorGroup result;
913  HGroupConstIterator i = hGroup.begin( );
914  const HGroupConstIterator iEnd = hGroup.end( );
915  for ( ; i != iEnd; ++i ) {
916  H * const h = *i;
917  if ( h == 0 ) continue;
918 
919  result.insert(
920  ::std::make_pair(
921  h->doName( ),
922  MethodFunctor12< H, A0, A1, A2, A3, A4,
923  A5, A6, A7, A8, A9, A10, A11 >(
924  h,
925  methodPtr,
926  arg0,
927  arg1,
928  arg2,
929  arg3,
930  arg4,
931  arg5,
932  arg6,
933  arg7,
934  arg8,
935  arg9,
936  arg10,
937  arg11) ) );
938  }
939  return result;
940  }
941 
942 template < typename H,
943  typename A0,
944  typename A1,
945  typename A2,
946  typename A3,
947  typename A4,
948  typename A5,
949  typename A6,
950  typename A7,
951  typename A8,
952  typename A9,
953  typename A10,
954  typename A11,
955  typename A12,
956  typename A13,
957  typename A14,
958  typename A15,
959  typename A16,
960  typename A17,
961  typename A18 >
962  ::std::map< ::std::string, MethodFunctor19< H, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18 > >
963 makeHandleMethodFunctorGroup(
964  const ::std::set< H * > & hGroup,
965  void (H::*methodPtr)( A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18 ),
966  const A0 & arg0,
967  const A1 & arg1,
968  const A2 & arg2,
969  const A3 & arg3,
970  const A4 & arg4,
971  const A5 & arg5,
972  const A6 & arg6,
973  const A7 & arg7,
974  const A8 & arg8,
975  const A9 & arg9,
976  const A10 & arg10,
977  const A11 & arg11,
978  const A12 & arg12,
979  const A13 & arg13,
980  const A14 & arg14,
981  const A15 & arg15,
982  const A16 & arg16,
983  const A17 & arg17,
984  const A18 & arg18 ) {
985  typedef typename ::std::set< H * >::const_iterator HGroupConstIterator;
986  typedef ::std::map< ::std::string, MethodFunctor19< H, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18 > >
987  FunctorGroup;
988 
989  FunctorGroup result;
990 
991  HGroupConstIterator i = hGroup.begin( );
992  const HGroupConstIterator iEnd = hGroup.end( );
993 
994  for ( ; i != iEnd; ++i ) {
995  H * const h = *i;
996 
997  if ( h == 0 )
998  continue;
999 
1000  result.insert(
1001  ::std::make_pair(
1002  h->doName( ),
1003  MethodFunctor19< H, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18 >(
1004  h,
1005  methodPtr,
1006  arg0,
1007  arg1,
1008  arg2,
1009  arg3,
1010  arg4,
1011  arg5,
1012  arg6,
1013  arg7,
1014  arg8,
1015  arg9,
1016  arg10,
1017  arg11,
1018  arg12,
1019  arg13,
1020  arg14,
1021  arg15,
1022  arg16,
1023  arg17,
1024  arg18 ) ) );
1025  }
1026 
1027  return result;
1028 }
1029 
1030 
1031 } // namespace carma::control
1032 } // namespace carma
1033 
1034 
1035 #endif