fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / framework / inc / macros / xtypeprovider.hxx
blobd6e463c5ae3f0c0236fbfcbcbd7aee546e066645
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_FRAMEWORK_INC_MACROS_XTYPEPROVIDER_HXX
21 #define INCLUDED_FRAMEWORK_INC_MACROS_XTYPEPROVIDER_HXX
23 #include <com/sun/star/lang/XTypeProvider.hpp>
24 #include <com/sun/star/uno/RuntimeException.hpp>
26 #include <com/sun/star/uno/Any.hxx>
27 #include <com/sun/star/uno/Reference.hxx>
28 #include <com/sun/star/uno/Sequence.hxx>
29 #include <com/sun/star/uno/Type.hxx>
30 #include <cppuhelper/typeprovider.hxx>
31 #include <osl/mutex.hxx>
32 #include <rtl/ustring.hxx>
34 namespace framework{
36 /*_________________________________________________________________________________________________________________
38 macros for declaration and definition of XTypeProvider
39 Please use follow public macros only!
41 1) DEFINE_XTYPEPROVIDER => use it in header to declare XTypeProvider and his methods
42 2) DECLARE_TYPEPROVIDER_0( CLASS ) => use it to define implementation of XTypeProvider for 0 supported type
43 DECLARE_TYPEPROVIDER_1( CLASS, TYPE1 ) => use it to define implementation of XTypeProvider for 1 supported type
44 ...
45 DECLARE_TYPEPROVIDER_16( CLASS, TYPE1, ... , TYPE16 )
46 3) DEFINE_XTYPEPROVIDER_1_WITH_BASECLASS( CLASS, BASECLASS, TYPE1 ) => use it to define implementation of XTypeProvider for 1 additional supported type to baseclass
47 ...
48 DEFINE_XTYPEPROVIDER_5_WITH_BASECLASS( CLASS, BASECLASS, TYPE1, ..., TYPE5 )
50 _________________________________________________________________________________________________________________*/
52 // private
53 // implementation of XTypeProvider::getImplementationId()
55 #define PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
56 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL CLASS::getImplementationId() throw( ::com::sun::star::uno::RuntimeException, std::exception ) \
57 { \
58 return css::uno::Sequence<sal_Int8>(); \
61 // private
62 // implementation of XTypeProvider::getTypes() with max. 12 interfaces!
64 #define PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES( CLASS, TYPES ) \
65 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL CLASS::getTypes() throw( ::com::sun::star::uno::RuntimeException, std::exception ) \
66 { \
67 /* Optimize this method ! */ \
68 /* We initialize a static variable only one time. */ \
69 /* And we don't must use a mutex at every call! */ \
70 /* For the first call; pTypeCollection is NULL - */ \
71 /* for the second call pTypeCollection is different from NULL! */ \
72 static ::cppu::OTypeCollection* pTypeCollection = NULL; \
73 if ( pTypeCollection == NULL ) \
74 { \
75 /* Ready for multithreading; get global mutex for first call of this method only! see before */ \
76 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); \
77 /* Control these pointer again ... it can be, that another instance will be faster then these! */ \
78 if ( pTypeCollection == NULL ) \
79 { \
80 /* Create a static typecollection ... */ \
81 /* Attention: "TYPES" will expand to "(...)"! */ \
82 static ::cppu::OTypeCollection aTypeCollection TYPES; \
83 /* ... and set his address to static pointer! */ \
84 pTypeCollection = &aTypeCollection; \
85 } \
86 } \
87 return pTypeCollection->getTypes(); \
90 // private
91 // implementation of XTypeProvider::getTypes() with more than 12 interfaces!
93 #define PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_LARGE( CLASS, TYPES_FIRST, TYPES_SECOND ) \
94 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL CLASS::getTypes() throw( ::com::sun::star::uno::RuntimeException, std::exception ) \
95 { \
96 /* Optimize this method ! */ \
97 /* We initialize a static variable only one time. */ \
98 /* And we don't must use a mutex at every call! */ \
99 /* For the first call; pTypeCollection is NULL - */ \
100 /* for the second call pTypeCollection is different from NULL! */ \
101 static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >* pTypeCollection = NULL; \
102 if ( pTypeCollection == NULL ) \
104 /* Ready for multithreading; get global mutex for first call of this method only! see before */ \
105 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); \
106 /* Control these pointer again ... it can be, that another instance will be faster then these! */ \
107 if ( pTypeCollection == NULL ) \
109 /* Create two typecollections */ \
110 /* (cppuhelper support 12 items per collection only!) */ \
111 ::cppu::OTypeCollection aTypeCollection1 TYPES_FIRST; \
112 ::cppu::OTypeCollection aTypeCollection2 TYPES_SECOND; \
113 /* Copy all items from both sequences to one result list! */ \
114 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqTypes1 = aTypeCollection1.getTypes(); \
115 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqTypes2 = aTypeCollection2.getTypes(); \
116 sal_Int32 nCount1 = seqTypes1.getLength(); \
117 sal_Int32 nCount2 = seqTypes2.getLength(); \
118 static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqResult ( nCount1+nCount2 ); \
119 sal_Int32 nSource = 0; \
120 sal_Int32 nDestination= 0; \
121 while( nSource<nCount1 ) \
123 seqResult[nDestination] = seqTypes1[nSource]; \
124 ++nSource; \
125 ++nDestination; \
127 nSource = 0; \
128 while( nSource<nCount2 ) \
130 seqResult[nDestination] = seqTypes2[nSource]; \
131 ++nSource; \
132 ++nDestination; \
134 /* ... and set his address to static pointer! */ \
135 pTypeCollection = &seqResult; \
138 return *pTypeCollection; \
141 // private
142 // implementation of XTypeProvider::getTypes() with using max. 12 interfaces + baseclass!
144 #define PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_BASECLASS( CLASS, BASECLASS, TYPES ) \
145 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL CLASS::getTypes() throw( ::com::sun::star::uno::RuntimeException ) \
147 /* Optimize this method ! */ \
148 /* We initialize a static variable only one time. */ \
149 /* And we don't must use a mutex at every call! */ \
150 /* For the first call; pTypeCollection is NULL - */ \
151 /* for the second call pTypeCollection is different from NULL! */ \
152 static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >* pTypeCollection = NULL; \
153 if ( pTypeCollection == NULL ) \
155 /* Ready for multithreading; get global mutex for first call of this method only! see before */ \
156 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); \
157 /* Control these pointer again ... it can be, that another instance will be faster then these! */ \
158 if ( pTypeCollection == NULL ) \
160 /* Create static typecollection for my own interfaces! */ \
161 static ::cppu::OTypeCollection aTypeCollection TYPES; \
162 /* Copy all items from my list sequences and from my baseclass */ \
163 /* to one result list! */ \
164 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqTypes1 = aTypeCollection.getTypes(); \
165 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqTypes2 = BASECLASS::getTypes(); \
166 sal_Int32 nCount1 = seqTypes1.getLength(); \
167 sal_Int32 nCount2 = seqTypes2.getLength(); \
168 static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqResult ( nCount1+nCount2 ); \
169 sal_Int32 nSource = 0; \
170 sal_Int32 nDestination= 0; \
171 while( nSource<nCount1 ) \
173 seqResult[nDestination] = seqTypes1[nSource]; \
174 ++nSource; \
175 ++nDestination; \
177 nSource = 0; \
178 while( nSource<nCount2 ) \
180 seqResult[nDestination] = seqTypes2[nSource]; \
181 ++nSource; \
182 ++nDestination; \
184 /* ... and set his address to static pointer! */ \
185 pTypeCollection = &seqResult; \
188 return *pTypeCollection; \
191 // private
192 // help macros to replace TYPES in getTypes() [see before]
194 #define PRIVATE_DEFINE_TYPE_1( TYPE1 ) \
195 cppu::UnoType<TYPE1>::get()
197 #define PRIVATE_DEFINE_TYPE_2( TYPE1, TYPE2 ) \
198 PRIVATE_DEFINE_TYPE_1( TYPE1 ), \
199 cppu::UnoType<TYPE2>::get()
201 #define PRIVATE_DEFINE_TYPE_3( TYPE1, TYPE2, TYPE3 ) \
202 PRIVATE_DEFINE_TYPE_2( TYPE1, TYPE2 ), \
203 cppu::UnoType<TYPE3>::get()
205 #define PRIVATE_DEFINE_TYPE_4( TYPE1, TYPE2, TYPE3, TYPE4 ) \
206 PRIVATE_DEFINE_TYPE_3( TYPE1, TYPE2, TYPE3 ), \
207 cppu::UnoType<TYPE4>::get()
209 #define PRIVATE_DEFINE_TYPE_5( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5 ) \
210 PRIVATE_DEFINE_TYPE_4( TYPE1, TYPE2, TYPE3, TYPE4 ), \
211 cppu::UnoType<TYPE5>::get()
213 #define PRIVATE_DEFINE_TYPE_6( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6 ) \
214 PRIVATE_DEFINE_TYPE_5( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5 ), \
215 cppu::UnoType<TYPE6>::get()
217 #define PRIVATE_DEFINE_TYPE_7( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7 ) \
218 PRIVATE_DEFINE_TYPE_6( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6 ), \
219 cppu::UnoType<TYPE7>::get()
221 #define PRIVATE_DEFINE_TYPE_8( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8 ) \
222 PRIVATE_DEFINE_TYPE_7( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7 ), \
223 cppu::UnoType<TYPE8>::get()
225 #define PRIVATE_DEFINE_TYPE_9( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9 ) \
226 PRIVATE_DEFINE_TYPE_8( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8 ), \
227 cppu::UnoType<TYPE9>::get()
229 #define PRIVATE_DEFINE_TYPE_10( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10 ) \
230 PRIVATE_DEFINE_TYPE_9( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9 ), \
231 cppu::UnoType<TYPE10>::get()
233 #define PRIVATE_DEFINE_TYPE_11( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11 ) \
234 PRIVATE_DEFINE_TYPE_10( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10 ), \
235 cppu::UnoType<TYPE11>::get()
237 #define PRIVATE_DEFINE_TYPE_12( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12 ) \
238 PRIVATE_DEFINE_TYPE_11( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11 ), \
239 cppu::UnoType<TYPE12>::get()
241 // private
242 // complete implementation of XTypeProvider
244 #define PRIVATE_DEFINE_XTYPEPROVIDER_PURE( CLASS ) \
245 PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
246 PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES( CLASS, cppu::UnoType<com::sun::star::lang::XTypeProvider>::get())
248 #define PRIVATE_DEFINE_XTYPEPROVIDER( CLASS, TYPES ) \
249 PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
250 PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES( CLASS, TYPES )
252 #define PRIVATE_DEFINE_XTYPEPROVIDER_LARGE( CLASS, TYPES_FIRST, TYPES_SECOND ) \
253 PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
254 PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_LARGE( CLASS, TYPES_FIRST, TYPES_SECOND )
256 #define PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS( CLASS, BASECLASS, TYPES ) \
257 PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
258 PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_BASECLASS( CLASS, BASECLASS, TYPES )
260 // public
261 // declaration of XTypeProvider
263 #define FWK_DECLARE_XTYPEPROVIDER \
264 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes () throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;\
265 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
267 // public
268 // implementation of XTypeProvider
270 // implementation of XTypeProvider without additional interface for getTypes()
271 // XTypeProvider is used as the only one interface automatically.
272 // Following defines don't use XTypeProvider automatically!!!!
273 #define DEFINE_XTYPEPROVIDER_0( CLASS ) \
274 PRIVATE_DEFINE_XTYPEPROVIDER_PURE( CLASS )
276 // implementation of XTypeProvider with 1 additional interface for getTypes()
277 #define DEFINE_XTYPEPROVIDER_1( CLASS, TYPE1 ) \
278 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
279 (PRIVATE_DEFINE_TYPE_1 ( TYPE1 \
280 )) \
283 // implementation of XTypeProvider with 2 additional interfaces for getTypes()
284 #define DEFINE_XTYPEPROVIDER_2( CLASS, TYPE1, TYPE2 ) \
285 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
286 (PRIVATE_DEFINE_TYPE_2 ( TYPE1 , \
287 TYPE2 \
288 )) \
291 // implementation of XTypeProvider with 3 additional interfaces for getTypes()
292 #define DEFINE_XTYPEPROVIDER_3( CLASS, TYPE1, TYPE2, TYPE3 ) \
293 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
294 (PRIVATE_DEFINE_TYPE_3 ( TYPE1 , \
295 TYPE2 , \
296 TYPE3 \
297 )) \
300 // implementation of XTypeProvider with 4 additional interfaces for getTypes()
301 #define DEFINE_XTYPEPROVIDER_4( CLASS, TYPE1, TYPE2, TYPE3, TYPE4 ) \
302 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
303 (PRIVATE_DEFINE_TYPE_4 ( TYPE1 , \
304 TYPE2 , \
305 TYPE3 , \
306 TYPE4 \
307 )) \
310 // implementation of XTypeProvider with 5 additional interfaces for getTypes()
311 #define DEFINE_XTYPEPROVIDER_5( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5 ) \
312 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
313 (PRIVATE_DEFINE_TYPE_5 ( TYPE1 , \
314 TYPE2 , \
315 TYPE3 , \
316 TYPE4 , \
317 TYPE5 \
318 )) \
321 // implementation of XTypeProvider with 6 additional interfaces for getTypes()
322 #define DEFINE_XTYPEPROVIDER_6( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6 ) \
323 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
324 (PRIVATE_DEFINE_TYPE_6 ( TYPE1 , \
325 TYPE2 , \
326 TYPE3 , \
327 TYPE4 , \
328 TYPE5 , \
329 TYPE6 \
330 )) \
333 // implementation of XTypeProvider with 7 additional interfaces for getTypes()
334 #define DEFINE_XTYPEPROVIDER_7( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7 ) \
335 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
336 (PRIVATE_DEFINE_TYPE_7 ( TYPE1 , \
337 TYPE2 , \
338 TYPE3 , \
339 TYPE4 , \
340 TYPE5 , \
341 TYPE6 , \
342 TYPE7 \
343 )) \
346 // implementation of XTypeProvider with 8 additional interfaces for getTypes()
347 #define DEFINE_XTYPEPROVIDER_8( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8 ) \
348 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
349 (PRIVATE_DEFINE_TYPE_8 ( TYPE1 , \
350 TYPE2 , \
351 TYPE3 , \
352 TYPE4 , \
353 TYPE5 , \
354 TYPE6 , \
355 TYPE7 , \
356 TYPE8 \
357 )) \
360 // implementation of XTypeProvider with 9 additional interfaces for getTypes()
361 #define DEFINE_XTYPEPROVIDER_9( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9 ) \
362 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
363 (PRIVATE_DEFINE_TYPE_9 ( TYPE1 , \
364 TYPE2 , \
365 TYPE3 , \
366 TYPE4 , \
367 TYPE5 , \
368 TYPE6 , \
369 TYPE7 , \
370 TYPE8 , \
371 TYPE9 \
372 )) \
375 // implementation of XTypeProvider with 10 additional interfaces for getTypes()
376 #define DEFINE_XTYPEPROVIDER_10( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10 ) \
377 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
378 (PRIVATE_DEFINE_TYPE_10 ( TYPE1 , \
379 TYPE2 , \
380 TYPE3 , \
381 TYPE4 , \
382 TYPE5 , \
383 TYPE6 , \
384 TYPE7 , \
385 TYPE8 , \
386 TYPE9 , \
387 TYPE10 \
388 )) \
391 // implementation of XTypeProvider with 11 additional interfaces for getTypes()
392 #define DEFINE_XTYPEPROVIDER_11( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11 ) \
393 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
394 (PRIVATE_DEFINE_TYPE_11 ( TYPE1 , \
395 TYPE2 , \
396 TYPE3 , \
397 TYPE4 , \
398 TYPE5 , \
399 TYPE6 , \
400 TYPE7 , \
401 TYPE8 , \
402 TYPE9 , \
403 TYPE10 , \
404 TYPE11 \
405 )) \
408 // implementation of XTypeProvider with 12 additional interfaces for getTypes()
409 #define DEFINE_XTYPEPROVIDER_12( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12 ) \
410 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
411 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
412 TYPE2 , \
413 TYPE3 , \
414 TYPE4 , \
415 TYPE5 , \
416 TYPE6 , \
417 TYPE7 , \
418 TYPE8 , \
419 TYPE9 , \
420 TYPE10 , \
421 TYPE11 , \
422 TYPE12 \
423 )) \
426 // implementation of XTypeProvider with 13 additional interfaces for getTypes()
427 #define DEFINE_XTYPEPROVIDER_13( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13 ) \
428 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
429 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
430 TYPE2 , \
431 TYPE3 , \
432 TYPE4 , \
433 TYPE5 , \
434 TYPE6 , \
435 TYPE7 , \
436 TYPE8 , \
437 TYPE9 , \
438 TYPE10 , \
439 TYPE11 , \
440 TYPE12 \
441 )), \
442 (PRIVATE_DEFINE_TYPE_1 ( TYPE13 \
443 )) \
446 // implementation of XTypeProvider with 14 additional interfaces for getTypes()
447 #define DEFINE_XTYPEPROVIDER_14( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14 ) \
448 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
449 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
450 TYPE2 , \
451 TYPE3 , \
452 TYPE4 , \
453 TYPE5 , \
454 TYPE6 , \
455 TYPE7 , \
456 TYPE8 , \
457 TYPE9 , \
458 TYPE10 , \
459 TYPE11 , \
460 TYPE12 \
461 )), \
462 (PRIVATE_DEFINE_TYPE_2 ( TYPE13 , \
463 TYPE14 \
464 )) \
467 // implementation of XTypeProvider with 15 additional interfaces for getTypes()
468 #define DEFINE_XTYPEPROVIDER_15( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15 ) \
469 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
470 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
471 TYPE2 , \
472 TYPE3 , \
473 TYPE4 , \
474 TYPE5 , \
475 TYPE6 , \
476 TYPE7 , \
477 TYPE8 , \
478 TYPE9 , \
479 TYPE10 , \
480 TYPE11 , \
481 TYPE12 \
482 )), \
483 (PRIVATE_DEFINE_TYPE_3 ( TYPE13 , \
484 TYPE14 , \
485 TYPE15 \
486 )) \
489 // implementation of XTypeProvider with 16 additional interfaces for getTypes()
490 #define DEFINE_XTYPEPROVIDER_16( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16 ) \
491 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
492 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
493 TYPE2 , \
494 TYPE3 , \
495 TYPE4 , \
496 TYPE5 , \
497 TYPE6 , \
498 TYPE7 , \
499 TYPE8 , \
500 TYPE9 , \
501 TYPE10 , \
502 TYPE11 , \
503 TYPE12 \
504 )), \
505 (PRIVATE_DEFINE_TYPE_4 ( TYPE13 , \
506 TYPE14 , \
507 TYPE15 , \
508 TYPE16 \
509 )) \
512 // implementation of XTypeProvider with 17 additional interfaces for getTypes()
513 #define DEFINE_XTYPEPROVIDER_17( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16, TYPE17 ) \
514 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
515 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
516 TYPE2 , \
517 TYPE3 , \
518 TYPE4 , \
519 TYPE5 , \
520 TYPE6 , \
521 TYPE7 , \
522 TYPE8 , \
523 TYPE9 , \
524 TYPE10 , \
525 TYPE11 , \
526 TYPE12 \
527 )), \
528 (PRIVATE_DEFINE_TYPE_5 ( TYPE13 , \
529 TYPE14 , \
530 TYPE15 , \
531 TYPE16 , \
532 TYPE17 \
533 )) \
536 // implementation of XTypeProvider with 18 additional interfaces for getTypes()
537 #define DEFINE_XTYPEPROVIDER_18( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16, TYPE17, TYPE18 ) \
538 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
539 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
540 TYPE2 , \
541 TYPE3 , \
542 TYPE4 , \
543 TYPE5 , \
544 TYPE6 , \
545 TYPE7 , \
546 TYPE8 , \
547 TYPE9 , \
548 TYPE10 , \
549 TYPE11 , \
550 TYPE12 \
551 )), \
552 (PRIVATE_DEFINE_TYPE_6 ( TYPE13 , \
553 TYPE14 , \
554 TYPE15 , \
555 TYPE16 , \
556 TYPE17 , \
557 TYPE18 \
558 )) \
561 // implementation of XTypeProvider with 19 additional interfaces for getTypes()
562 #define DEFINE_XTYPEPROVIDER_19( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16, TYPE17, TYPE18, TYPE19 ) \
563 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
564 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
565 TYPE2 , \
566 TYPE3 , \
567 TYPE4 , \
568 TYPE5 , \
569 TYPE6 , \
570 TYPE7 , \
571 TYPE8 , \
572 TYPE9 , \
573 TYPE10 , \
574 TYPE11 , \
575 TYPE12 \
576 )), \
577 (PRIVATE_DEFINE_TYPE_7 ( TYPE13 , \
578 TYPE14 , \
579 TYPE15 , \
580 TYPE16 , \
581 TYPE17 , \
582 TYPE18 , \
583 TYPE19 \
584 )) \
587 // implementation of XTypeProvider with 20 additional interfaces for getTypes()
588 #define DEFINE_XTYPEPROVIDER_20( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16, TYPE17, TYPE18, TYPE19, TYPE20 ) \
589 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
590 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
591 TYPE2 , \
592 TYPE3 , \
593 TYPE4 , \
594 TYPE5 , \
595 TYPE6 , \
596 TYPE7 , \
597 TYPE8 , \
598 TYPE9 , \
599 TYPE10 , \
600 TYPE11 , \
601 TYPE12 \
602 )), \
603 (PRIVATE_DEFINE_TYPE_8 ( TYPE13 , \
604 TYPE14 , \
605 TYPE15 , \
606 TYPE16 , \
607 TYPE17 , \
608 TYPE18 , \
609 TYPE19 , \
610 TYPE20 \
611 )) \
614 // implementation of XTypeProvider with 20 additional interfaces for getTypes()
615 #define DEFINE_XTYPEPROVIDER_21( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16, TYPE17, TYPE18, TYPE19, TYPE20, TYPE21 ) \
616 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
617 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
618 TYPE2 , \
619 TYPE3 , \
620 TYPE4 , \
621 TYPE5 , \
622 TYPE6 , \
623 TYPE7 , \
624 TYPE8 , \
625 TYPE9 , \
626 TYPE10 , \
627 TYPE11 , \
628 TYPE12 \
629 )), \
630 (PRIVATE_DEFINE_TYPE_9 ( TYPE13 , \
631 TYPE14 , \
632 TYPE15 , \
633 TYPE16 , \
634 TYPE17 , \
635 TYPE18 , \
636 TYPE19 , \
637 TYPE20 , \
638 TYPE21 \
639 )) \
642 // implementation of XTypeProvider with 1 additional interface for getTypes() AND using 1 baseclass
643 #define DEFINE_XTYPEPROVIDER_1_WITH_BASECLASS( CLASS, BASECLASS, TYPE1 ) \
644 PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS ( CLASS, \
645 BASECLASS, \
646 (PRIVATE_DEFINE_TYPE_1 ( TYPE1 \
647 )) \
650 // implementation of XTypeProvider with 2 additional interface for getTypes() AND using 1 baseclass
651 #define DEFINE_XTYPEPROVIDER_2_WITH_BASECLASS( CLASS, BASECLASS, TYPE1, TYPE2 ) \
652 PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS ( CLASS, \
653 BASECLASS, \
654 (PRIVATE_DEFINE_TYPE_2 ( TYPE1 , \
655 TYPE2 \
656 )) \
659 // implementation of XTypeProvider with 3 additional interface for getTypes() AND using 1 baseclass
660 #define DEFINE_XTYPEPROVIDER_3_WITH_BASECLASS( CLASS, BASECLASS, TYPE1, TYPE2, TYPE3 ) \
661 PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS ( CLASS, \
662 BASECLASS, \
663 (PRIVATE_DEFINE_TYPE_3 ( TYPE1 , \
664 TYPE2 , \
665 TYPE3 \
666 )) \
668 // implementation of XTypeProvider with 4 additional interface for getTypes() AND using 1 baseclass
669 #define DEFINE_XTYPEPROVIDER_4_WITH_BASECLASS( CLASS, BASECLASS, TYPE1, TYPE2, TYPE3, TYPE4 ) \
670 PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS ( CLASS, \
671 BASECLASS, \
672 (PRIVATE_DEFINE_TYPE_4 ( TYPE1 , \
673 TYPE2 , \
674 TYPE3 , \
675 TYPE4 \
676 )) \
678 // implementation of XTypeProvider with 5 additional interface for getTypes() AND using 1 baseclass
679 #define DEFINE_XTYPEPROVIDER_5_WITH_BASECLASS( CLASS, BASECLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5 ) \
680 PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS ( CLASS, \
681 BASECLASS, \
682 (PRIVATE_DEFINE_TYPE_5 ( TYPE1 , \
683 TYPE2 , \
684 TYPE3 , \
685 TYPE4 , \
686 TYPE5 \
687 )) \
690 } // namespace framework
692 #endif // INCLUDED_FRAMEWORK_INC_MACROS_XTYPEPROVIDER_HXX
694 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */