bump product version to 4.1.6.2
[LibreOffice.git] / framework / inc / macros / xinterface.hxx
blobc6d537567e8cba967039aba2c7b6a9bd023d8966
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 __FRAMEWORK_MACROS_XINTERFACE_HXX_
21 #define __FRAMEWORK_MACROS_XINTERFACE_HXX_
23 #include <com/sun/star/uno/RuntimeException.hpp>
25 #include <com/sun/star/uno/Any.hxx>
26 #include <com/sun/star/uno/Reference.hxx>
27 #include <com/sun/star/uno/Type.hxx>
28 #include <cppuhelper/queryinterface.hxx>
29 #include <rtl/ustring.hxx>
31 namespace framework{
33 /*_________________________________________________________________________________________________________________
35 macros for declaration and definition of XInterface
36 Please use follow public macros only!
38 1) DEFINE_XINTERFACE => use it in header to declare XInterface and his methods
39 2) DIRECT_INTERFACE( INTERFACE ) => use it as parameter INTERFACEx at 4) if interface not ambigous
40 3) DERIVED_INTERFACE( BASEINTERFACE, DERIVEDINTERFACE ) => use it as parameter INTERFACEx at 4) if interface can be ambigous
41 4) DECLARE_XINTERFACE_0( CLASS, BASECLASS ) => use it to define implementation of XInterface for 0 additional interface to baseclass
42 DECLARE_XINTERFACE_1( CLASS, BASECLASS, INTERFACE1 ) => use it to define implementation of XInterface for 1 additional interface to baseclass
43 ...
44 DECLARE_XINTERFACE_16( CLASS, BASECLASS, INTERFACE1, ... , INTERFACE16 )
46 _________________________________________________________________________________________________________________*/
48 //*****************************************************************************************************************
49 // private
50 // implementation of XInterface::aquire()
51 // XInterface::release()
52 //*****************************************************************************************************************
53 #define PRIVATE_DEFINE_XINTERFACE_AQUIRE_RELEASE( CLASS, BASECLASS ) \
54 void SAL_CALL CLASS::acquire() throw() \
55 { \
56 /* Don't use mutex in methods of XInterface! */ \
57 BASECLASS::acquire(); \
58 } \
60 void SAL_CALL CLASS::release() throw() \
61 { \
62 /* Don't use mutex in methods of XInterface! */ \
63 BASECLASS::release(); \
66 //*****************************************************************************************************************
67 // private
68 // implementation of XInterface::queryInterface() without any other interfaces!
69 //*****************************************************************************************************************
70 #define PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE_PURE( CLASS, BASECLASS ) \
71 ::com::sun::star::uno::Any SAL_CALL CLASS::queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ) \
72 { \
73 /* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */ \
74 /* I have no own supported interfaces ... */ \
75 /* ... ask baseclass for interfaces! */ \
76 return BASECLASS::queryInterface( aType ); \
79 //*****************************************************************************************************************
80 // private
81 // implementation of XInterface::queryInterface() with max. 12 other interfaces!
82 //*****************************************************************************************************************
83 #define PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE( CLASS, BASECLASS, INTERFACES ) \
84 ::com::sun::star::uno::Any SAL_CALL CLASS::queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ) \
85 { \
86 /* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */ \
87 /* Ask for my own supported interfaces ... */ \
88 ::com::sun::star::uno::Any aReturn ( ::cppu::queryInterface INTERFACES \
89 ); \
90 /* If searched interface not supported by this class ... */ \
91 if ( aReturn.hasValue() == sal_False ) \
92 { \
93 /* ... ask baseclass for interfaces! */ \
94 aReturn = BASECLASS::queryInterface( aType ); \
95 } \
96 /* Return result of this search. */ \
97 return aReturn; \
100 //*****************************************************************************************************************
101 // private
102 // implementation of XInterface::queryInterface() with more then 12 other interfaces!
103 //*****************************************************************************************************************
104 #define PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE_LARGE( CLASS, BASECLASS, INTERFACES_FIRST, INTERFACES_SECOND ) \
105 ::com::sun::star::uno::Any SAL_CALL CLASS::queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ) \
107 /* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */ \
108 /* Ask for my own supported interfaces ... */ \
109 ::com::sun::star::uno::Any aReturn ( ::cppu::queryInterface INTERFACES_FIRST \
110 ); \
111 /* If searched interface not supported by first group ... */ \
112 if ( aReturn.hasValue() == sal_False ) \
114 /* ... search in second group. (cppuhelper support 12 items only!) */ \
115 aReturn = ::cppu::queryInterface INTERFACES_SECOND ; \
116 /* If searched interface not supported by this class ... */ \
117 if ( aReturn.hasValue() == sal_False ) \
119 /* ... ask baseclass for interfaces! */ \
120 aReturn = BASECLASS::queryInterface( aType ); \
123 /* Return result of this search. */ \
124 return aReturn; \
127 //*****************************************************************************************************************
128 // private
129 // complete implementation of XInterface for different use cases
130 //*****************************************************************************************************************
131 #define PRIVATE_DEFINE_XINTERFACE_PURE( CLASS, BASECLASS ) \
132 PRIVATE_DEFINE_XINTERFACE_AQUIRE_RELEASE( CLASS, BASECLASS ) \
133 PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE_PURE( CLASS, BASECLASS )
135 #define PRIVATE_DEFINE_XINTERFACE( CLASS, BASECLASS, INTERFACES ) \
136 PRIVATE_DEFINE_XINTERFACE_AQUIRE_RELEASE( CLASS, BASECLASS ) \
137 PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE( CLASS, BASECLASS, INTERFACES )
139 #define PRIVATE_DEFINE_XINTERFACE_LARGE( CLASS, BASECLASS, INTERFACES_FIRST, INTERFACES_SECOND ) \
140 PRIVATE_DEFINE_XINTERFACE_AQUIRE_RELEASE( CLASS, BASECLASS ) \
141 PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE_LARGE( CLASS, BASECLASS, INTERFACES_FIRST, INTERFACES_SECOND )
143 //*****************************************************************************************************************
144 // private
145 // help macros to replace INTERFACES in queryInterface() [see before]
146 //*****************************************************************************************************************
148 #ifdef ENABLE_SERVICEDEBUG
149 #define PRIVATE_DEFINE_INTERFACE_1( INTERFACE1 ) \
150 static_cast< XSPECIALDEBUGINTERFACE##* >( this ), \
151 INTERFACE1
152 #else
154 #define PRIVATE_DEFINE_INTERFACE_1( INTERFACE1 ) \
155 INTERFACE1
156 //#endif // #ifdef ENABLE_SERVICEDEBUG
158 #define PRIVATE_DEFINE_INTERFACE_2( INTERFACE1, INTERFACE2 ) \
159 PRIVATE_DEFINE_INTERFACE_1( INTERFACE1 ), \
160 INTERFACE2
162 #define PRIVATE_DEFINE_INTERFACE_3( INTERFACE1, INTERFACE2, INTERFACE3 ) \
163 PRIVATE_DEFINE_INTERFACE_2( INTERFACE1, INTERFACE2 ), \
164 INTERFACE3
166 #define PRIVATE_DEFINE_INTERFACE_4( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4 ) \
167 PRIVATE_DEFINE_INTERFACE_3( INTERFACE1, INTERFACE2, INTERFACE3 ), \
168 INTERFACE4
170 #define PRIVATE_DEFINE_INTERFACE_5( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5 ) \
171 PRIVATE_DEFINE_INTERFACE_4( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4 ), \
172 INTERFACE5
174 #define PRIVATE_DEFINE_INTERFACE_6( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6 ) \
175 PRIVATE_DEFINE_INTERFACE_5( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5 ), \
176 INTERFACE6
178 #define PRIVATE_DEFINE_INTERFACE_7( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7 ) \
179 PRIVATE_DEFINE_INTERFACE_6( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6 ), \
180 INTERFACE7
182 #define PRIVATE_DEFINE_INTERFACE_8( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8 ) \
183 PRIVATE_DEFINE_INTERFACE_7( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7 ), \
184 INTERFACE8
186 #define PRIVATE_DEFINE_INTERFACE_9( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9 ) \
187 PRIVATE_DEFINE_INTERFACE_8( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8 ), \
188 INTERFACE9
190 #define PRIVATE_DEFINE_INTERFACE_10( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10 ) \
191 PRIVATE_DEFINE_INTERFACE_9( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9 ), \
192 INTERFACE10
194 #define PRIVATE_DEFINE_INTERFACE_11( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11 ) \
195 PRIVATE_DEFINE_INTERFACE_10( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10 ), \
196 INTERFACE11
198 //*****************************************************************************************************************
199 // public
200 // help macros for follow XInterface definitions
201 //*****************************************************************************************************************
203 // Use it as parameter for DEFINE_XINTERFACE_X(), if you CAN use an interface directly in queryInterface()!
204 #define DIRECT_INTERFACE( INTERFACE ) \
205 static_cast< INTERFACE* >( this )
207 // Use it as parameter for DEFINE_XINTERFACE_X(), if you CAN'T use an interface directly in queryInterface()!
208 // (zB at ambigous errors!)
209 #define DERIVED_INTERFACE( BASEINTERFACE, DERIVEDINTERFACE ) \
210 static_cast< BASEINTERFACE* >( static_cast< DERIVEDINTERFACE* >( this ) )
212 //*****************************************************************************************************************
213 // public
214 // declaration of XInterface
215 //*****************************************************************************************************************
216 #define FWK_DECLARE_XINTERFACE \
217 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ); \
218 virtual void SAL_CALL acquire ( ) throw(); \
219 virtual void SAL_CALL release ( ) throw();
221 //*****************************************************************************************************************
222 // public
223 // implementation of XInterface
224 //*****************************************************************************************************************
226 // implementation of XInterface with 0 additional interface for queryInterface()
227 #define DEFINE_XINTERFACE_0( CLASS, BASECLASS ) \
228 PRIVATE_DEFINE_XINTERFACE_PURE ( CLASS, \
229 BASECLASS \
232 // implementation of XInterface with 1 additional interface for queryInterface()
233 #define DEFINE_XINTERFACE_1( CLASS, BASECLASS, INTERFACE1 ) \
234 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
235 BASECLASS, \
236 ( aType, PRIVATE_DEFINE_INTERFACE_1 ( INTERFACE1 \
241 // implementation of XInterface with 2 additional interfaces for queryInterface()
242 #define DEFINE_XINTERFACE_2( CLASS, BASECLASS, INTERFACE1, INTERFACE2 ) \
243 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
244 BASECLASS, \
245 ( aType, PRIVATE_DEFINE_INTERFACE_2 ( INTERFACE1 , \
246 INTERFACE2 \
251 // implementation of XInterface with 3 additional interfaces for queryInterface()
252 #define DEFINE_XINTERFACE_3( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3 ) \
253 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
254 BASECLASS, \
255 ( aType, PRIVATE_DEFINE_INTERFACE_3 ( INTERFACE1 , \
256 INTERFACE2 , \
257 INTERFACE3 \
262 // implementation of XInterface with 4 additional interfaces for queryInterface()
263 #define DEFINE_XINTERFACE_4( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4 ) \
264 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
265 BASECLASS, \
266 ( aType, PRIVATE_DEFINE_INTERFACE_4 ( INTERFACE1 , \
267 INTERFACE2 , \
268 INTERFACE3 , \
269 INTERFACE4 \
274 // implementation of XInterface with 5 additional interfaces for queryInterface()
275 #define DEFINE_XINTERFACE_5( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5 ) \
276 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
277 BASECLASS, \
278 ( aType, PRIVATE_DEFINE_INTERFACE_5 ( INTERFACE1 , \
279 INTERFACE2 , \
280 INTERFACE3 , \
281 INTERFACE4 , \
282 INTERFACE5 \
287 // implementation of XInterface with 6 additional interfaces for queryInterface()
288 #define DEFINE_XINTERFACE_6( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6 ) \
289 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
290 BASECLASS, \
291 ( aType, PRIVATE_DEFINE_INTERFACE_6 ( INTERFACE1 , \
292 INTERFACE2 , \
293 INTERFACE3 , \
294 INTERFACE4 , \
295 INTERFACE5 , \
296 INTERFACE6 \
301 // implementation of XInterface with 7 additional interfaces for queryInterface()
302 #define DEFINE_XINTERFACE_7( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7 ) \
303 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
304 BASECLASS, \
305 ( aType, PRIVATE_DEFINE_INTERFACE_7 ( INTERFACE1 , \
306 INTERFACE2 , \
307 INTERFACE3 , \
308 INTERFACE4 , \
309 INTERFACE5 , \
310 INTERFACE6 , \
311 INTERFACE7 \
316 // implementation of XInterface with 8 additional interfaces for queryInterface()
317 #define DEFINE_XINTERFACE_8( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8 ) \
318 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
319 BASECLASS, \
320 ( aType, PRIVATE_DEFINE_INTERFACE_8 ( INTERFACE1 , \
321 INTERFACE2 , \
322 INTERFACE3 , \
323 INTERFACE4 , \
324 INTERFACE5 , \
325 INTERFACE6 , \
326 INTERFACE7 , \
327 INTERFACE8 \
332 // implementation of XInterface with 9 additional interfaces for queryInterface()
333 #define DEFINE_XINTERFACE_9( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9 ) \
334 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
335 BASECLASS, \
336 ( aType, PRIVATE_DEFINE_INTERFACE_9 ( INTERFACE1 , \
337 INTERFACE2 , \
338 INTERFACE3 , \
339 INTERFACE4 , \
340 INTERFACE5 , \
341 INTERFACE6 , \
342 INTERFACE7 , \
343 INTERFACE8 , \
344 INTERFACE9 \
349 // implementation of XInterface with 10 additional interfaces for queryInterface()
350 #define DEFINE_XINTERFACE_10( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10 ) \
351 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
352 BASECLASS, \
353 ( aType, PRIVATE_DEFINE_INTERFACE_10 ( INTERFACE1 , \
354 INTERFACE2 , \
355 INTERFACE3 , \
356 INTERFACE4 , \
357 INTERFACE5 , \
358 INTERFACE6 , \
359 INTERFACE7 , \
360 INTERFACE8 , \
361 INTERFACE9 , \
362 INTERFACE10 \
367 // implementation of XInterface with 11 additional interfaces for queryInterface()
368 #define DEFINE_XINTERFACE_11( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11 ) \
369 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
370 BASECLASS, \
371 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
372 INTERFACE2 , \
373 INTERFACE3 , \
374 INTERFACE4 , \
375 INTERFACE5 , \
376 INTERFACE6 , \
377 INTERFACE7 , \
378 INTERFACE8 , \
379 INTERFACE9 , \
380 INTERFACE10 , \
381 INTERFACE11 \
386 // implementation of XInterface with 12 additional interfaces for queryInterface()
387 #define DEFINE_XINTERFACE_12( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12 ) \
388 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
389 BASECLASS, \
390 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
391 INTERFACE2 , \
392 INTERFACE3 , \
393 INTERFACE4 , \
394 INTERFACE5 , \
395 INTERFACE6 , \
396 INTERFACE7 , \
397 INTERFACE8 , \
398 INTERFACE9 , \
399 INTERFACE10 , \
400 INTERFACE11 \
402 ), \
403 ( aType, PRIVATE_DEFINE_INTERFACE_1 ( INTERFACE12 \
408 // implementation of XInterface with 13 additional interfaces for queryInterface()
409 #define DEFINE_XINTERFACE_13( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13 ) \
410 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
411 BASECLASS, \
412 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
413 INTERFACE2 , \
414 INTERFACE3 , \
415 INTERFACE4 , \
416 INTERFACE5 , \
417 INTERFACE6 , \
418 INTERFACE7 , \
419 INTERFACE8 , \
420 INTERFACE9 , \
421 INTERFACE10 , \
422 INTERFACE11 \
424 ), \
425 ( aType, PRIVATE_DEFINE_INTERFACE_2 ( INTERFACE12 , \
426 INTERFACE13 \
431 // implementation of XInterface with 14 additional interfaces for queryInterface()
432 #define DEFINE_XINTERFACE_14( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14 ) \
433 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
434 BASECLASS, \
435 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
436 INTERFACE2 , \
437 INTERFACE3 , \
438 INTERFACE4 , \
439 INTERFACE5 , \
440 INTERFACE6 , \
441 INTERFACE7 , \
442 INTERFACE8 , \
443 INTERFACE9 , \
444 INTERFACE10 , \
445 INTERFACE11 \
447 ), \
448 ( aType, PRIVATE_DEFINE_INTERFACE_3 ( INTERFACE12 , \
449 INTERFACE13 , \
450 INTERFACE14 \
455 // implementation of XInterface with 15 additional interfaces for queryInterface()
456 #define DEFINE_XINTERFACE_15( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14, INTERFACE15 ) \
457 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
458 BASECLASS, \
459 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
460 INTERFACE2 , \
461 INTERFACE3 , \
462 INTERFACE4 , \
463 INTERFACE5 , \
464 INTERFACE6 , \
465 INTERFACE7 , \
466 INTERFACE8 , \
467 INTERFACE9 , \
468 INTERFACE10 , \
469 INTERFACE11 \
471 ), \
472 ( aType, PRIVATE_DEFINE_INTERFACE_4 ( INTERFACE12 , \
473 INTERFACE13 , \
474 INTERFACE14 , \
475 INTERFACE15 \
480 // implementation of XInterface with 16 additional interfaces for queryInterface()
481 #define DEFINE_XINTERFACE_16( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14, INTERFACE15, INTERFACE16 ) \
482 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
483 BASECLASS, \
484 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
485 INTERFACE2 , \
486 INTERFACE3 , \
487 INTERFACE4 , \
488 INTERFACE5 , \
489 INTERFACE6 , \
490 INTERFACE7 , \
491 INTERFACE8 , \
492 INTERFACE9 , \
493 INTERFACE10 , \
494 INTERFACE11 \
496 ), \
497 ( aType, PRIVATE_DEFINE_INTERFACE_5 ( INTERFACE12 , \
498 INTERFACE13 , \
499 INTERFACE14 , \
500 INTERFACE15 , \
501 INTERFACE16 \
506 // implementation of XInterface with 17 additional interfaces for queryInterface()
507 #define DEFINE_XINTERFACE_17( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14, INTERFACE15, INTERFACE16, INTERFACE17 ) \
508 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
509 BASECLASS, \
510 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
511 INTERFACE2 , \
512 INTERFACE3 , \
513 INTERFACE4 , \
514 INTERFACE5 , \
515 INTERFACE6 , \
516 INTERFACE7 , \
517 INTERFACE8 , \
518 INTERFACE9 , \
519 INTERFACE10 , \
520 INTERFACE11 \
522 ), \
523 ( aType, PRIVATE_DEFINE_INTERFACE_6 ( INTERFACE12 , \
524 INTERFACE13 , \
525 INTERFACE14 , \
526 INTERFACE15 , \
527 INTERFACE16 , \
528 INTERFACE17 \
533 // implementation of XInterface with 18 additional interfaces for queryInterface()
534 #define DEFINE_XINTERFACE_18( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14, INTERFACE15, INTERFACE16, INTERFACE17, INTERFACE18 ) \
535 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
536 BASECLASS, \
537 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
538 INTERFACE2 , \
539 INTERFACE3 , \
540 INTERFACE4 , \
541 INTERFACE5 , \
542 INTERFACE6 , \
543 INTERFACE7 , \
544 INTERFACE8 , \
545 INTERFACE9 , \
546 INTERFACE10 , \
547 INTERFACE11 \
549 ), \
550 ( aType, PRIVATE_DEFINE_INTERFACE_7 ( INTERFACE12 , \
551 INTERFACE13 , \
552 INTERFACE14 , \
553 INTERFACE15 , \
554 INTERFACE16 , \
555 INTERFACE17 , \
556 INTERFACE18 \
561 // implementation of XInterface with 19 additional interfaces for queryInterface()
562 #define DEFINE_XINTERFACE_19( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14, INTERFACE15, INTERFACE16, INTERFACE17, INTERFACE18, INTERFACE19 ) \
563 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
564 BASECLASS, \
565 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
566 INTERFACE2 , \
567 INTERFACE3 , \
568 INTERFACE4 , \
569 INTERFACE5 , \
570 INTERFACE6 , \
571 INTERFACE7 , \
572 INTERFACE8 , \
573 INTERFACE9 , \
574 INTERFACE10 , \
575 INTERFACE11 \
577 ), \
578 ( aType, PRIVATE_DEFINE_INTERFACE_8 ( INTERFACE12 , \
579 INTERFACE13 , \
580 INTERFACE14 , \
581 INTERFACE15 , \
582 INTERFACE16 , \
583 INTERFACE17 , \
584 INTERFACE18 , \
585 INTERFACE19 \
590 // implementation of XInterface with 20 additional interfaces for queryInterface()
591 #define DEFINE_XINTERFACE_20( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14, INTERFACE15, INTERFACE16, INTERFACE17, INTERFACE18, INTERFACE19, INTERFACE20 ) \
592 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
593 BASECLASS, \
594 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
595 INTERFACE2 , \
596 INTERFACE3 , \
597 INTERFACE4 , \
598 INTERFACE5 , \
599 INTERFACE6 , \
600 INTERFACE7 , \
601 INTERFACE8 , \
602 INTERFACE9 , \
603 INTERFACE10 , \
604 INTERFACE11 \
606 ), \
607 ( aType, PRIVATE_DEFINE_INTERFACE_9 ( INTERFACE12 , \
608 INTERFACE13 , \
609 INTERFACE14 , \
610 INTERFACE15 , \
611 INTERFACE16 , \
612 INTERFACE17 , \
613 INTERFACE18 , \
614 INTERFACE19 , \
615 INTERFACE20 \
620 // implementation of XInterface with 21 additional interfaces for queryInterface()
621 #define DEFINE_XINTERFACE_21( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14, INTERFACE15, INTERFACE16, INTERFACE17, INTERFACE18, INTERFACE19, INTERFACE20, INTERFACE21 ) \
622 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
623 BASECLASS, \
624 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
625 INTERFACE2 , \
626 INTERFACE3 , \
627 INTERFACE4 , \
628 INTERFACE5 , \
629 INTERFACE6 , \
630 INTERFACE7 , \
631 INTERFACE8 , \
632 INTERFACE9 , \
633 INTERFACE10 , \
634 INTERFACE11 \
636 ), \
637 ( aType, PRIVATE_DEFINE_INTERFACE_10 ( INTERFACE12 , \
638 INTERFACE13 , \
639 INTERFACE14 , \
640 INTERFACE15 , \
641 INTERFACE16 , \
642 INTERFACE17 , \
643 INTERFACE18 , \
644 INTERFACE19 , \
645 INTERFACE20 , \
646 INTERFACE21 \
651 // implementation of XInterface with 22 additional interfaces for queryInterface()
652 #define DEFINE_XINTERFACE_22( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14, INTERFACE15, INTERFACE16, INTERFACE17, INTERFACE18, INTERFACE19, INTERFACE20, INTERFACE21, INTERFACE22 ) \
653 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
654 BASECLASS, \
655 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
656 INTERFACE2 , \
657 INTERFACE3 , \
658 INTERFACE4 , \
659 INTERFACE5 , \
660 INTERFACE6 , \
661 INTERFACE7 , \
662 INTERFACE8 , \
663 INTERFACE9 , \
664 INTERFACE10 , \
665 INTERFACE11 \
667 ), \
668 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE12 , \
669 INTERFACE13 , \
670 INTERFACE14 , \
671 INTERFACE15 , \
672 INTERFACE16 , \
673 INTERFACE17 , \
674 INTERFACE18 , \
675 INTERFACE19 , \
676 INTERFACE20 , \
677 INTERFACE22 , \
678 INTERFACE21 \
683 } // namespace framework
685 #endif // #ifndef __FRAMEWORK_MACROS_XINTERFACE_HXX_
687 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */