TrueReality  v0.1.1912
FunTraits.h
Go to the documentation of this file.
1 /*
2 * True Reality Open Source Game and Simulation Engine
3 * Copyright © 2021 Acid Rain Studios LLC
4 *
5 * The Base of this class has been adopted from the Delta3D engine
6 *
7 * This library is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU Lesser General Public License as published by the Free
9 * Software Foundation; either version 3.0 of the License, or (at your option)
10 * any later version.
11 *
12 * This library is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
15 * details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library; if not, write to the Free Software Foundation, Inc.,
19 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 * @author Maxim Serebrennik
22 */
23 
24 #pragma once
25 
26 // Generalized functor implementation helpers.
27 // Copyright Aleksei Trunov 2005
28 // Use, copy, modify, distribute and sell it for free.
29 
30 
31 #include <trUtil/TypeList.h>
32 
38 namespace trUtil
39 {
47  template <typename T> struct FunTraits;
48 
49 #if (defined(_MSC_VER)) && (_MANAGED != 1) && (!defined (_WIN64))
50  template <typename R>
51  struct FunTraits<R(__cdecl *)()>
52  {
53  using ObjType = NullType;
54  using ResultType = R;
55  using TypeListType = NullType;
56  };
57  template <typename R>
58  struct FunTraits<R(__stdcall *)()>
59  {
60  using ObjType = NullType;
61  using ResultType = R;
62  using TypeListType = NullType;
63  };
64  template <typename R>
65  struct FunTraits<R(__fastcall *)()>
66  {
67  using ObjType = NullType;
68  using ResultType = R;
69  using TypeListType = NullType;
70  };
71  template <typename R, typename P1>
72  struct FunTraits<R(__cdecl *)(P1)>
73  {
74  using ObjType = NullType;
75  using ResultType = R;
76  using Parm1 = P1;
77  using TypeListType = TYPELIST_1(P1);
78  };
79  template <typename R, typename P1>
80  struct FunTraits<R(__stdcall *)(P1)>
81  {
82  using ObjType = NullType;
83  using ResultType = R;
84  using Parm1 = P1;
85  using TypeListType = TYPELIST_1(P1);
86  };
87  template <typename R, typename P1>
88  struct FunTraits<R(__fastcall *)(P1)>
89  {
90  using ObjType = NullType;
91  using ResultType = R;
92  using Parm1 = P1;
93  using TypeListType = TYPELIST_1(P1);
94  };
95  template <typename R, typename P1, typename P2>
96  struct FunTraits<R(__cdecl *)(P1, P2)>
97  {
98  using ObjType = NullType;
99  using ResultType = R;
100  using Parm1 = P1;
101  using Parm2 = P2;
102  using TypeListType = TYPELIST_2(P1, P2);
103  };
104  template <typename R, typename P1, typename P2>
105  struct FunTraits<R(__stdcall *)(P1, P2)>
106  {
107  using ObjType = NullType;
108  using ResultType = R;
109  using Parm1 = P1;
110  using Parm2 = P2;
111  using TypeListType = TYPELIST_2(P1, P2);
112  };
113  template <typename R, typename P1, typename P2>
114  struct FunTraits<R(__fastcall *)(P1, P2)>
115  {
116  using ObjType = NullType;
117  using ResultType = R;
118  using Parm1 = P1;
119  using Parm2 = P2;
120  using TypeListType = TYPELIST_2(P1, P2);
121  };
122  template <typename R, typename P1, typename P2, typename P3>
123  struct FunTraits<R(__cdecl *)(P1, P2, P3)>
124  {
125  using ObjType = NullType;
126  using ResultType = R;
127  using Parm1 = P1;
128  using Parm2 = P2;
129  using Parm3 = P3;
130  using TypeListType = TYPELIST_3(P1, P2, P3);
131  };
132  template <typename R, typename P1, typename P2, typename P3>
133  struct FunTraits<R(__stdcall *)(P1, P2, P3)>
134  {
135  using ObjType = NullType;
136  using ResultType = R;
137  using Parm1 = P1;
138  using Parm2 = P2;
139  using Parm3 = P3;
140  using TypeListType = TYPELIST_3(P1, P2, P3);
141  };
142  template <typename R, typename P1, typename P2, typename P3>
143  struct FunTraits<R(__fastcall *)(P1, P2, P3)>
144  {
145  using ObjType = NullType;
146  using ResultType = R;
147  using Parm1 = P1;
148  using Parm2 = P2;
149  using Parm3 = P3;
150  using TypeListType = TYPELIST_3(P1, P2, P3);
151  };
152  template <typename R, typename P1, typename P2, typename P3, typename P4>
153  struct FunTraits<R(__cdecl *)(P1, P2, P3, P4)>
154  {
155  using ObjType = NullType;
156  using ResultType = R;
157  using Parm1 = P1;
158  using Parm2 = P2;
159  using Parm3 = P3;
160  using Parm4 = P4;
161  using TypeListType = TYPELIST_4(P1, P2, P3, P4);
162  };
163  template <typename R, typename P1, typename P2, typename P3, typename P4>
164  struct FunTraits<R(__stdcall *)(P1, P2, P3, P4)>
165  {
166  using ObjType = NullType;
167  using ResultType = R;
168  using Parm1 = P1;
169  using Parm2 = P2;
170  using Parm3 = P3;
171  using Parm4 = P4;
172  using TypeListType = TYPELIST_4(P1, P2, P3, P4);
173  };
174  template <typename R, typename P1, typename P2, typename P3, typename P4>
175  struct FunTraits<R(__fastcall *)(P1, P2, P3, P4)>
176  {
177  using ObjType = NullType;
178  using ResultType = R;
179  using Parm1 = P1;
180  using Parm2 = P2;
181  using Parm3 = P3;
182  using Parm4 = P4;
183  using TypeListType = TYPELIST_4(P1, P2, P3, P4);
184  };
185  template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
186  struct FunTraits<R(__cdecl *)(P1, P2, P3, P4, P5)>
187  {
188  using ObjType = NullType;
189  using ResultType = R;
190  using Parm1 = P1;
191  using Parm2 = P2;
192  using Parm3 = P3;
193  using Parm4 = P4;
194  using Parm5 = P5;
195  using TypeListType = TYPELIST_5(P1, P2, P3, P4, P5);
196  };
197  template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
198  struct FunTraits<R(__stdcall *)(P1, P2, P3, P4, P5)>
199  {
200  using ObjType = NullType;
201  using ResultType = R;
202  using Parm1 = P1;
203  using Parm2 = P2;
204  using Parm3 = P3;
205  using Parm4 = P4;
206  using Parm5 = P5;
207  using TypeListType = TYPELIST_5(P1, P2, P3, P4, P5);
208  };
209  template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
210  struct FunTraits<R(__fastcall *)(P1, P2, P3, P4, P5)>
211  {
212  using ObjType = NullType;
213  using ResultType = R;
214  using Parm1 = P1;
215  using Parm2 = P2;
216  using Parm3 = P3;
217  using Parm4 = P4;
218  using Parm5 = P5;
219  using TypeListType = TYPELIST_5(P1, P2, P3, P4, P5);
220  };
221  template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
222  struct FunTraits<R(__cdecl *)(P1, P2, P3, P4, P5, P6)>
223  {
224  using ObjType = NullType;
225  using ResultType = R;
226  using Parm1 = P1;
227  using Parm2 = P2;
228  using Parm3 = P3;
229  using Parm4 = P4;
230  using Parm5 = P5;
231  using Parm6 = P6;
232  using TypeListType = TYPELIST_6(P1, P2, P3, P4, P5, P6);
233  };
234  template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
235  struct FunTraits<R(__stdcall *)(P1, P2, P3, P4, P5, P6)>
236  {
237  using ObjType = NullType;
238  using ResultType = R;
239  using Parm1 = P1;
240  using Parm2 = P2;
241  using Parm3 = P3;
242  using Parm4 = P4;
243  using Parm5 = P5;
244  using Parm6 = P6;
245  using TypeListType = TYPELIST_6(P1, P2, P3, P4, P5, P6);
246  };
247  template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
248  struct FunTraits<R(__fastcall *)(P1, P2, P3, P4, P5, P6)>
249  {
250  using ObjType = NullType;
251  using ResultType = R;
252  using Parm1 = P1;
253  using Parm2 = P2;
254  using Parm3 = P3;
255  using Parm4 = P4;
256  using Parm5 = P5;
257  using Parm6 = P6;
258  using TypeListType = TYPELIST_6(P1, P2, P3, P4, P5, P6);
259  };
260  template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
261  struct FunTraits<R(__cdecl *)(P1, P2, P3, P4, P5, P6, P7)>
262  {
263  using ObjType = NullType;
264  using ResultType = R;
265  using Parm1 = P1;
266  using Parm2 = P2;
267  using Parm3 = P3;
268  using Parm4 = P4;
269  using Parm5 = P5;
270  using Parm6 = P6;
271  using Parm7 = P7;
272  using TypeListType = TYPELIST_7(P1, P2, P3, P4, P5, P6, P7);
273  };
274  template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
275  struct FunTraits<R(__stdcall *)(P1, P2, P3, P4, P5, P6, P7)>
276  {
277  using ObjType = NullType;
278  using ResultType = R;
279  using Parm1 = P1;
280  using Parm2 = P2;
281  using Parm3 = P3;
282  using Parm4 = P4;
283  using Parm5 = P5;
284  using Parm6 = P6;
285  using Parm7 = P7;
286  using TypeListType = TYPELIST_7(P1, P2, P3, P4, P5, P6, P7);
287  };
288  template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
289  struct FunTraits<R(__fastcall *)(P1, P2, P3, P4, P5, P6, P7)>
290  {
291  using ObjType = NullType;
292  using ResultType = R;
293  using Parm1 = P1;
294  using Parm2 = P2;
295  using Parm3 = P3;
296  using Parm4 = P4;
297  using Parm5 = P5;
298  using Parm6 = P6;
299  using Parm7 = P7;
300  using TypeListType = TYPELIST_7(P1, P2, P3, P4, P5, P6, P7);
301  };
302  template <class O, typename R>
303  struct FunTraits<R(__cdecl O::*)() const>
304  {
305  using ObjType = O;
306  using ResultType = R;
307  using TypeListType = NullType;
308  };
309  template <class O, typename R>
310  struct FunTraits<R(__stdcall O::*)() const>
311  {
312  using ObjType = O;
313  using ResultType = R;
314  using TypeListType = NullType;
315  };
316  template <class O, typename R>
317  struct FunTraits<R(__fastcall O::*)() const>
318  {
319  using ObjType = O;
320  using ResultType = R;
321  using TypeListType = NullType;
322  };
323  template <class O, typename R, typename P1>
324  struct FunTraits<R(__cdecl O::*)(P1) const>
325  {
326  using ObjType = O;
327  using ResultType = R;
328  using Parm1 = P1;
329  using TypeListType = TYPELIST_1(P1);
330  };
331  template <class O, typename R, typename P1>
332  struct FunTraits<R(__stdcall O::*)(P1) const>
333  {
334  using ObjType = O;
335  using ResultType = R;
336  using Parm1 = P1;
337  using TypeListType = TYPELIST_1(P1);
338  };
339  template <class O, typename R, typename P1>
340  struct FunTraits<R(__fastcall O::*)(P1) const>
341  {
342  using ObjType = O;
343  using ResultType = R;
344  using Parm1 = P1;
345  using TypeListType = TYPELIST_1(P1);
346  };
347  template <class O, typename R, typename P1, typename P2>
348  struct FunTraits<R(__cdecl O::*)(P1, P2) const>
349  {
350  using ObjType = O;
351  using ResultType = R;
352  using Parm1 = P1;
353  using Parm2 = P2;
354  using TypeListType = TYPELIST_2(P1, P2);
355  };
356  template <class O, typename R, typename P1, typename P2>
357  struct FunTraits<R(__stdcall O::*)(P1, P2) const>
358  {
359  using ObjType = O;
360  using ResultType = R;
361  using Parm1 = P1;
362  using Parm2 = P2;
363  using TypeListType = TYPELIST_2(P1, P2);
364  };
365  template <class O, typename R, typename P1, typename P2>
366  struct FunTraits<R(__fastcall O::*)(P1, P2) const>
367  {
368  using ObjType = O;
369  using ResultType = R;
370  using Parm1 = P1;
371  using Parm2 = P2;
372  using TypeListType = TYPELIST_2(P1, P2);
373  };
374  template <class O, typename R, typename P1, typename P2, typename P3>
375  struct FunTraits<R(__cdecl O::*)(P1, P2, P3) const>
376  {
377  using ObjType = O;
378  using ResultType = R;
379  using Parm1 = P1;
380  using Parm2 = P2;
381  using Parm3 = P3;
382  using TypeListType = TYPELIST_3(P1, P2, P3);
383  };
384  template <class O, typename R, typename P1, typename P2, typename P3>
385  struct FunTraits<R(__stdcall O::*)(P1, P2, P3) const>
386  {
387  using ObjType = O;
388  using ResultType = R;
389  using Parm1 = P1;
390  using Parm2 = P2;
391  using Parm3 = P3;
392  using TypeListType = TYPELIST_3(P1, P2, P3);
393  };
394  template <class O, typename R, typename P1, typename P2, typename P3>
395  struct FunTraits<R(__fastcall O::*)(P1, P2, P3) const>
396  {
397  using ObjType = O;
398  using ResultType = R;
399  using Parm1 = P1;
400  using Parm2 = P2;
401  using Parm3 = P3;
402  using TypeListType = TYPELIST_3(P1, P2, P3);
403  };
404  template <class O, typename R, typename P1, typename P2, typename P3, typename P4>
405  struct FunTraits<R(__cdecl O::*)(P1, P2, P3, P4) const>
406  {
407  using ObjType = O;
408  using ResultType = R;
409  using Parm1 = P1;
410  using Parm2 = P2;
411  using Parm3 = P3;
412  using Parm4 = P4;
413  using TypeListType = TYPELIST_4(P1, P2, P3, P4);
414  };
415  template <class O, typename R, typename P1, typename P2, typename P3, typename P4>
416  struct FunTraits<R(__stdcall O::*)(P1, P2, P3, P4) const>
417  {
418  using ObjType = O;
419  using ResultType = R;
420  using Parm1 = P1;
421  using Parm2 = P2;
422  using Parm3 = P3;
423  using Parm4 = P4;
424  using TypeListType = TYPELIST_4(P1, P2, P3, P4);
425  };
426  template <class O, typename R, typename P1, typename P2, typename P3, typename P4>
427  struct FunTraits<R(__fastcall O::*)(P1, P2, P3, P4) const>
428  {
429  using ObjType = O;
430  using ResultType = R;
431  using Parm1 = P1;
432  using Parm2 = P2;
433  using Parm3 = P3;
434  using Parm4 = P4;
435  using TypeListType = TYPELIST_4(P1, P2, P3, P4);
436  };
437  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
438  struct FunTraits<R(__cdecl O::*)(P1, P2, P3, P4, P5) const>
439  {
440  using ObjType = O;
441  using ResultType = R;
442  using Parm1 = P1;
443  using Parm2 = P2;
444  using Parm3 = P3;
445  using Parm4 = P4;
446  using Parm5 = P5;
447  using TypeListType = TYPELIST_5(P1, P2, P3, P4, P5);
448  };
449  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
450  struct FunTraits<R(__stdcall O::*)(P1, P2, P3, P4, P5) const>
451  {
452  using ObjType = O;
453  using ResultType = R;
454  using Parm1 = P1;
455  using Parm2 = P2;
456  using Parm3 = P3;
457  using Parm4 = P4;
458  using Parm5 = P5;
459  using TypeListType = TYPELIST_5(P1, P2, P3, P4, P5);
460  };
461  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
462  struct FunTraits<R(__fastcall O::*)(P1, P2, P3, P4, P5) const>
463  {
464  using ObjType = O;
465  using ResultType = R;
466  using Parm1 = P1;
467  using Parm2 = P2;
468  using Parm3 = P3;
469  using Parm4 = P4;
470  using Parm5 = P5;
471  using TypeListType = TYPELIST_5(P1, P2, P3, P4, P5);
472  };
473  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
474  struct FunTraits<R(__cdecl O::*)(P1, P2, P3, P4, P5, P6) const>
475  {
476  using ObjType = O;
477  using ResultType = R;
478  using Parm1 = P1;
479  using Parm2 = P2;
480  using Parm3 = P3;
481  using Parm4 = P4;
482  using Parm5 = P5;
483  using Parm6 = P6;
484  using TypeListType = TYPELIST_6(P1, P2, P3, P4, P5, P6);
485  };
486  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
487  struct FunTraits<R(__stdcall O::*)(P1, P2, P3, P4, P5, P6) const>
488  {
489  using ObjType = O;
490  using ResultType = R;
491  using Parm1 = P1;
492  using Parm2 = P2;
493  using Parm3 = P3;
494  using Parm4 = P4;
495  using Parm5 = P5;
496  using Parm6 = P6;
497  using TypeListType = TYPELIST_6(P1, P2, P3, P4, P5, P6);
498  };
499  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
500  struct FunTraits<R(__fastcall O::*)(P1, P2, P3, P4, P5, P6) const>
501  {
502  using ObjType = O;
503  using ResultType = R;
504  using Parm1 = P1;
505  using Parm2 = P2;
506  using Parm3 = P3;
507  using Parm4 = P4;
508  using Parm5 = P5;
509  using Parm6 = P6;
510  using TypeListType = TYPELIST_6(P1, P2, P3, P4, P5, P6);
511  };
512  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
513  struct FunTraits<R(__cdecl O::*)(P1, P2, P3, P4, P5, P6, P7) const>
514  {
515  using ObjType = O;
516  using ResultType = R;
517  using Parm1 = P1;
518  using Parm2 = P2;
519  using Parm3 = P3;
520  using Parm4 = P4;
521  using Parm5 = P5;
522  using Parm6 = P6;
523  using Parm7 = P7;
524  using TypeListType = TYPELIST_7(P1, P2, P3, P4, P5, P6, P7);
525  };
526  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
527  struct FunTraits<R(__stdcall O::*)(P1, P2, P3, P4, P5, P6, P7) const>
528  {
529  using ObjType = O;
530  using ResultType = R;
531  using Parm1 = P1;
532  using Parm2 = P2;
533  using Parm3 = P3;
534  using Parm4 = P4;
535  using Parm5 = P5;
536  using Parm6 = P6;
537  using Parm7 = P7;
538  using TypeListType = TYPELIST_7(P1, P2, P3, P4, P5, P6, P7);
539  };
540  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
541  struct FunTraits<R(__fastcall O::*)(P1, P2, P3, P4, P5, P6, P7) const>
542  {
543  using ObjType = O;
544  using ResultType = R;
545  using Parm1 = P1;
546  using Parm2 = P2;
547  using Parm3 = P3;
548  using Parm4 = P4;
549  using Parm5 = P5;
550  using Parm6 = P6;
551  using Parm7 = P7;
552  using TypeListType = TYPELIST_7(P1, P2, P3, P4, P5, P6, P7);
553  };
554  template <class O, typename R>
555  struct FunTraits<R(__cdecl O::*)()>
556  {
557  using ObjType = O;
558  using ResultType = R;
559  using TypeListType = NullType;
560  };
561  template <class O, typename R>
562  struct FunTraits<R(__stdcall O::*)()>
563  {
564  using ObjType = O;
565  using ResultType = R;
566  using TypeListType = NullType;
567  };
568  template <class O, typename R>
569  struct FunTraits<R(__fastcall O::*)()>
570  {
571  using ObjType = O;
572  using ResultType = R;
573  using TypeListType = NullType;
574  };
575  template <class O, typename R, typename P1>
576  struct FunTraits<R(__cdecl O::*)(P1)>
577  {
578  using ObjType = O;
579  using ResultType = R;
580  using Parm1 = P1;
581  using TypeListType = TYPELIST_1(P1);
582  };
583  template <class O, typename R, typename P1>
584  struct FunTraits<R(__stdcall O::*)(P1)>
585  {
586  using ObjType = O;
587  using ResultType = R;
588  using Parm1 = P1;
589  using TypeListType = TYPELIST_1(P1);
590  };
591  template <class O, typename R, typename P1>
592  struct FunTraits<R(__fastcall O::*)(P1)>
593  {
594  using ObjType = O;
595  using ResultType = R;
596  using Parm1 = P1;
597  using TypeListType = TYPELIST_1(P1);
598  };
599  template <class O, typename R, typename P1, typename P2>
600  struct FunTraits<R(__cdecl O::*)(P1, P2)>
601  {
602  using ObjType = O;
603  using ResultType = R;
604  using Parm1 = P1;
605  using Parm2 = P2;
606  using TypeListType = TYPELIST_2(P1, P2);
607  };
608  template <class O, typename R, typename P1, typename P2>
609  struct FunTraits<R(__stdcall O::*)(P1, P2)>
610  {
611  using ObjType = O;
612  using ResultType = R;
613  using Parm1 = P1;
614  using Parm2 = P2;
615  using TypeListType = TYPELIST_2(P1, P2);
616  };
617  template <class O, typename R, typename P1, typename P2>
618  struct FunTraits<R(__fastcall O::*)(P1, P2)>
619  {
620  using ObjType = O;
621  using ResultType = R;
622  using Parm1 = P1;
623  using Parm2 = P2;
624  using TypeListType = TYPELIST_2(P1, P2);
625  };
626  template <class O, typename R, typename P1, typename P2, typename P3>
627  struct FunTraits<R(__cdecl O::*)(P1, P2, P3)>
628  {
629  using ObjType = O;
630  using ResultType = R;
631  using Parm1 = P1;
632  using Parm2 = P2;
633  using Parm3 = P3;
634  using TypeListType = TYPELIST_3(P1, P2, P3);
635  };
636  template <class O, typename R, typename P1, typename P2, typename P3>
637  struct FunTraits<R(__stdcall O::*)(P1, P2, P3)>
638  {
639  using ObjType = O;
640  using ResultType = R;
641  using Parm1 = P1;
642  using Parm2 = P2;
643  using Parm3 = P3;
644  using TypeListType = TYPELIST_3(P1, P2, P3);
645  };
646  template <class O, typename R, typename P1, typename P2, typename P3>
647  struct FunTraits<R(__fastcall O::*)(P1, P2, P3)>
648  {
649  using ObjType = O;
650  using ResultType = R;
651  using Parm1 = P1;
652  using Parm2 = P2;
653  using Parm3 = P3;
654  using TypeListType = TYPELIST_3(P1, P2, P3);
655  };
656  template <class O, typename R, typename P1, typename P2, typename P3, typename P4>
657  struct FunTraits<R(__cdecl O::*)(P1, P2, P3, P4)>
658  {
659  using ObjType = O;
660  using ResultType = R;
661  using Parm1 = P1;
662  using Parm2 = P2;
663  using Parm3 = P3;
664  using Parm4 = P4;
665  using TypeListType = TYPELIST_4(P1, P2, P3, P4);
666  };
667  template <class O, typename R, typename P1, typename P2, typename P3, typename P4>
668  struct FunTraits<R(__stdcall O::*)(P1, P2, P3, P4)>
669  {
670  using ObjType = O;
671  using ResultType = R;
672  using Parm1 = P1;
673  using Parm2 = P2;
674  using Parm3 = P3;
675  using Parm4 = P4;
676  using TypeListType = TYPELIST_4(P1, P2, P3, P4);
677  };
678  template <class O, typename R, typename P1, typename P2, typename P3, typename P4>
679  struct FunTraits<R(__fastcall O::*)(P1, P2, P3, P4)>
680  {
681  using ObjType = O;
682  using ResultType = R;
683  using Parm1 = P1;
684  using Parm2 = P2;
685  using Parm3 = P3;
686  using Parm4 = P4;
687  using TypeListType = TYPELIST_4(P1, P2, P3, P4);
688  };
689  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
690  struct FunTraits<R(__cdecl O::*)(P1, P2, P3, P4, P5)>
691  {
692  using ObjType = O;
693  using ResultType = R;
694  using Parm1 = P1;
695  using Parm2 = P2;
696  using Parm3 = P3;
697  using Parm4 = P4;
698  using Parm5 = P5;
699  using TypeListType = TYPELIST_5(P1, P2, P3, P4, P5);
700  };
701  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
702  struct FunTraits<R(__stdcall O::*)(P1, P2, P3, P4, P5)>
703  {
704  using ObjType = O;
705  using ResultType = R;
706  using Parm1 = P1;
707  using Parm2 = P2;
708  using Parm3 = P3;
709  using Parm4 = P4;
710  using Parm5 = P5;
711  using TypeListType = TYPELIST_5(P1, P2, P3, P4, P5);
712  };
713  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
714  struct FunTraits<R(__fastcall O::*)(P1, P2, P3, P4, P5)>
715  {
716  using ObjType = O;
717  using ResultType = R;
718  using Parm1 = P1;
719  using Parm2 = P2;
720  using Parm3 = P3;
721  using Parm4 = P4;
722  using Parm5 = P5;
723  using TypeListType = TYPELIST_5(P1, P2, P3, P4, P5);
724  };
725  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
726  struct FunTraits<R(__cdecl O::*)(P1, P2, P3, P4, P5, P6)>
727  {
728  using ObjType = O;
729  using ResultType = R;
730  using Parm1 = P1;
731  using Parm2 = P2;
732  using Parm3 = P3;
733  using Parm4 = P4;
734  using Parm5 = P5;
735  using Parm6 = P6;
736  using TypeListType = TYPELIST_6(P1, P2, P3, P4, P5, P6);
737  };
738  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
739  struct FunTraits<R(__stdcall O::*)(P1, P2, P3, P4, P5, P6)>
740  {
741  using ObjType = O;
742  using ResultType = R;
743  using Parm1 = P1;
744  using Parm2 = P2;
745  using Parm3 = P3;
746  using Parm4 = P4;
747  using Parm5 = P5;
748  using Parm6 = P6;
749  using TypeListType = TYPELIST_6(P1, P2, P3, P4, P5, P6);
750  };
751  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
752  struct FunTraits<R(__fastcall O::*)(P1, P2, P3, P4, P5, P6)>
753  {
754  using ObjType = O;
755  using ResultType = R;
756  using Parm1 = P1;
757  using Parm2 = P2;
758  using Parm3 = P3;
759  using Parm4 = P4;
760  using Parm5 = P5;
761  using Parm6 = P6;
762  using TypeListType = TYPELIST_6(P1, P2, P3, P4, P5, P6);
763  };
764  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
765  struct FunTraits<R(__cdecl O::*)(P1, P2, P3, P4, P5, P6, P7)>
766  {
767  using ObjType = O;
768  using ResultType = R;
769  using Parm1 = P1;
770  using Parm2 = P2;
771  using Parm3 = P3;
772  using Parm4 = P4;
773  using Parm5 = P5;
774  using Parm6 = P6;
775  using Parm7 = P7;
776  using TypeListType = TYPELIST_7(P1, P2, P3, P4, P5, P6, P7);
777  };
778  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
779  struct FunTraits<R(__stdcall O::*)(P1, P2, P3, P4, P5, P6, P7)>
780  {
781  using ObjType = O;
782  using ResultType = R;
783  using Parm1 = P1;
784  using Parm2 = P2;
785  using Parm3 = P3;
786  using Parm4 = P4;
787  using Parm5 = P5;
788  using Parm6 = P6;
789  using Parm7 = P7;
790  using TypeListType = TYPELIST_7(P1, P2, P3, P4, P5, P6, P7);
791  };
792  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
793  struct FunTraits<R(__fastcall O::*)(P1, P2, P3, P4, P5, P6, P7)>
794  {
795  using ObjType = O;
796  using ResultType = R;
797  using Parm1 = P1;
798  using Parm2 = P2;
799  using Parm3 = P3;
800  using Parm4 = P4;
801  using Parm5 = P5;
802  using Parm6 = P6;
803  using Parm7 = P7;
804  using TypeListType = TYPELIST_7(P1, P2, P3, P4, P5, P6, P7);
805  };
806 #else // #if (defined(_MSC_VER)) && (_MANAGED != 1) && (!defined (_WIN64))
807  template <typename R>
808  struct FunTraits<R(*)()>
809  {
810  using ObjType = NullType;
811  using ResultType = R;
813  };
814  template <typename R, typename P1>
815  struct FunTraits<R(*)(P1)>
816  {
817  using ObjType = NullType;
818  using ResultType = R;
819  using Parm1 = P1;
821  };
822  template <typename R, typename P1, typename P2>
823  struct FunTraits<R(*)(P1, P2)>
824  {
825  using ObjType = NullType;
826  using ResultType = R;
827  using Parm1 = P1;
828  using Parm2 = P2;
829  using TypeListType = TYPELIST_2(P1, P2);
830  };
831  template <typename R, typename P1, typename P2, typename P3>
832  struct FunTraits<R(*)(P1, P2, P3)>
833  {
834  using ObjType = NullType;
835  using ResultType = R;
836  using Parm1 = P1;
837  using Parm2 = P2;
838  using Parm3 = P3;
839  using TypeListType = TYPELIST_3(P1, P2, P3);
840  };
841  template <typename R, typename P1, typename P2, typename P3, typename P4>
842  struct FunTraits<R(*)(P1, P2, P3, P4)>
843  {
844  using ObjType = NullType;
845  using ResultType = R;
846  using Parm1 = P1;
847  using Parm2 = P2;
848  using Parm3 = P3;
849  using Parm4 = P4;
850  using TypeListType = TYPELIST_4(P1, P2, P3, P4);
851  };
852  template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
853  struct FunTraits<R(*)(P1, P2, P3, P4, P5)>
854  {
855  using ObjType = NullType;
856  using ResultType = R;
857  using Parm1 = P1;
858  using Parm2 = P2;
859  using Parm3 = P3;
860  using Parm4 = P4;
861  using Parm5 = P5;
862  using TypeListType = TYPELIST_5(P1, P2, P3, P4, P5);
863  };
864  template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
865  struct FunTraits<R(*)(P1, P2, P3, P4, P5, P6)>
866  {
867  using ObjType = NullType;
868  using ResultType = R;
869  using Parm1 = P1;
870  using Parm2 = P2;
871  using Parm3 = P3;
872  using Parm4 = P4;
873  using Parm5 = P5;
874  using Parm6 = P6;
875  using TypeListType = TYPELIST_6(P1, P2, P3, P4, P5, P6);
876  };
877  template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
878  struct FunTraits<R(*)(P1, P2, P3, P4, P5, P6, P7)>
879  {
880  using ObjType = NullType;
881  using ResultType = R;
882  using Parm1 = P1;
883  using Parm2 = P2;
884  using Parm3 = P3;
885  using Parm4 = P4;
886  using Parm5 = P5;
887  using Parm6 = P6;
888  using Parm7 = P7;
889  using TypeListType = TYPELIST_7(P1, P2, P3, P4, P5, P6, P6);
890  };
891 #endif //#if (defined(_MSC_VER)) && (_MANAGED != 1) && (!defined (_WIN64))
892 
893  template <class O, typename R>
894  struct FunTraits<R(O::*)()>
895  {
896  using ObjType = O;
897  using ResultType = R;
899  };
900  template <class O, typename R, typename P1>
901  struct FunTraits<R(O::*)(P1)>
902  {
903  using ObjType = O;
904  using ResultType = R;
905  using Parm1 = P1;
907  };
908  template <class O, typename R, typename P1, typename P2>
909  struct FunTraits<R(O::*)(P1, P2)>
910  {
911  using ObjType = O;
912  using ResultType = R;
913  using Parm1 = P1;
914  using Parm2 = P2;
915  using TypeListType = TYPELIST_2(P1, P2);
916  };
917  template <class O, typename R, typename P1, typename P2, typename P3>
918  struct FunTraits<R(O::*)(P1, P2, P3)>
919  {
920  using ObjType = O;
921  using ResultType = R;
922  using Parm1 = P1;
923  using Parm2 = P2;
924  using Parm3 = P3;
925  using TypeListType = TYPELIST_3(P1, P2, P3);
926  };
927  template <class O, typename R, typename P1, typename P2, typename P3, typename P4>
928  struct FunTraits<R(O::*)(P1, P2, P3, P4)>
929  {
930  using ObjType = O;
931  using ResultType = R;
932  using Parm1 = P1;
933  using Parm2 = P2;
934  using Parm3 = P3;
935  using Parm4 = P4;
936  using TypeListType = TYPELIST_4(P1, P2, P3, P4);
937  };
938  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
939  struct FunTraits<R(O::*)(P1, P2, P3, P4, P5)>
940  {
941  using ObjType = O;
942  using ResultType = R;
943  using Parm1 = P1;
944  using Parm2 = P2;
945  using Parm3 = P3;
946  using Parm4 = P4;
947  using Parm5 = P5;
948  using TypeListType = TYPELIST_5(P1, P2, P3, P4, P5);
949  };
950  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
951  struct FunTraits<R(O::*)(P1, P2, P3, P4, P5, P6)>
952  {
953  using ObjType = O;
954  using ResultType = R;
955  using Parm1 = P1;
956  using Parm2 = P2;
957  using Parm3 = P3;
958  using Parm4 = P4;
959  using Parm5 = P5;
960  using Parm6 = P6;
961  using TypeListType = TYPELIST_6(P1, P2, P3, P4, P5, P6);
962  };
963  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
964  struct FunTraits<R(O::*)(P1, P2, P3, P4, P5, P6, P7)>
965  {
966  using ObjType = O;
967  using ResultType = R;
968  using Parm1 = P1;
969  using Parm2 = P2;
970  using Parm3 = P3;
971  using Parm4 = P4;
972  using Parm5 = P5;
973  using Parm6 = P6;
974  using Parm7 = P7;
975  using TypeListType = TYPELIST_7(P1, P2, P3, P4, P5, P6, P7);
976  };
977  template <class O, typename R>
978  struct FunTraits<R(O::*)() const>
979  {
980  using ObjType = O;
981  using ResultType = R;
983  };
984  template <class O, typename R, typename P1>
985  struct FunTraits<R(O::*)(P1) const>
986  {
987  using ObjType = O;
988  using ResultType = R;
989  using Parm1 = P1;
991  };
992  template <class O, typename R, typename P1, typename P2>
993  struct FunTraits<R(O::*)(P1, P2) const>
994  {
995  using ObjType = O;
996  using ResultType = R;
997  using Parm1 = P1;
998  using Parm2 = P2;
999  using TypeListType = TYPELIST_2(P1, P2);
1000  };
1001  template <class O, typename R, typename P1, typename P2, typename P3>
1002  struct FunTraits<R(O::*)(P1, P2, P3) const>
1003  {
1004  using ObjType = O;
1005  using ResultType = R;
1006  using Parm1 = P1;
1007  using Parm2 = P2;
1008  using Parm3 = P3;
1009  using TypeListType = TYPELIST_3(P1, P2, P3);
1010  };
1011  template <class O, typename R, typename P1, typename P2, typename P3, typename P4>
1012  struct FunTraits<R(O::*)(P1, P2, P3, P4) const>
1013  {
1014  using ObjType = O;
1015  using ResultType = R;
1016  using Parm1 = P1;
1017  using Parm2 = P2;
1018  using Parm3 = P3;
1019  using Parm4 = P4;
1020  using TypeListType = TYPELIST_4(P1, P2, P3, P4);
1021  };
1022  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
1023  struct FunTraits<R(O::*)(P1, P2, P3, P4, P5) const>
1024  {
1025  using ObjType = O;
1026  using ResultType = R;
1027  using Parm1 = P1;
1028  using Parm2 = P2;
1029  using Parm3 = P3;
1030  using Parm4 = P4;
1031  using Parm5 = P5;
1032  using TypeListType = TYPELIST_5(P1, P2, P3, P4, P5);
1033  };
1034  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
1035  struct FunTraits<R(O::*)(P1, P2, P3, P4, P5, P6) const>
1036  {
1037  using ObjType = O;
1038  using ResultType = R;
1039  using Parm1 = P1;
1040  using Parm2 = P2;
1041  using Parm3 = P3;
1042  using Parm4 = P4;
1043  using Parm5 = P5;
1044  using Parm6 = P6;
1045  using TypeListType = TYPELIST_6(P1, P2, P3, P4, P5, P6);
1046  };
1047  template <class O, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
1048  struct FunTraits<R(O::*)(P1, P2, P3, P4, P5, P6, P7) const>
1049  {
1050  using ObjType = O;
1051  using ResultType = R;
1052  using Parm1 = P1;
1053  using Parm2 = P2;
1054  using Parm3 = P3;
1055  using Parm4 = P4;
1056  using Parm5 = P5;
1057  using Parm6 = P6;
1058  using Parm7 = P7;
1059  using TypeListType = TYPELIST_7(P1, P2, P3, P4, P5, P6, P7);
1060  };
1061 
1062 }
A null type class.
Definition: TypeList.h:58
TYPELIST_6(P1, P2, P3, P4, P5, P6) TypeListType
Definition: FunTraits.h:1045
TYPELIST_1(P1) TypeListType
Definition: FunTraits.h:820
TYPELIST_7(P1, P2, P3, P4, P5, P6, P7) TypeListType
Definition: FunTraits.h:1059
TYPELIST_6(P1, P2, P3, P4, P5, P6) TypeListType
Definition: FunTraits.h:961
TYPELIST_3(P1, P2, P3) TypeListType
Definition: FunTraits.h:839
#define TYPELIST_3(T1, T2, T3)
Definition: TypeList.h:132
#define TYPELIST_5(T1, T2, T3, T4, T5)
Definition: TypeList.h:134
Function traits.
Definition: FunTraits.h:47
TYPELIST_6(P1, P2, P3, P4, P5, P6) TypeListType
Definition: FunTraits.h:875
TYPELIST_7(P1, P2, P3, P4, P5, P6, P6) TypeListType
Definition: FunTraits.h:889
#define TYPELIST_4(T1, T2, T3, T4)
Definition: TypeList.h:133
TYPELIST_7(P1, P2, P3, P4, P5, P6, P7) TypeListType
Definition: FunTraits.h:975
TYPELIST_2(P1, P2) TypeListType
Definition: FunTraits.h:915
TYPELIST_3(P1, P2, P3) TypeListType
Definition: FunTraits.h:925
#define TYPELIST_7(T1, T2, T3, T4, T5, T6, T7)
Definition: TypeList.h:136
#define TYPELIST_6(T1, T2, T3, T4, T5, T6)
Definition: TypeList.h:135
TYPELIST_5(P1, P2, P3, P4, P5) TypeListType
Definition: FunTraits.h:862
Namespace that holds various utility classes for the engine.
Definition: SmrtPtr.h:208
#define TYPELIST_1(T1)
Definition: TypeList.h:130
TYPELIST_4(P1, P2, P3, P4) TypeListType
Definition: FunTraits.h:850
TYPELIST_4(P1, P2, P3, P4) TypeListType
Definition: FunTraits.h:936
TYPELIST_2(P1, P2) TypeListType
Definition: FunTraits.h:829
#define TYPELIST_2(T1, T2)
Definition: TypeList.h:131
TYPELIST_5(P1, P2, P3, P4, P5) TypeListType
Definition: FunTraits.h:948