]> git.saurik.com Git - wxWidgets.git/blame - include/wx/xtictor.h
fixing warning and compile error against 10.4
[wxWidgets.git] / include / wx / xtictor.h
CommitLineData
cc3977bf
SC
1/////////////////////////////////////////////////////////////////////////////\r
2// Name: wx/xtictor.h\r
3// Purpose: XTI constructors\r
4// Author: Stefan Csomor\r
5// Modified by: Francesco Montorsi\r
6// Created: 27/07/03\r
7// RCS-ID: $Id: xti.h 47299 2007-07-10 15:58:27Z FM $\r
8// Copyright: (c) 1997 Julian Smart\r
9// (c) 2003 Stefan Csomor\r
10// Licence: wxWindows licence\r
11/////////////////////////////////////////////////////////////////////////////\r
12\r
13#ifndef _XTICTOR_H_\r
14#define _XTICTOR_H_\r
15\r
16#include "wx/defs.h"\r
17\r
18#if wxUSE_EXTENDED_RTTI\r
19\r
20#include "wx/string.h"\r
21#include "wx/variant.h"\r
22\r
23class WXDLLIMPEXP_BASE wxObject;\r
24class WXDLLIMPEXP_BASE wxClassInfo;\r
25class WXDLLIMPEXP_BASE wxDynamicClassInfo;\r
26class WXDLLIMPEXP_BASE wxHashTable;\r
27class WXDLLIMPEXP_BASE wxHashTable_Node;\r
28class WXDLLIMPEXP_BASE wxObjectRefData;\r
29class WXDLLIMPEXP_BASE wxEvent;\r
30class WXDLLIMPEXP_BASE wxEvtHandler;\r
31\r
32// ----------------------------------------------------------------------------\r
33// Constructor Bridges\r
34// ----------------------------------------------------------------------------\r
35\r
36// A constructor bridge allows to call a ctor with an arbitrary number\r
37// or parameters during runtime\r
38class WXDLLIMPEXP_BASE wxObjectAllocatorAndCreator\r
39{\r
40public:\r
41 virtual ~wxObjectAllocatorAndCreator() { }\r
42 virtual bool Create(wxObject * &o, wxVariantBase *args) = 0;\r
43};\r
44\r
45// a direct constructor bridge calls the operator new for this class and\r
46// passes all params to the constructor. Needed for classes that cannot be\r
47// instantiated using alloc-create semantics\r
48class WXDLLIMPEXP_BASE wxObjectAllocator : public wxObjectAllocatorAndCreator\r
49{\r
50public:\r
51 virtual bool Create(wxObject * &o, wxVariantBase *args) = 0;\r
52};\r
53\r
54\r
55// ----------------------------------------------------------------------------\r
56// Constructor Bridges for all Numbers of Params\r
57// ----------------------------------------------------------------------------\r
58\r
59// no params\r
60\r
61template<typename Class>\r
62struct wxObjectAllocatorAndCreator_0 : public wxObjectAllocatorAndCreator\r
63{\r
64 bool Create(wxObject * &o, wxVariantBase *)\r
65 {\r
66 Class *obj = wx_dynamic_cast(Class*, o);\r
67 return obj->Create();\r
68 }\r
69};\r
70\r
71struct wxObjectAllocatorAndCreator_Dummy : public wxObjectAllocatorAndCreator\r
72{\r
73 bool Create(wxObject *&, wxVariantBase *)\r
74 {\r
75 return true;\r
76 }\r
77};\r
78\r
79#define wxCONSTRUCTOR_0(klass) \\r
80 wxObjectAllocatorAndCreator_0<klass> constructor##klass; \\r
81 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
82 const wxChar *klass::ms_constructorProperties[] = { NULL }; \\r
83 const int klass::ms_constructorPropertiesCount = 0;\r
84\r
85#define wxCONSTRUCTOR_DUMMY(klass) \\r
86 wxObjectAllocatorAndCreator_Dummy constructor##klass; \\r
87 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
88 const wxChar *klass::ms_constructorProperties[] = { NULL }; \\r
89 const int klass::ms_constructorPropertiesCount = 0;\r
90\r
91// direct constructor version\r
92\r
93template<typename Class>\r
94struct wxDirectConstructorBridge_0 : public wxObjectAllocator\r
95{\r
96 bool Create(wxObject * &o, wxVariantBase *args)\r
97 {\r
98 o = new Class( );\r
99 return o != NULL;\r
100 }\r
101};\r
102\r
103#define wxDIRECT_CONSTRUCTOR_0(klass) \\r
104 wxDirectConstructorBridge_0<klass> constructor##klass; \\r
105 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
106 const wxChar *klass::ms_constructorProperties[] = { NULL }; \\r
107 const int klass::ms_constructorPropertiesCount = 0;\r
108\r
109\r
110// 1 param\r
111\r
112template<typename Class, typename T0>\r
113struct wxObjectAllocatorAndCreator_1 : public wxObjectAllocatorAndCreator\r
114{\r
115 bool Create(wxObject * &o, wxVariantBase *args)\r
116 {\r
117 Class *obj = wx_dynamic_cast(Class*, o);\r
118 return obj->Create(\r
119 args[0].wxTEMPLATED_MEMBER_CALL(Get, T0)\r
120 );\r
121 }\r
122};\r
123\r
124#define wxCONSTRUCTOR_1(klass,t0,v0) \\r
125 wxObjectAllocatorAndCreator_1<klass,t0> constructor##klass; \\r
126 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
127 const wxChar *klass::ms_constructorProperties[] = { wxT(#v0) }; \\r
128 const int klass::ms_constructorPropertiesCount = 1;\r
129\r
130// direct constructor version\r
131\r
132template<typename Class, typename T0>\r
133struct wxDirectConstructorBridge_1 : public wxObjectAllocator\r
134{\r
135 bool Create(wxObject * &o, wxVariantBase *args)\r
136 {\r
137 o = new Class(\r
138 args[0].wxTEMPLATED_MEMBER_CALL(Get, T0)\r
139 );\r
140 return o != NULL;\r
141 }\r
142};\r
143\r
144#define wxDIRECT_CONSTRUCTOR_1(klass,t0,v0) \\r
145 wxDirectConstructorBridge_1<klass,t0,t1> constructor##klass; \\r
146 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
147 const wxChar *klass::ms_constructorProperties[] = { wxT(#v0) }; \\r
148 const int klass::ms_constructorPropertiesCount = 1;\r
149\r
150\r
151// 2 params\r
152\r
153template<typename Class,\r
154typename T0, typename T1>\r
155struct wxObjectAllocatorAndCreator_2 : public wxObjectAllocatorAndCreator\r
156{\r
157 bool Create(wxObject * &o, wxVariantBase *args)\r
158 {\r
159 Class *obj = wx_dynamic_cast(Class*, o);\r
160 return obj->Create(\r
161 args[0].wxTEMPLATED_MEMBER_CALL(Get, T0),\r
162 args[1].wxTEMPLATED_MEMBER_CALL(Get, T1)\r
163 );\r
164 }\r
165};\r
166\r
167#define wxCONSTRUCTOR_2(klass,t0,v0,t1,v1) \\r
168 wxObjectAllocatorAndCreator_2<klass,t0,t1> constructor##klass; \\r
169 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
170 const wxChar *klass::ms_constructorProperties[] = { wxT(#v0), wxT(#v1) }; \\r
171 const int klass::ms_constructorPropertiesCount = 2;\r
172\r
173// direct constructor version\r
174\r
175template<typename Class,\r
176typename T0, typename T1>\r
177struct wxDirectConstructorBridge_2 : public wxObjectAllocator\r
178{\r
179 bool Create(wxObject * &o, wxVariantBase *args)\r
180 {\r
181 o = new Class(\r
182 args[0].wxTEMPLATED_MEMBER_CALL(Get, T0),\r
183 args[1].wxTEMPLATED_MEMBER_CALL(Get, T1)\r
184 );\r
185 return o != NULL;\r
186 }\r
187};\r
188\r
189#define wxDIRECT_CONSTRUCTOR_2(klass,t0,v0,t1,v1) \\r
190 wxDirectConstructorBridge_2<klass,t0,t1> constructor##klass; \\r
191 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
192 const wxChar *klass::ms_constructorProperties[] = { wxT(#v0), wxT(#v1) }; \\r
193 const int klass::ms_constructorPropertiesCount = 2;\r
194\r
195\r
196// 3 params\r
197\r
198template<typename Class,\r
199typename T0, typename T1, typename T2>\r
200struct wxObjectAllocatorAndCreator_3 : public wxObjectAllocatorAndCreator\r
201{\r
202 bool Create(wxObject * &o, wxVariantBase *args)\r
203 {\r
204 Class *obj = wx_dynamic_cast(Class*, o);\r
205 return obj->Create(\r
206 args[0].wxTEMPLATED_MEMBER_CALL(Get, T0),\r
207 args[1].wxTEMPLATED_MEMBER_CALL(Get, T1),\r
208 args[2].wxTEMPLATED_MEMBER_CALL(Get, T2)\r
209 );\r
210 }\r
211};\r
212\r
213#define wxCONSTRUCTOR_3(klass,t0,v0,t1,v1,t2,v2) \\r
214 wxObjectAllocatorAndCreator_3<klass,t0,t1,t2> constructor##klass; \\r
215 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
216 const wxChar *klass::ms_constructorProperties[] = { wxT(#v0), wxT(#v1), wxT(#v2) }; \\r
217 const int klass::ms_constructorPropertiesCount = 3;\r
218\r
219// direct constructor version\r
220\r
221template<typename Class,\r
222typename T0, typename T1, typename T2>\r
223struct wxDirectConstructorBridge_3 : public wxObjectAllocator\r
224{\r
225 bool Create(wxObject * &o, wxVariantBase *args)\r
226 {\r
227 o = new Class(\r
228 args[0].wxTEMPLATED_MEMBER_CALL(Get, T0),\r
229 args[1].wxTEMPLATED_MEMBER_CALL(Get, T1),\r
230 args[2].wxTEMPLATED_MEMBER_CALL(Get, T2)\r
231 );\r
232 return o != NULL;\r
233 }\r
234};\r
235\r
236#define wxDIRECT_CONSTRUCTOR_3(klass,t0,v0,t1,v1,t2,v2) \\r
237 wxDirectConstructorBridge_3<klass,t0,t1,t2> constructor##klass; \\r
238 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
239 const wxChar *klass::ms_constructorProperties[] = { wxT(#v0), wxT(#v1), wxT(#v2) }; \\r
240 const int klass::ms_constructorPropertiesCount = 3;\r
241\r
242\r
243// 4 params\r
244\r
245template<typename Class,\r
246typename T0, typename T1, typename T2, typename T3>\r
247struct wxObjectAllocatorAndCreator_4 : public wxObjectAllocatorAndCreator\r
248{\r
249 bool Create(wxObject * &o, wxVariantBase *args)\r
250 {\r
251 Class *obj = wx_dynamic_cast(Class*, o);\r
252 return obj->Create(\r
253 args[0].wxTEMPLATED_MEMBER_CALL(Get, T0),\r
254 args[1].wxTEMPLATED_MEMBER_CALL(Get, T1),\r
255 args[2].wxTEMPLATED_MEMBER_CALL(Get, T2),\r
256 args[3].wxTEMPLATED_MEMBER_CALL(Get, T3)\r
257 );\r
258 }\r
259};\r
260\r
261#define wxCONSTRUCTOR_4(klass,t0,v0,t1,v1,t2,v2,t3,v3) \\r
262 wxObjectAllocatorAndCreator_4<klass,t0,t1,t2,t3> constructor##klass; \\r
263 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
264 const wxChar *klass::ms_constructorProperties[] = \\r
265 { wxT(#v0), wxT(#v1), wxT(#v2), wxT(#v3) }; \\r
266 const int klass::ms_constructorPropertiesCount = 4;\r
267\r
268// direct constructor version\r
269\r
270template<typename Class,\r
271typename T0, typename T1, typename T2, typename T3>\r
272struct wxDirectConstructorBridge_4 : public wxObjectAllocator\r
273{\r
274 bool Create(wxObject * &o, wxVariantBase *args)\r
275 {\r
276 o = new Class(\r
277 args[0].wxTEMPLATED_MEMBER_CALL(Get, T0),\r
278 args[1].wxTEMPLATED_MEMBER_CALL(Get, T1),\r
279 args[2].wxTEMPLATED_MEMBER_CALL(Get, T2),\r
280 args[3].wxTEMPLATED_MEMBER_CALL(Get, T3)\r
281 );\r
282 return o != NULL;\r
283 }\r
284};\r
285\r
286#define wxDIRECT_CONSTRUCTOR_4(klass,t0,v0,t1,v1,t2,v2,t3,v3) \\r
287 wxDirectConstructorBridge_4<klass,t0,t1,t2,t3> constructor##klass; \\r
288 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
289 const wxChar *klass::ms_constructorProperties[] = \\r
290 { wxT(#v0), wxT(#v1), wxT(#v2), wxT(#v3) }; \\r
291 const int klass::ms_constructorPropertiesCount = 4;\r
292\r
293\r
294// 5 params\r
295\r
296template<typename Class,\r
297typename T0, typename T1, typename T2, typename T3, typename T4>\r
298struct wxObjectAllocatorAndCreator_5 : public wxObjectAllocatorAndCreator\r
299{\r
300 bool Create(wxObject * &o, wxVariantBase *args)\r
301 {\r
302 Class *obj = wx_dynamic_cast(Class*, o);\r
303 return obj->Create(\r
304 args[0].wxTEMPLATED_MEMBER_CALL(Get, T0),\r
305 args[1].wxTEMPLATED_MEMBER_CALL(Get, T1),\r
306 args[2].wxTEMPLATED_MEMBER_CALL(Get, T2),\r
307 args[3].wxTEMPLATED_MEMBER_CALL(Get, T3),\r
308 args[4].wxTEMPLATED_MEMBER_CALL(Get, T4)\r
309 );\r
310 }\r
311};\r
312\r
313#define wxCONSTRUCTOR_5(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4) \\r
314 wxObjectAllocatorAndCreator_5<klass,t0,t1,t2,t3,t4> constructor##klass; \\r
315 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
316 const wxChar *klass::ms_constructorProperties[] = \\r
317 { wxT(#v0), wxT(#v1), wxT(#v2), wxT(#v3), wxT(#v4) }; \\r
318 const int klass::ms_constructorPropertiesCount = 5;\r
319\r
320// direct constructor version\r
321\r
322template<typename Class,\r
323typename T0, typename T1, typename T2, typename T3, typename T4>\r
324struct wxDirectConstructorBridge_5 : public wxObjectAllocator\r
325{\r
326 bool Create(wxObject * &o, wxVariantBase *args)\r
327 {\r
328 o = new Class(\r
329 args[0].wxTEMPLATED_MEMBER_CALL(Get, T0),\r
330 args[1].wxTEMPLATED_MEMBER_CALL(Get, T1),\r
331 args[2].wxTEMPLATED_MEMBER_CALL(Get, T2),\r
332 args[3].wxTEMPLATED_MEMBER_CALL(Get, T3),\r
333 args[4].wxTEMPLATED_MEMBER_CALL(Get, T4)\r
334 );\r
335 return o != NULL;\r
336 }\r
337};\r
338\r
339#define wxDIRECT_CONSTRUCTOR_5(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4) \\r
340 wxDirectConstructorBridge_5<klass,t0,t1,t2,t3,t4> constructor##klass; \\r
341 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
342 const wxChar *klass::ms_constructorProperties[] = \\r
343 { wxT(#v0), wxT(#v1), wxT(#v2), wxT(#v3), wxT(#v4) }; \\r
344 const int klass::ms_constructorPropertiesCount = 5;\r
345\r
346\r
347// 6 params\r
348\r
349template<typename Class,\r
350typename T0, typename T1, typename T2, typename T3, typename T4, typename T5>\r
351struct wxObjectAllocatorAndCreator_6 : public wxObjectAllocatorAndCreator\r
352{\r
353 bool Create(wxObject * &o, wxVariantBase *args)\r
354 {\r
355 Class *obj = wx_dynamic_cast(Class*, o);\r
356 return obj->Create(\r
357 args[0].wxTEMPLATED_MEMBER_CALL(Get, T0),\r
358 args[1].wxTEMPLATED_MEMBER_CALL(Get, T1),\r
359 args[2].wxTEMPLATED_MEMBER_CALL(Get, T2),\r
360 args[3].wxTEMPLATED_MEMBER_CALL(Get, T3),\r
361 args[4].wxTEMPLATED_MEMBER_CALL(Get, T4),\r
362 args[5].wxTEMPLATED_MEMBER_CALL(Get, T5)\r
363 );\r
364 }\r
365};\r
366\r
367#define wxCONSTRUCTOR_6(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5) \\r
368 wxObjectAllocatorAndCreator_6<klass,t0,t1,t2,t3,t4,t5> constructor##klass; \\r
369 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
370 const wxChar *klass::ms_constructorProperties[] = \\r
371 { wxT(#v0), wxT(#v1), wxT(#v2), wxT(#v3), wxT(#v4), wxT(#v5) }; \\r
372 const int klass::ms_constructorPropertiesCount = 6;\r
373\r
374// direct constructor version\r
375\r
376template<typename Class,\r
377typename T0, typename T1, typename T2, typename T3, typename T4, typename T5>\r
378struct wxDirectConstructorBridge_6 : public wxObjectAllocator\r
379{\r
380 bool Create(wxObject * &o, wxVariantBase *args)\r
381 {\r
382 o = new Class(\r
383 args[0].wxTEMPLATED_MEMBER_CALL(Get, T0),\r
384 args[1].wxTEMPLATED_MEMBER_CALL(Get, T1),\r
385 args[2].wxTEMPLATED_MEMBER_CALL(Get, T2),\r
386 args[3].wxTEMPLATED_MEMBER_CALL(Get, T3),\r
387 args[4].wxTEMPLATED_MEMBER_CALL(Get, T4),\r
388 args[5].wxTEMPLATED_MEMBER_CALL(Get, T5)\r
389 );\r
390 return o != NULL;\r
391 }\r
392};\r
393\r
394#define wxDIRECT_CONSTRUCTOR_6(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5) \\r
395 wxDirectConstructorBridge_6<klass,t0,t1,t2,t3,t4,t5> constructor##klass; \\r
396 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
397 const wxChar *klass::ms_constructorProperties[] = { wxT(#v0), wxT(#v1), \\r
398 wxT(#v2), wxT(#v3), wxT(#v4), wxT(#v5) }; \\r
399 const int klass::ms_constructorPropertiesCount = 6;\r
400\r
401\r
402// 7 params\r
403\r
404template<typename Class,\r
405typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>\r
406struct wxObjectAllocatorAndCreator_7 : public wxObjectAllocatorAndCreator\r
407{\r
408 bool Create(wxObject * &o, wxVariantBase *args)\r
409 {\r
410 Class *obj = wx_dynamic_cast(Class*, o);\r
411 return obj->Create(\r
412 args[0].wxTEMPLATED_MEMBER_CALL(Get, T0),\r
413 args[1].wxTEMPLATED_MEMBER_CALL(Get, T1),\r
414 args[2].wxTEMPLATED_MEMBER_CALL(Get, T2),\r
415 args[3].wxTEMPLATED_MEMBER_CALL(Get, T3),\r
416 args[4].wxTEMPLATED_MEMBER_CALL(Get, T4),\r
417 args[5].wxTEMPLATED_MEMBER_CALL(Get, T5),\r
418 args[6].wxTEMPLATED_MEMBER_CALL(Get, T6)\r
419 );\r
420 }\r
421};\r
422\r
423#define wxCONSTRUCTOR_7(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5,t6,v6) \\r
424 wxObjectAllocatorAndCreator_7<klass,t0,t1,t2,t3,t4,t5,t6> constructor##klass; \\r
425 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
426 const wxChar *klass::ms_constructorProperties[] = { wxT(#v0), wxT(#v1), \\r
427 wxT(#v2), wxT(#v3), wxT(#v4), wxT(#v5), wxT(#v6) }; \\r
428 const int klass::ms_constructorPropertiesCount = 7;\r
429\r
430// direct constructor version\r
431\r
432template<typename Class,\r
433typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>\r
434struct wxDirectConstructorBridge_7 : public wxObjectAllocator\r
435{\r
436 bool Create(wxObject * &o, wxVariantBase *args)\r
437 {\r
438 o = new Class(\r
439 args[0].wxTEMPLATED_MEMBER_CALL(Get, T0),\r
440 args[1].wxTEMPLATED_MEMBER_CALL(Get, T1),\r
441 args[2].wxTEMPLATED_MEMBER_CALL(Get, T2),\r
442 args[3].wxTEMPLATED_MEMBER_CALL(Get, T3),\r
443 args[4].wxTEMPLATED_MEMBER_CALL(Get, T4),\r
444 args[3].wxTEMPLATED_MEMBER_CALL(Get, T5),\r
445 args[4].wxTEMPLATED_MEMBER_CALL(Get, T6)\r
446 );\r
447 return o != NULL;\r
448 }\r
449};\r
450\r
451#define wxDIRECT_CONSTRUCTOR_7(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5,t6,v6) \\r
452 wxDirectConstructorBridge_7<klass,t0,t1,t2,t3,t4,t5,t6> constructor##klass; \\r
453 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
454 const wxChar *klass::ms_constructorProperties[] = \\r
455 { wxT(#v0), wxT(#v1), wxT(#v2), wxT(#v3), wxT(#v4), wxT(#v5), wxT(#v6) }; \\r
456 const int klass::ms_constructorPropertiesCount = 7;\r
457\r
458\r
459// 8 params\r
460\r
461template<typename Class,\r
462typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, \\r
463typename T6, typename T7>\r
464struct wxObjectAllocatorAndCreator_8 : public wxObjectAllocatorAndCreator\r
465{\r
466 bool Create(wxObject * &o, wxVariantBase *args)\r
467 {\r
468 Class *obj = wx_dynamic_cast(Class*, o);\r
469 return obj->Create(\r
470 args[0].wxTEMPLATED_MEMBER_CALL(Get, T0),\r
471 args[1].wxTEMPLATED_MEMBER_CALL(Get, T1),\r
472 args[2].wxTEMPLATED_MEMBER_CALL(Get, T2),\r
473 args[3].wxTEMPLATED_MEMBER_CALL(Get, T3),\r
474 args[4].wxTEMPLATED_MEMBER_CALL(Get, T4),\r
475 args[5].wxTEMPLATED_MEMBER_CALL(Get, T5),\r
476 args[6].wxTEMPLATED_MEMBER_CALL(Get, T6),\r
477 args[7].wxTEMPLATED_MEMBER_CALL(Get, T7)\r
478 );\r
479 }\r
480};\r
481\r
482#define wxCONSTRUCTOR_8(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5,t6,v6,t7,v7) \\r
483 wxObjectAllocatorAndCreator_8<klass,t0,t1,t2,t3,t4,t5,t6,t7> constructor##klass; \\r
484 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
485 const wxChar *klass::ms_constructorProperties[] = \\r
486 { wxT(#v0), wxT(#v1), wxT(#v2), wxT(#v3), wxT(#v4), wxT(#v5), wxT(#v6), wxT(#v7) }; \\r
487 const int klass::ms_constructorPropertiesCount = 8;\r
488\r
489// direct constructor version\r
490\r
491template<typename Class,\r
492typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, \\r
493typename T6, typename T7>\r
494struct wxDirectConstructorBridge_8 : public wxObjectAllocator\r
495{\r
496 bool Create(wxObject * &o, wxVariantBase *args)\r
497 {\r
498 o = new Class(\r
499 args[0].wxTEMPLATED_MEMBER_CALL(Get, T0),\r
500 args[1].wxTEMPLATED_MEMBER_CALL(Get, T1),\r
501 args[2].wxTEMPLATED_MEMBER_CALL(Get, T2),\r
502 args[3].wxTEMPLATED_MEMBER_CALL(Get, T3),\r
503 args[4].wxTEMPLATED_MEMBER_CALL(Get, T4),\r
504 args[3].wxTEMPLATED_MEMBER_CALL(Get, T5),\r
505 args[4].wxTEMPLATED_MEMBER_CALL(Get, T6),\r
506 args[4].wxTEMPLATED_MEMBER_CALL(Get, T7)\r
507 );\r
508 return o != NULL;\r
509 }\r
510};\r
511\r
512#define wxDIRECT_CONSTRUCTOR_8(klass,t0,v0,t1,v1,t2,v2,t3,v3,t4,v4,t5,v5,t6,v6,t7,v7) \\r
513 wxDirectConstructorBridge_8<klass,t0,t1,t2,t3,t4,t5,t6,t7> constructor##klass; \\r
514 wxObjectAllocatorAndCreator* klass::ms_constructor = &constructor##klass; \\r
515 const wxChar *klass::ms_constructorProperties[] = \\r
516 { wxT(#v0), wxT(#v1), wxT(#v2), wxT(#v3), wxT(#v4), wxT(#v5), wxT(#v6), wxT(#v7) }; \\r
517 const int klass::ms_constructorPropertiesCount = 8;\r
518\r
519#endif // wxUSE_EXTENDED_RTTI\r
520#endif // _XTICTOR_H_\r