Sauce-0.10.1 A C++ Dependency Injection Framework

- Main Page
- Classes
- Files

- File List

apply_variadic.h
1 // This file was GENERATED by command:
2 // pump.py apply_variadic.h.pump
3 // DO NOT EDIT BY HAND!!!
4
5 #ifndef SAUCE_INTERNAL_APPLY_VARIADIC_H_
6 #define SAUCE_INTERNAL_APPLY_VARIADIC_H_
7
8 namespace sauce {
9 namespace internal {
10
11 template<typename Parameters, typename Signature>
12 class ApplyFunction;
13
14 template<typename Parameters, typename Signature, typename Passed>
15 typename ApplyFunction<Parameters, Signature>::Return applyFunction(
16 typename ApplyFunction<Parameters, Signature>::Function function, Passed passed) {
17 return ApplyFunction<Parameters, Signature>(function).apply(passed);
18 }
19
20 template<typename Parameters, typename Signature, typename Passed>
21 void observeFunction(typename ApplyFunction<Parameters, Signature>::Function function, Passed passed) {
22 ApplyFunction<Parameters, Signature>(function).observe(passed);
23 }
24
25 template<typename Parameters, typename Signature>
26 class ApplyVoidFunction;
27
28 template<typename Parameters, typename Signature, typename Passed>
29 void applyVoidFunction(typename ApplyVoidFunction<Parameters, Signature>::Function function, Passed passed) {
30 (ApplyVoidFunction<Parameters, Signature>(function)).apply(passed);
31 }
32
33 template<typename Parameters, typename Signature>
34 class ApplyMethod;
35
36 template<typename Parameters, typename Signature, typename Passed>
37 typename ApplyMethod<Parameters, Signature>::Return applyMethod(
38 typename ApplyMethod<Parameters, Signature>::Receiver & receiver,
39 typename ApplyMethod<Parameters, Signature>::Method method, Passed passed) {
40 return ApplyMethod<Parameters, Signature>(method).apply(receiver, passed);
41 }
42
43 template<typename Parameters, typename Signature, typename Passed>
44 void observeMethod(typename ApplyMethod<Parameters, Signature>::Method method, Passed passed) {
45 ApplyMethod<Parameters, Signature>(method).observe(passed);
46 }
47
48 template<typename Parameters, typename Constructed_, typename Allocator_>
49 class ApplyConstructor {
50 typedef Constructed_ (Constructor)();
51 typedef typename Allocator_::template rebind<Constructed_>::other Allocator;
52
53 Allocator allocator;
54
55 public:
56
57 typedef Constructed_ Constructed;
58
59 ApplyConstructor():
60 allocator() {}
61
62 static int arity() {
63 return 0;
64 }
65
66 template<typename Passed>
67 Constructed * apply(Passed) {
68 return new(allocator.allocate(1))Constructed();
69 }
70
71 template<typename Passed>
72 void observe(Passed) {}
73 };
74
75 template<typename Parameters, typename Constructor, typename Allocator, typename Passed>
76 typename ApplyConstructor<Parameters, Constructor, Allocator>::Constructed * applyConstructor(Passed passed) {
77 return ApplyConstructor<Parameters, Constructor, Allocator>().apply(passed);
78 }
79
80 template<typename Parameters, typename Constructor, typename Allocator, typename Passed>
81 void observeConstructor(Passed passed) {
82 ApplyConstructor<Parameters, Constructor, Allocator>().observe(passed);
83 }
84
85 /* *INDENT-OFF* */
86 template<typename Parameters, typename Return_>
87 class ApplyFunction<Parameters, Return_(*)()> {
88 public:
89 typedef Return_ Return;
90 typedef Return_ (* Signature)();
91 typedef Return_ (* Function)();
92
93 private:
94 Function function;
95 public:
96
97 ApplyFunction(Function function):
98 function(function) {}
99
100 static int arity() {
101 return 0;
102 }
103
104 template<typename Passed>
105 Return apply(Passed) {
106 return function();
107 }
108
109 template<typename Passed>
110 void observe(Passed) {
111 }
112 };
113 /* *INDENT-ON* */
114
115 /* *INDENT-OFF* */
116 template<typename Parameters>
117 class ApplyVoidFunction<Parameters, void(*)()> {
118 public:
119 typedef void (* Signature)();
120 typedef void (* Function)();
121
122 private:
123 Function function;
124 public:
125
126 ApplyVoidFunction(Function function):
127 function(function) {}
128
129 static int arity() {
130 return 0;
131 }
132
133 template<typename Passed>
134 void apply(Passed) {
135 function();
136 }
137 };
138 /* *INDENT-ON* */
139
140 /* *INDENT-OFF* */
141 template<typename Parameters, typename Return_, typename Receiver_>
142 class ApplyMethod<Parameters, Return_(Receiver_::*)()> {
143 public:
144 typedef Return_ Return;
145 typedef Receiver_ Receiver;
146 typedef Return_ (Receiver_::* Signature)();
147 typedef Return_ (Receiver_::* Method)();
148
149 private:
150 Method method;
151 public:
152
153 ApplyMethod(Method method):
154 method(method) {}
155
156 static int arity() {
157 return 0;
158 }
159
160 template<typename Passed>
161 Return apply(Receiver & receiver, Passed) {
162 return (receiver.*method)();
163 }
164
165 template<typename Passed>
166 void observe(Passed) {
167 }
168 };
169 /* *INDENT-ON* */
170
171 /* *INDENT-OFF* */
172 template<typename Parameters, typename Allocator_, typename Constructed_>
173 class ApplyConstructor<Parameters, Constructed_(), Allocator_> {
174 typedef Constructed_ (Constructor)();
175 typedef typename Allocator_::template rebind<Constructed_>::other Allocator;
176
177 Allocator allocator;
178
179 public:
180
181 typedef Constructed_ Constructed;
182
183 ApplyConstructor():
184 allocator() {}
185
186 static int arity() {
187 return 0;
188 }
189
190 template<typename Passed>
191 Constructed * apply(Passed) {
192 return new(allocator.allocate(1)) Constructed();
193 }
194
195 template<typename Passed>
196 void observe(Passed) {
197 }
198 };
199 /* *INDENT-ON* */
200
201 /* *INDENT-OFF* */
202 template<typename Parameters, typename Return_, typename A0>
203 class ApplyFunction<Parameters, Return_(*)(A0)> {
204 public:
205 typedef Return_ Return;
206 typedef Return_ (* Signature)(A0);
207 typedef Return_ (* Function)(
208 typename Parameters::template Parameter<A0, 0>::Type);
209
210 private:
211 Function function;
212 public:
213
214 ApplyFunction(Function function):
215 function(function) {}
216
217 static int arity() {
218 return 1;
219 }
220
221 template<typename Passed>
222 Return apply(Passed passed) {
223 return function(
224 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed));
225 }
226
227 template<typename Passed>
228 void observe(Passed passed) {
229 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
230 }
231 };
232 /* *INDENT-ON* */
233
234 /* *INDENT-OFF* */
235 template<typename Parameters, typename A0>
236 class ApplyVoidFunction<Parameters, void(*)(A0)> {
237 public:
238 typedef void (* Signature)(A0);
239 typedef void (* Function)(
240 typename Parameters::template Parameter<A0, 0>::Type);
241
242 private:
243 Function function;
244 public:
245
246 ApplyVoidFunction(Function function):
247 function(function) {}
248
249 static int arity() {
250 return 1;
251 }
252
253 template<typename Passed>
254 void apply(Passed passed) {
255 function(
256 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed));
257 }
258 };
259 /* *INDENT-ON* */
260
261 /* *INDENT-OFF* */
262 template<typename Parameters, typename Return_, typename Receiver_, typename A0>
263 class ApplyMethod<Parameters, Return_(Receiver_::*)(A0)> {
264 public:
265 typedef Return_ Return;
266 typedef Receiver_ Receiver;
267 typedef Return_ (Receiver_::* Signature)(A0);
268 typedef Return_ (Receiver_::* Method)(
269 typename Parameters::template Parameter<A0, 0>::Type);
270
271 private:
272 Method method;
273 public:
274
275 ApplyMethod(Method method):
276 method(method) {}
277
278 static int arity() {
279 return 1;
280 }
281
282 template<typename Passed>
283 Return apply(Receiver & receiver, Passed passed) {
284 return (receiver.*method)(
285 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed));
286 }
287
288 template<typename Passed>
289 void observe(Passed passed) {
290 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
291 }
292 };
293 /* *INDENT-ON* */
294
295 /* *INDENT-OFF* */
296 template<typename Parameters, typename Allocator_, typename Constructed_, typename A0>
297 class ApplyConstructor<Parameters, Constructed_(A0), Allocator_> {
298 typedef Constructed_ (Constructor)(A0);
299 typedef typename Allocator_::template rebind<Constructed_>::other Allocator;
300
301 Allocator allocator;
302
303 public:
304
305 typedef Constructed_ Constructed;
306
307 ApplyConstructor():
308 allocator() {}
309
310 static int arity() {
311 return 1;
312 }
313
314 template<typename Passed>
315 Constructed * apply(Passed passed) {
316 return new(allocator.allocate(1)) Constructed(
317 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed));
318 }
319
320 template<typename Passed>
321 void observe(Passed passed) {
322 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
323 }
324 };
325 /* *INDENT-ON* */
326
327 /* *INDENT-OFF* */
328 template<typename Parameters, typename Return_, typename A0, typename A1>
329 class ApplyFunction<Parameters, Return_(*)(A0, A1)> {
330 public:
331 typedef Return_ Return;
332 typedef Return_ (* Signature)(A0, A1);
333 typedef Return_ (* Function)(
334 typename Parameters::template Parameter<A0, 0>::Type,
335 typename Parameters::template Parameter<A1, 1>::Type);
336
337 private:
338 Function function;
339 public:
340
341 ApplyFunction(Function function):
342 function(function) {}
343
344 static int arity() {
345 return 2;
346 }
347
348 template<typename Passed>
349 Return apply(Passed passed) {
350 return function(
351 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
352 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed));
353 }
354
355 template<typename Passed>
356 void observe(Passed passed) {
357 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
358 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
359 }
360 };
361 /* *INDENT-ON* */
362
363 /* *INDENT-OFF* */
364 template<typename Parameters, typename A0, typename A1>
365 class ApplyVoidFunction<Parameters, void(*)(A0, A1)> {
366 public:
367 typedef void (* Signature)(A0, A1);
368 typedef void (* Function)(
369 typename Parameters::template Parameter<A0, 0>::Type,
370 typename Parameters::template Parameter<A1, 1>::Type);
371
372 private:
373 Function function;
374 public:
375
376 ApplyVoidFunction(Function function):
377 function(function) {}
378
379 static int arity() {
380 return 2;
381 }
382
383 template<typename Passed>
384 void apply(Passed passed) {
385 function(
386 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
387 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed));
388 }
389 };
390 /* *INDENT-ON* */
391
392 /* *INDENT-OFF* */
393 template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1>
394 class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1)> {
395 public:
396 typedef Return_ Return;
397 typedef Receiver_ Receiver;
398 typedef Return_ (Receiver_::* Signature)(A0, A1);
399 typedef Return_ (Receiver_::* Method)(
400 typename Parameters::template Parameter<A0, 0>::Type,
401 typename Parameters::template Parameter<A1, 1>::Type);
402
403 private:
404 Method method;
405 public:
406
407 ApplyMethod(Method method):
408 method(method) {}
409
410 static int arity() {
411 return 2;
412 }
413
414 template<typename Passed>
415 Return apply(Receiver & receiver, Passed passed) {
416 return (receiver.*method)(
417 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
418 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed));
419 }
420
421 template<typename Passed>
422 void observe(Passed passed) {
423 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
424 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
425 }
426 };
427 /* *INDENT-ON* */
428
429 /* *INDENT-OFF* */
430 template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1>
431 class ApplyConstructor<Parameters, Constructed_(A0, A1), Allocator_> {
432 typedef Constructed_ (Constructor)(A0, A1);
433 typedef typename Allocator_::template rebind<Constructed_>::other Allocator;
434
435 Allocator allocator;
436
437 public:
438
439 typedef Constructed_ Constructed;
440
441 ApplyConstructor():
442 allocator() {}
443
444 static int arity() {
445 return 2;
446 }
447
448 template<typename Passed>
449 Constructed * apply(Passed passed) {
450 return new(allocator.allocate(1)) Constructed(
451 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
452 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed));
453 }
454
455 template<typename Passed>
456 void observe(Passed passed) {
457 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
458 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
459 }
460 };
461 /* *INDENT-ON* */
462
463 /* *INDENT-OFF* */
464 template<typename Parameters, typename Return_, typename A0, typename A1, typename A2>
465 class ApplyFunction<Parameters, Return_(*)(A0, A1, A2)> {
466 public:
467 typedef Return_ Return;
468 typedef Return_ (* Signature)(A0, A1, A2);
469 typedef Return_ (* Function)(
470 typename Parameters::template Parameter<A0, 0>::Type,
471 typename Parameters::template Parameter<A1, 1>::Type,
472 typename Parameters::template Parameter<A2, 2>::Type);
473
474 private:
475 Function function;
476 public:
477
478 ApplyFunction(Function function):
479 function(function) {}
480
481 static int arity() {
482 return 3;
483 }
484
485 template<typename Passed>
486 Return apply(Passed passed) {
487 return function(
488 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
489 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
490 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed));
491 }
492
493 template<typename Passed>
494 void observe(Passed passed) {
495 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
496 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
497 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
498 }
499 };
500 /* *INDENT-ON* */
501
502 /* *INDENT-OFF* */
503 template<typename Parameters, typename A0, typename A1, typename A2>
504 class ApplyVoidFunction<Parameters, void(*)(A0, A1, A2)> {
505 public:
506 typedef void (* Signature)(A0, A1, A2);
507 typedef void (* Function)(
508 typename Parameters::template Parameter<A0, 0>::Type,
509 typename Parameters::template Parameter<A1, 1>::Type,
510 typename Parameters::template Parameter<A2, 2>::Type);
511
512 private:
513 Function function;
514 public:
515
516 ApplyVoidFunction(Function function):
517 function(function) {}
518
519 static int arity() {
520 return 3;
521 }
522
523 template<typename Passed>
524 void apply(Passed passed) {
525 function(
526 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
527 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
528 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed));
529 }
530 };
531 /* *INDENT-ON* */
532
533 /* *INDENT-OFF* */
534 template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1, typename A2>
535 class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1, A2)> {
536 public:
537 typedef Return_ Return;
538 typedef Receiver_ Receiver;
539 typedef Return_ (Receiver_::* Signature)(A0, A1, A2);
540 typedef Return_ (Receiver_::* Method)(
541 typename Parameters::template Parameter<A0, 0>::Type,
542 typename Parameters::template Parameter<A1, 1>::Type,
543 typename Parameters::template Parameter<A2, 2>::Type);
544
545 private:
546 Method method;
547 public:
548
549 ApplyMethod(Method method):
550 method(method) {}
551
552 static int arity() {
553 return 3;
554 }
555
556 template<typename Passed>
557 Return apply(Receiver & receiver, Passed passed) {
558 return (receiver.*method)(
559 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
560 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
561 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed));
562 }
563
564 template<typename Passed>
565 void observe(Passed passed) {
566 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
567 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
568 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
569 }
570 };
571 /* *INDENT-ON* */
572
573 /* *INDENT-OFF* */
574 template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1, typename A2>
575 class ApplyConstructor<Parameters, Constructed_(A0, A1, A2), Allocator_> {
576 typedef Constructed_ (Constructor)(A0, A1, A2);
577 typedef typename Allocator_::template rebind<Constructed_>::other Allocator;
578
579 Allocator allocator;
580
581 public:
582
583 typedef Constructed_ Constructed;
584
585 ApplyConstructor():
586 allocator() {}
587
588 static int arity() {
589 return 3;
590 }
591
592 template<typename Passed>
593 Constructed * apply(Passed passed) {
594 return new(allocator.allocate(1)) Constructed(
595 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
596 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
597 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed));
598 }
599
600 template<typename Passed>
601 void observe(Passed passed) {
602 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
603 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
604 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
605 }
606 };
607 /* *INDENT-ON* */
608
609 /* *INDENT-OFF* */
610 template<typename Parameters, typename Return_, typename A0, typename A1, typename A2, typename A3>
611 class ApplyFunction<Parameters, Return_(*)(A0, A1, A2, A3)> {
612 public:
613 typedef Return_ Return;
614 typedef Return_ (* Signature)(A0, A1, A2, A3);
615 typedef Return_ (* Function)(
616 typename Parameters::template Parameter<A0, 0>::Type,
617 typename Parameters::template Parameter<A1, 1>::Type,
618 typename Parameters::template Parameter<A2, 2>::Type,
619 typename Parameters::template Parameter<A3, 3>::Type);
620
621 private:
622 Function function;
623 public:
624
625 ApplyFunction(Function function):
626 function(function) {}
627
628 static int arity() {
629 return 4;
630 }
631
632 template<typename Passed>
633 Return apply(Passed passed) {
634 return function(
635 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
636 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
637 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
638 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed));
639 }
640
641 template<typename Passed>
642 void observe(Passed passed) {
643 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
644 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
645 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
646 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
647 }
648 };
649 /* *INDENT-ON* */
650
651 /* *INDENT-OFF* */
652 template<typename Parameters, typename A0, typename A1, typename A2, typename A3>
653 class ApplyVoidFunction<Parameters, void(*)(A0, A1, A2, A3)> {
654 public:
655 typedef void (* Signature)(A0, A1, A2, A3);
656 typedef void (* Function)(
657 typename Parameters::template Parameter<A0, 0>::Type,
658 typename Parameters::template Parameter<A1, 1>::Type,
659 typename Parameters::template Parameter<A2, 2>::Type,
660 typename Parameters::template Parameter<A3, 3>::Type);
661
662 private:
663 Function function;
664 public:
665
666 ApplyVoidFunction(Function function):
667 function(function) {}
668
669 static int arity() {
670 return 4;
671 }
672
673 template<typename Passed>
674 void apply(Passed passed) {
675 function(
676 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
677 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
678 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
679 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed));
680 }
681 };
682 /* *INDENT-ON* */
683
684 /* *INDENT-OFF* */
685 template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1, typename A2, typename A3>
686 class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1, A2, A3)> {
687 public:
688 typedef Return_ Return;
689 typedef Receiver_ Receiver;
690 typedef Return_ (Receiver_::* Signature)(A0, A1, A2, A3);
691 typedef Return_ (Receiver_::* Method)(
692 typename Parameters::template Parameter<A0, 0>::Type,
693 typename Parameters::template Parameter<A1, 1>::Type,
694 typename Parameters::template Parameter<A2, 2>::Type,
695 typename Parameters::template Parameter<A3, 3>::Type);
696
697 private:
698 Method method;
699 public:
700
701 ApplyMethod(Method method):
702 method(method) {}
703
704 static int arity() {
705 return 4;
706 }
707
708 template<typename Passed>
709 Return apply(Receiver & receiver, Passed passed) {
710 return (receiver.*method)(
711 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
712 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
713 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
714 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed));
715 }
716
717 template<typename Passed>
718 void observe(Passed passed) {
719 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
720 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
721 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
722 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
723 }
724 };
725 /* *INDENT-ON* */
726
727 /* *INDENT-OFF* */
728 template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1, typename A2,
729 typename A3>
730 class ApplyConstructor<Parameters, Constructed_(A0, A1, A2, A3), Allocator_> {
731 typedef Constructed_ (Constructor)(A0, A1, A2, A3);
732 typedef typename Allocator_::template rebind<Constructed_>::other Allocator;
733
734 Allocator allocator;
735
736 public:
737
738 typedef Constructed_ Constructed;
739
740 ApplyConstructor():
741 allocator() {}
742
743 static int arity() {
744 return 4;
745 }
746
747 template<typename Passed>
748 Constructed * apply(Passed passed) {
749 return new(allocator.allocate(1)) Constructed(
750 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
751 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
752 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
753 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed));
754 }
755
756 template<typename Passed>
757 void observe(Passed passed) {
758 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
759 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
760 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
761 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
762 }
763 };
764 /* *INDENT-ON* */
765
766 /* *INDENT-OFF* */
767 template<typename Parameters, typename Return_, typename A0, typename A1, typename A2, typename A3, typename A4>
768 class ApplyFunction<Parameters, Return_(*)(A0, A1, A2, A3, A4)> {
769 public:
770 typedef Return_ Return;
771 typedef Return_ (* Signature)(A0, A1, A2, A3, A4);
772 typedef Return_ (* Function)(
773 typename Parameters::template Parameter<A0, 0>::Type,
774 typename Parameters::template Parameter<A1, 1>::Type,
775 typename Parameters::template Parameter<A2, 2>::Type,
776 typename Parameters::template Parameter<A3, 3>::Type,
777 typename Parameters::template Parameter<A4, 4>::Type);
778
779 private:
780 Function function;
781 public:
782
783 ApplyFunction(Function function):
784 function(function) {}
785
786 static int arity() {
787 return 5;
788 }
789
790 template<typename Passed>
791 Return apply(Passed passed) {
792 return function(
793 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
794 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
795 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
796 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
797 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed));
798 }
799
800 template<typename Passed>
801 void observe(Passed passed) {
802 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
803 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
804 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
805 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
806 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
807 }
808 };
809 /* *INDENT-ON* */
810
811 /* *INDENT-OFF* */
812 template<typename Parameters, typename A0, typename A1, typename A2, typename A3, typename A4>
813 class ApplyVoidFunction<Parameters, void(*)(A0, A1, A2, A3, A4)> {
814 public:
815 typedef void (* Signature)(A0, A1, A2, A3, A4);
816 typedef void (* Function)(
817 typename Parameters::template Parameter<A0, 0>::Type,
818 typename Parameters::template Parameter<A1, 1>::Type,
819 typename Parameters::template Parameter<A2, 2>::Type,
820 typename Parameters::template Parameter<A3, 3>::Type,
821 typename Parameters::template Parameter<A4, 4>::Type);
822
823 private:
824 Function function;
825 public:
826
827 ApplyVoidFunction(Function function):
828 function(function) {}
829
830 static int arity() {
831 return 5;
832 }
833
834 template<typename Passed>
835 void apply(Passed passed) {
836 function(
837 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
838 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
839 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
840 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
841 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed));
842 }
843 };
844 /* *INDENT-ON* */
845
846 /* *INDENT-OFF* */
847 template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1, typename A2, typename A3,
848 typename A4>
849 class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1, A2, A3, A4)> {
850 public:
851 typedef Return_ Return;
852 typedef Receiver_ Receiver;
853 typedef Return_ (Receiver_::* Signature)(A0, A1, A2, A3, A4);
854 typedef Return_ (Receiver_::* Method)(
855 typename Parameters::template Parameter<A0, 0>::Type,
856 typename Parameters::template Parameter<A1, 1>::Type,
857 typename Parameters::template Parameter<A2, 2>::Type,
858 typename Parameters::template Parameter<A3, 3>::Type,
859 typename Parameters::template Parameter<A4, 4>::Type);
860
861 private:
862 Method method;
863 public:
864
865 ApplyMethod(Method method):
866 method(method) {}
867
868 static int arity() {
869 return 5;
870 }
871
872 template<typename Passed>
873 Return apply(Receiver & receiver, Passed passed) {
874 return (receiver.*method)(
875 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
876 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
877 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
878 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
879 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed));
880 }
881
882 template<typename Passed>
883 void observe(Passed passed) {
884 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
885 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
886 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
887 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
888 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
889 }
890 };
891 /* *INDENT-ON* */
892
893 /* *INDENT-OFF* */
894 template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1, typename A2,
895 typename A3, typename A4>
896 class ApplyConstructor<Parameters, Constructed_(A0, A1, A2, A3, A4), Allocator_> {
897 typedef Constructed_ (Constructor)(A0, A1, A2, A3, A4);
898 typedef typename Allocator_::template rebind<Constructed_>::other Allocator;
899
900 Allocator allocator;
901
902 public:
903
904 typedef Constructed_ Constructed;
905
906 ApplyConstructor():
907 allocator() {}
908
909 static int arity() {
910 return 5;
911 }
912
913 template<typename Passed>
914 Constructed * apply(Passed passed) {
915 return new(allocator.allocate(1)) Constructed(
916 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
917 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
918 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
919 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
920 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed));
921 }
922
923 template<typename Passed>
924 void observe(Passed passed) {
925 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
926 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
927 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
928 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
929 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
930 }
931 };
932 /* *INDENT-ON* */
933
934 /* *INDENT-OFF* */
935 template<typename Parameters, typename Return_, typename A0, typename A1, typename A2, typename A3, typename A4,
936 typename A5>
937 class ApplyFunction<Parameters, Return_(*)(A0, A1, A2, A3, A4, A5)> {
938 public:
939 typedef Return_ Return;
940 typedef Return_ (* Signature)(A0, A1, A2, A3, A4, A5);
941 typedef Return_ (* Function)(
942 typename Parameters::template Parameter<A0, 0>::Type,
943 typename Parameters::template Parameter<A1, 1>::Type,
944 typename Parameters::template Parameter<A2, 2>::Type,
945 typename Parameters::template Parameter<A3, 3>::Type,
946 typename Parameters::template Parameter<A4, 4>::Type,
947 typename Parameters::template Parameter<A5, 5>::Type);
948
949 private:
950 Function function;
951 public:
952
953 ApplyFunction(Function function):
954 function(function) {}
955
956 static int arity() {
957 return 6;
958 }
959
960 template<typename Passed>
961 Return apply(Passed passed) {
962 return function(
963 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
964 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
965 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
966 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
967 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
968 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed));
969 }
970
971 template<typename Passed>
972 void observe(Passed passed) {
973 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
974 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
975 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
976 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
977 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
978 (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
979 }
980 };
981 /* *INDENT-ON* */
982
983 /* *INDENT-OFF* */
984 template<typename Parameters, typename A0, typename A1, typename A2, typename A3, typename A4, typename A5>
985 class ApplyVoidFunction<Parameters, void(*)(A0, A1, A2, A3, A4, A5)> {
986 public:
987 typedef void (* Signature)(A0, A1, A2, A3, A4, A5);
988 typedef void (* Function)(
989 typename Parameters::template Parameter<A0, 0>::Type,
990 typename Parameters::template Parameter<A1, 1>::Type,
991 typename Parameters::template Parameter<A2, 2>::Type,
992 typename Parameters::template Parameter<A3, 3>::Type,
993 typename Parameters::template Parameter<A4, 4>::Type,
994 typename Parameters::template Parameter<A5, 5>::Type);
995
996 private:
997 Function function;
998 public:
999
1000 ApplyVoidFunction(Function function):
1001 function(function) {}
1002
1003 static int arity() {
1004 return 6;
1005 }
1006
1007 template<typename Passed>
1008 void apply(Passed passed) {
1009 function(
1010 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1011 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1012 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1013 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1014 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1015 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed));
1016 }
1017 };
1018 /* *INDENT-ON* */
1019
1020 /* *INDENT-OFF* */
1021 template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1, typename A2, typename A3,
1022 typename A4, typename A5>
1023 class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1, A2, A3, A4, A5)> {
1024 public:
1025 typedef Return_ Return;
1026 typedef Receiver_ Receiver;
1027 typedef Return_ (Receiver_::* Signature)(A0, A1, A2, A3, A4, A5);
1028 typedef Return_ (Receiver_::* Method)(
1029 typename Parameters::template Parameter<A0, 0>::Type,
1030 typename Parameters::template Parameter<A1, 1>::Type,
1031 typename Parameters::template Parameter<A2, 2>::Type,
1032 typename Parameters::template Parameter<A3, 3>::Type,
1033 typename Parameters::template Parameter<A4, 4>::Type,
1034 typename Parameters::template Parameter<A5, 5>::Type);
1035
1036 private:
1037 Method method;
1038 public:
1039
1040 ApplyMethod(Method method):
1041 method(method) {}
1042
1043 static int arity() {
1044 return 6;
1045 }
1046
1047 template<typename Passed>
1048 Return apply(Receiver & receiver, Passed passed) {
1049 return (receiver.*method)(
1050 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1051 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1052 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1053 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1054 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1055 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed));
1056 }
1057
1058 template<typename Passed>
1059 void observe(Passed passed) {
1060 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
1061 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
1062 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
1063 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
1064 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
1065 (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
1066 }
1067 };
1068 /* *INDENT-ON* */
1069
1070 /* *INDENT-OFF* */
1071 template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1, typename A2,
1072 typename A3, typename A4, typename A5>
1073 class ApplyConstructor<Parameters, Constructed_(A0, A1, A2, A3, A4, A5), Allocator_> {
1074 typedef Constructed_ (Constructor)(A0, A1, A2, A3, A4, A5);
1075 typedef typename Allocator_::template rebind<Constructed_>::other Allocator;
1076
1077 Allocator allocator;
1078
1079 public:
1080
1081 typedef Constructed_ Constructed;
1082
1083 ApplyConstructor():
1084 allocator() {}
1085
1086 static int arity() {
1087 return 6;
1088 }
1089
1090 template<typename Passed>
1091 Constructed * apply(Passed passed) {
1092 return new(allocator.allocate(1)) Constructed(
1093 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1094 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1095 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1096 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1097 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1098 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed));
1099 }
1100
1101 template<typename Passed>
1102 void observe(Passed passed) {
1103 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
1104 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
1105 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
1106 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
1107 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
1108 (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
1109 }
1110 };
1111 /* *INDENT-ON* */
1112
1113 /* *INDENT-OFF* */
1114 template<typename Parameters, typename Return_, typename A0, typename A1, typename A2, typename A3, typename A4,
1115 typename A5, typename A6>
1116 class ApplyFunction<Parameters, Return_(*)(A0, A1, A2, A3, A4, A5, A6)> {
1117 public:
1118 typedef Return_ Return;
1119 typedef Return_ (* Signature)(A0, A1, A2, A3, A4, A5, A6);
1120 typedef Return_ (* Function)(
1121 typename Parameters::template Parameter<A0, 0>::Type,
1122 typename Parameters::template Parameter<A1, 1>::Type,
1123 typename Parameters::template Parameter<A2, 2>::Type,
1124 typename Parameters::template Parameter<A3, 3>::Type,
1125 typename Parameters::template Parameter<A4, 4>::Type,
1126 typename Parameters::template Parameter<A5, 5>::Type,
1127 typename Parameters::template Parameter<A6, 6>::Type);
1128
1129 private:
1130 Function function;
1131 public:
1132
1133 ApplyFunction(Function function):
1134 function(function) {}
1135
1136 static int arity() {
1137 return 7;
1138 }
1139
1140 template<typename Passed>
1141 Return apply(Passed passed) {
1142 return function(
1143 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1144 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1145 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1146 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1147 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1148 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
1149 (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed));
1150 }
1151
1152 template<typename Passed>
1153 void observe(Passed passed) {
1154 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
1155 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
1156 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
1157 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
1158 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
1159 (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
1160 (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
1161 }
1162 };
1163 /* *INDENT-ON* */
1164
1165 /* *INDENT-OFF* */
1166 template<typename Parameters, typename A0, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
1167 class ApplyVoidFunction<Parameters, void(*)(A0, A1, A2, A3, A4, A5, A6)> {
1168 public:
1169 typedef void (* Signature)(A0, A1, A2, A3, A4, A5, A6);
1170 typedef void (* Function)(
1171 typename Parameters::template Parameter<A0, 0>::Type,
1172 typename Parameters::template Parameter<A1, 1>::Type,
1173 typename Parameters::template Parameter<A2, 2>::Type,
1174 typename Parameters::template Parameter<A3, 3>::Type,
1175 typename Parameters::template Parameter<A4, 4>::Type,
1176 typename Parameters::template Parameter<A5, 5>::Type,
1177 typename Parameters::template Parameter<A6, 6>::Type);
1178
1179 private:
1180 Function function;
1181 public:
1182
1183 ApplyVoidFunction(Function function):
1184 function(function) {}
1185
1186 static int arity() {
1187 return 7;
1188 }
1189
1190 template<typename Passed>
1191 void apply(Passed passed) {
1192 function(
1193 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1194 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1195 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1196 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1197 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1198 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
1199 (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed));
1200 }
1201 };
1202 /* *INDENT-ON* */
1203
1204 /* *INDENT-OFF* */
1205 template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1, typename A2, typename A3,
1206 typename A4, typename A5, typename A6>
1207 class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1, A2, A3, A4, A5, A6)> {
1208 public:
1209 typedef Return_ Return;
1210 typedef Receiver_ Receiver;
1211 typedef Return_ (Receiver_::* Signature)(A0, A1, A2, A3, A4, A5, A6);
1212 typedef Return_ (Receiver_::* Method)(
1213 typename Parameters::template Parameter<A0, 0>::Type,
1214 typename Parameters::template Parameter<A1, 1>::Type,
1215 typename Parameters::template Parameter<A2, 2>::Type,
1216 typename Parameters::template Parameter<A3, 3>::Type,
1217 typename Parameters::template Parameter<A4, 4>::Type,
1218 typename Parameters::template Parameter<A5, 5>::Type,
1219 typename Parameters::template Parameter<A6, 6>::Type);
1220
1221 private:
1222 Method method;
1223 public:
1224
1225 ApplyMethod(Method method):
1226 method(method) {}
1227
1228 static int arity() {
1229 return 7;
1230 }
1231
1232 template<typename Passed>
1233 Return apply(Receiver & receiver, Passed passed) {
1234 return (receiver.*method)(
1235 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1236 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1237 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1238 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1239 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1240 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
1241 (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed));
1242 }
1243
1244 template<typename Passed>
1245 void observe(Passed passed) {
1246 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
1247 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
1248 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
1249 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
1250 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
1251 (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
1252 (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
1253 }
1254 };
1255 /* *INDENT-ON* */
1256
1257 /* *INDENT-OFF* */
1258 template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1, typename A2,
1259 typename A3, typename A4, typename A5, typename A6>
1260 class ApplyConstructor<Parameters, Constructed_(A0, A1, A2, A3, A4, A5, A6), Allocator_> {
1261 typedef Constructed_ (Constructor)(A0, A1, A2, A3, A4, A5, A6);
1262 typedef typename Allocator_::template rebind<Constructed_>::other Allocator;
1263
1264 Allocator allocator;
1265
1266 public:
1267
1268 typedef Constructed_ Constructed;
1269
1270 ApplyConstructor():
1271 allocator() {}
1272
1273 static int arity() {
1274 return 7;
1275 }
1276
1277 template<typename Passed>
1278 Constructed * apply(Passed passed) {
1279 return new(allocator.allocate(1)) Constructed(
1280 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1281 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1282 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1283 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1284 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1285 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
1286 (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed));
1287 }
1288
1289 template<typename Passed>
1290 void observe(Passed passed) {
1291 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
1292 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
1293 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
1294 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
1295 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
1296 (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
1297 (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
1298 }
1299 };
1300 /* *INDENT-ON* */
1301
1302 /* *INDENT-OFF* */
1303 template<typename Parameters, typename Return_, typename A0, typename A1, typename A2, typename A3, typename A4,
1304 typename A5, typename A6, typename A7>
1305 class ApplyFunction<Parameters, Return_(*)(A0, A1, A2, A3, A4, A5, A6, A7)> {
1306 public:
1307 typedef Return_ Return;
1308 typedef Return_ (* Signature)(A0, A1, A2, A3, A4, A5, A6, A7);
1309 typedef Return_ (* Function)(
1310 typename Parameters::template Parameter<A0, 0>::Type,
1311 typename Parameters::template Parameter<A1, 1>::Type,
1312 typename Parameters::template Parameter<A2, 2>::Type,
1313 typename Parameters::template Parameter<A3, 3>::Type,
1314 typename Parameters::template Parameter<A4, 4>::Type,
1315 typename Parameters::template Parameter<A5, 5>::Type,
1316 typename Parameters::template Parameter<A6, 6>::Type,
1317 typename Parameters::template Parameter<A7, 7>::Type);
1318
1319 private:
1320 Function function;
1321 public:
1322
1323 ApplyFunction(Function function):
1324 function(function) {}
1325
1326 static int arity() {
1327 return 8;
1328 }
1329
1330 template<typename Passed>
1331 Return apply(Passed passed) {
1332 return function(
1333 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1334 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1335 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1336 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1337 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1338 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
1339 (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
1340 (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed));
1341 }
1342
1343 template<typename Passed>
1344 void observe(Passed passed) {
1345 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
1346 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
1347 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
1348 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
1349 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
1350 (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
1351 (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
1352 (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
1353 }
1354 };
1355 /* *INDENT-ON* */
1356
1357 /* *INDENT-OFF* */
1358 template<typename Parameters, typename A0, typename A1, typename A2, typename A3, typename A4, typename A5,
1359 typename A6, typename A7>
1360 class ApplyVoidFunction<Parameters, void(*)(A0, A1, A2, A3, A4, A5, A6, A7)> {
1361 public:
1362 typedef void (* Signature)(A0, A1, A2, A3, A4, A5, A6, A7);
1363 typedef void (* Function)(
1364 typename Parameters::template Parameter<A0, 0>::Type,
1365 typename Parameters::template Parameter<A1, 1>::Type,
1366 typename Parameters::template Parameter<A2, 2>::Type,
1367 typename Parameters::template Parameter<A3, 3>::Type,
1368 typename Parameters::template Parameter<A4, 4>::Type,
1369 typename Parameters::template Parameter<A5, 5>::Type,
1370 typename Parameters::template Parameter<A6, 6>::Type,
1371 typename Parameters::template Parameter<A7, 7>::Type);
1372
1373 private:
1374 Function function;
1375 public:
1376
1377 ApplyVoidFunction(Function function):
1378 function(function) {}
1379
1380 static int arity() {
1381 return 8;
1382 }
1383
1384 template<typename Passed>
1385 void apply(Passed passed) {
1386 function(
1387 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1388 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1389 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1390 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1391 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1392 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
1393 (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
1394 (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed));
1395 }
1396 };
1397 /* *INDENT-ON* */
1398
1399 /* *INDENT-OFF* */
1400 template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1, typename A2, typename A3,
1401 typename A4, typename A5, typename A6, typename A7>
1402 class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1, A2, A3, A4, A5, A6, A7)> {
1403 public:
1404 typedef Return_ Return;
1405 typedef Receiver_ Receiver;
1406 typedef Return_ (Receiver_::* Signature)(A0, A1, A2, A3, A4, A5, A6, A7);
1407 typedef Return_ (Receiver_::* Method)(
1408 typename Parameters::template Parameter<A0, 0>::Type,
1409 typename Parameters::template Parameter<A1, 1>::Type,
1410 typename Parameters::template Parameter<A2, 2>::Type,
1411 typename Parameters::template Parameter<A3, 3>::Type,
1412 typename Parameters::template Parameter<A4, 4>::Type,
1413 typename Parameters::template Parameter<A5, 5>::Type,
1414 typename Parameters::template Parameter<A6, 6>::Type,
1415 typename Parameters::template Parameter<A7, 7>::Type);
1416
1417 private:
1418 Method method;
1419 public:
1420
1421 ApplyMethod(Method method):
1422 method(method) {}
1423
1424 static int arity() {
1425 return 8;
1426 }
1427
1428 template<typename Passed>
1429 Return apply(Receiver & receiver, Passed passed) {
1430 return (receiver.*method)(
1431 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1432 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1433 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1434 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1435 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1436 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
1437 (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
1438 (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed));
1439 }
1440
1441 template<typename Passed>
1442 void observe(Passed passed) {
1443 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
1444 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
1445 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
1446 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
1447 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
1448 (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
1449 (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
1450 (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
1451 }
1452 };
1453 /* *INDENT-ON* */
1454
1455 /* *INDENT-OFF* */
1456 template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1, typename A2,
1457 typename A3, typename A4, typename A5, typename A6, typename A7>
1458 class ApplyConstructor<Parameters, Constructed_(A0, A1, A2, A3, A4, A5, A6, A7), Allocator_> {
1459 typedef Constructed_ (Constructor)(A0, A1, A2, A3, A4, A5, A6, A7);
1460 typedef typename Allocator_::template rebind<Constructed_>::other Allocator;
1461
1462 Allocator allocator;
1463
1464 public:
1465
1466 typedef Constructed_ Constructed;
1467
1468 ApplyConstructor():
1469 allocator() {}
1470
1471 static int arity() {
1472 return 8;
1473 }
1474
1475 template<typename Passed>
1476 Constructed * apply(Passed passed) {
1477 return new(allocator.allocate(1)) Constructed(
1478 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1479 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1480 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1481 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1482 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1483 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
1484 (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
1485 (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed));
1486 }
1487
1488 template<typename Passed>
1489 void observe(Passed passed) {
1490 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
1491 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
1492 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
1493 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
1494 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
1495 (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
1496 (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
1497 (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
1498 }
1499 };
1500 /* *INDENT-ON* */
1501
1502 /* *INDENT-OFF* */
1503 template<typename Parameters, typename Return_, typename A0, typename A1, typename A2, typename A3, typename A4,
1504 typename A5, typename A6, typename A7, typename A8>
1505 class ApplyFunction<Parameters, Return_(*)(A0, A1, A2, A3, A4, A5, A6, A7, A8)> {
1506 public:
1507 typedef Return_ Return;
1508 typedef Return_ (* Signature)(A0, A1, A2, A3, A4, A5, A6, A7, A8);
1509 typedef Return_ (* Function)(
1510 typename Parameters::template Parameter<A0, 0>::Type,
1511 typename Parameters::template Parameter<A1, 1>::Type,
1512 typename Parameters::template Parameter<A2, 2>::Type,
1513 typename Parameters::template Parameter<A3, 3>::Type,
1514 typename Parameters::template Parameter<A4, 4>::Type,
1515 typename Parameters::template Parameter<A5, 5>::Type,
1516 typename Parameters::template Parameter<A6, 6>::Type,
1517 typename Parameters::template Parameter<A7, 7>::Type,
1518 typename Parameters::template Parameter<A8, 8>::Type);
1519
1520 private:
1521 Function function;
1522 public:
1523
1524 ApplyFunction(Function function):
1525 function(function) {}
1526
1527 static int arity() {
1528 return 9;
1529 }
1530
1531 template<typename Passed>
1532 Return apply(Passed passed) {
1533 return function(
1534 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1535 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1536 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1537 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1538 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1539 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
1540 (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
1541 (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed),
1542 (typename Parameters::template Parameter<A8, 8>()).template yield<Passed>(passed));
1543 }
1544
1545 template<typename Passed>
1546 void observe(Passed passed) {
1547 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
1548 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
1549 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
1550 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
1551 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
1552 (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
1553 (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
1554 (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
1555 (typename Parameters::template Parameter<A8, 8>()).template observe<Passed>(passed);
1556 }
1557 };
1558 /* *INDENT-ON* */
1559
1560 /* *INDENT-OFF* */
1561 template<typename Parameters, typename A0, typename A1, typename A2, typename A3, typename A4, typename A5,
1562 typename A6, typename A7, typename A8>
1563 class ApplyVoidFunction<Parameters, void(*)(A0, A1, A2, A3, A4, A5, A6, A7, A8)> {
1564 public:
1565 typedef void (* Signature)(A0, A1, A2, A3, A4, A5, A6, A7, A8);
1566 typedef void (* Function)(
1567 typename Parameters::template Parameter<A0, 0>::Type,
1568 typename Parameters::template Parameter<A1, 1>::Type,
1569 typename Parameters::template Parameter<A2, 2>::Type,
1570 typename Parameters::template Parameter<A3, 3>::Type,
1571 typename Parameters::template Parameter<A4, 4>::Type,
1572 typename Parameters::template Parameter<A5, 5>::Type,
1573 typename Parameters::template Parameter<A6, 6>::Type,
1574 typename Parameters::template Parameter<A7, 7>::Type,
1575 typename Parameters::template Parameter<A8, 8>::Type);
1576
1577 private:
1578 Function function;
1579 public:
1580
1581 ApplyVoidFunction(Function function):
1582 function(function) {}
1583
1584 static int arity() {
1585 return 9;
1586 }
1587
1588 template<typename Passed>
1589 void apply(Passed passed) {
1590 function(
1591 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1592 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1593 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1594 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1595 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1596 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
1597 (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
1598 (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed),
1599 (typename Parameters::template Parameter<A8, 8>()).template yield<Passed>(passed));
1600 }
1601 };
1602 /* *INDENT-ON* */
1603
1604 /* *INDENT-OFF* */
1605 template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1, typename A2, typename A3,
1606 typename A4, typename A5, typename A6, typename A7, typename A8>
1607 class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1, A2, A3, A4, A5, A6, A7, A8)> {
1608 public:
1609 typedef Return_ Return;
1610 typedef Receiver_ Receiver;
1611 typedef Return_ (Receiver_::* Signature)(A0, A1, A2, A3, A4, A5, A6, A7, A8);
1612 typedef Return_ (Receiver_::* Method)(
1613 typename Parameters::template Parameter<A0, 0>::Type,
1614 typename Parameters::template Parameter<A1, 1>::Type,
1615 typename Parameters::template Parameter<A2, 2>::Type,
1616 typename Parameters::template Parameter<A3, 3>::Type,
1617 typename Parameters::template Parameter<A4, 4>::Type,
1618 typename Parameters::template Parameter<A5, 5>::Type,
1619 typename Parameters::template Parameter<A6, 6>::Type,
1620 typename Parameters::template Parameter<A7, 7>::Type,
1621 typename Parameters::template Parameter<A8, 8>::Type);
1622
1623 private:
1624 Method method;
1625 public:
1626
1627 ApplyMethod(Method method):
1628 method(method) {}
1629
1630 static int arity() {
1631 return 9;
1632 }
1633
1634 template<typename Passed>
1635 Return apply(Receiver & receiver, Passed passed) {
1636 return (receiver.*method)(
1637 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1638 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1639 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1640 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1641 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1642 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
1643 (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
1644 (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed),
1645 (typename Parameters::template Parameter<A8, 8>()).template yield<Passed>(passed));
1646 }
1647
1648 template<typename Passed>
1649 void observe(Passed passed) {
1650 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
1651 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
1652 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
1653 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
1654 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
1655 (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
1656 (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
1657 (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
1658 (typename Parameters::template Parameter<A8, 8>()).template observe<Passed>(passed);
1659 }
1660 };
1661 /* *INDENT-ON* */
1662
1663 /* *INDENT-OFF* */
1664 template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1, typename A2,
1665 typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
1666 class ApplyConstructor<Parameters, Constructed_(A0, A1, A2, A3, A4, A5, A6, A7, A8), Allocator_> {
1667 typedef Constructed_ (Constructor)(A0, A1, A2, A3, A4, A5, A6, A7, A8);
1668 typedef typename Allocator_::template rebind<Constructed_>::other Allocator;
1669
1670 Allocator allocator;
1671
1672 public:
1673
1674 typedef Constructed_ Constructed;
1675
1676 ApplyConstructor():
1677 allocator() {}
1678
1679 static int arity() {
1680 return 9;
1681 }
1682
1683 template<typename Passed>
1684 Constructed * apply(Passed passed) {
1685 return new(allocator.allocate(1)) Constructed(
1686 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1687 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1688 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1689 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1690 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1691 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
1692 (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
1693 (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed),
1694 (typename Parameters::template Parameter<A8, 8>()).template yield<Passed>(passed));
1695 }
1696
1697 template<typename Passed>
1698 void observe(Passed passed) {
1699 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
1700 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
1701 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
1702 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
1703 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
1704 (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
1705 (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
1706 (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
1707 (typename Parameters::template Parameter<A8, 8>()).template observe<Passed>(passed);
1708 }
1709 };
1710 /* *INDENT-ON* */
1711
1712 /* *INDENT-OFF* */
1713 template<typename Parameters, typename Return_, typename A0, typename A1, typename A2, typename A3, typename A4,
1714 typename A5, typename A6, typename A7, typename A8, typename A9>
1715 class ApplyFunction<Parameters, Return_(*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
1716 public:
1717 typedef Return_ Return;
1718 typedef Return_ (* Signature)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9);
1719 typedef Return_ (* Function)(
1720 typename Parameters::template Parameter<A0, 0>::Type,
1721 typename Parameters::template Parameter<A1, 1>::Type,
1722 typename Parameters::template Parameter<A2, 2>::Type,
1723 typename Parameters::template Parameter<A3, 3>::Type,
1724 typename Parameters::template Parameter<A4, 4>::Type,
1725 typename Parameters::template Parameter<A5, 5>::Type,
1726 typename Parameters::template Parameter<A6, 6>::Type,
1727 typename Parameters::template Parameter<A7, 7>::Type,
1728 typename Parameters::template Parameter<A8, 8>::Type,
1729 typename Parameters::template Parameter<A9, 9>::Type);
1730
1731 private:
1732 Function function;
1733 public:
1734
1735 ApplyFunction(Function function):
1736 function(function) {}
1737
1738 static int arity() {
1739 return 10;
1740 }
1741
1742 template<typename Passed>
1743 Return apply(Passed passed) {
1744 return function(
1745 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1746 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1747 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1748 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1749 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1750 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
1751 (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
1752 (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed),
1753 (typename Parameters::template Parameter<A8, 8>()).template yield<Passed>(passed),
1754 (typename Parameters::template Parameter<A9, 9>()).template yield<Passed>(passed));
1755 }
1756
1757 template<typename Passed>
1758 void observe(Passed passed) {
1759 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
1760 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
1761 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
1762 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
1763 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
1764 (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
1765 (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
1766 (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
1767 (typename Parameters::template Parameter<A8, 8>()).template observe<Passed>(passed);
1768 (typename Parameters::template Parameter<A9, 9>()).template observe<Passed>(passed);
1769 }
1770 };
1771 /* *INDENT-ON* */
1772
1773 /* *INDENT-OFF* */
1774 template<typename Parameters, typename A0, typename A1, typename A2, typename A3, typename A4, typename A5,
1775 typename A6, typename A7, typename A8, typename A9>
1776 class ApplyVoidFunction<Parameters, void(*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
1777 public:
1778 typedef void (* Signature)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9);
1779 typedef void (* Function)(
1780 typename Parameters::template Parameter<A0, 0>::Type,
1781 typename Parameters::template Parameter<A1, 1>::Type,
1782 typename Parameters::template Parameter<A2, 2>::Type,
1783 typename Parameters::template Parameter<A3, 3>::Type,
1784 typename Parameters::template Parameter<A4, 4>::Type,
1785 typename Parameters::template Parameter<A5, 5>::Type,
1786 typename Parameters::template Parameter<A6, 6>::Type,
1787 typename Parameters::template Parameter<A7, 7>::Type,
1788 typename Parameters::template Parameter<A8, 8>::Type,
1789 typename Parameters::template Parameter<A9, 9>::Type);
1790
1791 private:
1792 Function function;
1793 public:
1794
1795 ApplyVoidFunction(Function function):
1796 function(function) {}
1797
1798 static int arity() {
1799 return 10;
1800 }
1801
1802 template<typename Passed>
1803 void apply(Passed passed) {
1804 function(
1805 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1806 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1807 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1808 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1809 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1810 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
1811 (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
1812 (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed),
1813 (typename Parameters::template Parameter<A8, 8>()).template yield<Passed>(passed),
1814 (typename Parameters::template Parameter<A9, 9>()).template yield<Passed>(passed));
1815 }
1816 };
1817 /* *INDENT-ON* */
1818
1819 /* *INDENT-OFF* */
1820 template<typename Parameters, typename Return_, typename Receiver_, typename A0, typename A1, typename A2, typename A3,
1821 typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
1822 class ApplyMethod<Parameters, Return_(Receiver_::*)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
1823 public:
1824 typedef Return_ Return;
1825 typedef Receiver_ Receiver;
1826 typedef Return_ (Receiver_::* Signature)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9);
1827 typedef Return_ (Receiver_::* Method)(
1828 typename Parameters::template Parameter<A0, 0>::Type,
1829 typename Parameters::template Parameter<A1, 1>::Type,
1830 typename Parameters::template Parameter<A2, 2>::Type,
1831 typename Parameters::template Parameter<A3, 3>::Type,
1832 typename Parameters::template Parameter<A4, 4>::Type,
1833 typename Parameters::template Parameter<A5, 5>::Type,
1834 typename Parameters::template Parameter<A6, 6>::Type,
1835 typename Parameters::template Parameter<A7, 7>::Type,
1836 typename Parameters::template Parameter<A8, 8>::Type,
1837 typename Parameters::template Parameter<A9, 9>::Type);
1838
1839 private:
1840 Method method;
1841 public:
1842
1843 ApplyMethod(Method method):
1844 method(method) {}
1845
1846 static int arity() {
1847 return 10;
1848 }
1849
1850 template<typename Passed>
1851 Return apply(Receiver & receiver, Passed passed) {
1852 return (receiver.*method)(
1853 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1854 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1855 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1856 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1857 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1858 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
1859 (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
1860 (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed),
1861 (typename Parameters::template Parameter<A8, 8>()).template yield<Passed>(passed),
1862 (typename Parameters::template Parameter<A9, 9>()).template yield<Passed>(passed));
1863 }
1864
1865 template<typename Passed>
1866 void observe(Passed passed) {
1867 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
1868 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
1869 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
1870 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
1871 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
1872 (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
1873 (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
1874 (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
1875 (typename Parameters::template Parameter<A8, 8>()).template observe<Passed>(passed);
1876 (typename Parameters::template Parameter<A9, 9>()).template observe<Passed>(passed);
1877 }
1878 };
1879 /* *INDENT-ON* */
1880
1881 /* *INDENT-OFF* */
1882 template<typename Parameters, typename Allocator_, typename Constructed_, typename A0, typename A1, typename A2,
1883 typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
1884 class ApplyConstructor<Parameters, Constructed_(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9), Allocator_> {
1885 typedef Constructed_ (Constructor)(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9);
1886 typedef typename Allocator_::template rebind<Constructed_>::other Allocator;
1887
1888 Allocator allocator;
1889
1890 public:
1891
1892 typedef Constructed_ Constructed;
1893
1894 ApplyConstructor():
1895 allocator() {}
1896
1897 static int arity() {
1898 return 10;
1899 }
1900
1901 template<typename Passed>
1902 Constructed * apply(Passed passed) {
1903 return new(allocator.allocate(1)) Constructed(
1904 (typename Parameters::template Parameter<A0, 0>()).template yield<Passed>(passed),
1905 (typename Parameters::template Parameter<A1, 1>()).template yield<Passed>(passed),
1906 (typename Parameters::template Parameter<A2, 2>()).template yield<Passed>(passed),
1907 (typename Parameters::template Parameter<A3, 3>()).template yield<Passed>(passed),
1908 (typename Parameters::template Parameter<A4, 4>()).template yield<Passed>(passed),
1909 (typename Parameters::template Parameter<A5, 5>()).template yield<Passed>(passed),
1910 (typename Parameters::template Parameter<A6, 6>()).template yield<Passed>(passed),
1911 (typename Parameters::template Parameter<A7, 7>()).template yield<Passed>(passed),
1912 (typename Parameters::template Parameter<A8, 8>()).template yield<Passed>(passed),
1913 (typename Parameters::template Parameter<A9, 9>()).template yield<Passed>(passed));
1914 }
1915
1916 template<typename Passed>
1917 void observe(Passed passed) {
1918 (typename Parameters::template Parameter<A0, 0>()).template observe<Passed>(passed);
1919 (typename Parameters::template Parameter<A1, 1>()).template observe<Passed>(passed);
1920 (typename Parameters::template Parameter<A2, 2>()).template observe<Passed>(passed);
1921 (typename Parameters::template Parameter<A3, 3>()).template observe<Passed>(passed);
1922 (typename Parameters::template Parameter<A4, 4>()).template observe<Passed>(passed);
1923 (typename Parameters::template Parameter<A5, 5>()).template observe<Passed>(passed);
1924 (typename Parameters::template Parameter<A6, 6>()).template observe<Passed>(passed);
1925 (typename Parameters::template Parameter<A7, 7>()).template observe<Passed>(passed);
1926 (typename Parameters::template Parameter<A8, 8>()).template observe<Passed>(passed);
1927 (typename Parameters::template Parameter<A9, 9>()).template observe<Passed>(passed);
1928 }
1929 };
1930 /* *INDENT-ON* */
1931
1932 }
1933
1934 namespace i = ::sauce::internal;
1935
1936 }
1937
1938 #endif // SAUCE_INTERNAL_APPLY_VARIADIC_H_
sauce::internal::ApplyConstructor
Definition: apply_variadic.h:49
sauce::internal
Definition: binder.h:317
sauce
Definition: binder.h:21
sauce::internal::ApplyVoidFunction
Definition: apply_variadic.h:26
sauce::internal::ApplyMethod
Definition: apply_variadic.h:34
sauce::internal::ApplyFunction
Definition: apply_variadic.h:12