update dev300-m58
[ooovba.git] / framework / inc / macros / xinterface.hxx
blob703c974fb718e7fb6fc5a796ffd916819ea87858
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: xinterface.hxx,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __FRAMEWORK_MACROS_XINTERFACE_HXX_
32 #define __FRAMEWORK_MACROS_XINTERFACE_HXX_
34 //_________________________________________________________________________________________________________________
35 // my own includes
36 //_________________________________________________________________________________________________________________
38 //_________________________________________________________________________________________________________________
39 // interface includes
40 //_________________________________________________________________________________________________________________
42 #include <com/sun/star/uno/RuntimeException.hpp>
44 //_________________________________________________________________________________________________________________
45 // other includes
46 //_________________________________________________________________________________________________________________
47 #include <com/sun/star/uno/Any.hxx>
48 #include <com/sun/star/uno/Reference.hxx>
49 #include <com/sun/star/uno/Type.hxx>
50 #include <cppuhelper/queryinterface.hxx>
51 #include <rtl/ustring.hxx>
53 //_________________________________________________________________________________________________________________
54 // namespace
55 //_________________________________________________________________________________________________________________
57 namespace framework{
59 /*_________________________________________________________________________________________________________________
61 macros for declaration and definition of XInterface
62 Please use follow public macros only!
64 1) DEFINE_XINTERFACE => use it in header to declare XInterface and his methods
65 2) DIRECT_INTERFACE( INTERFACE ) => use it as parameter INTERFACEx at 4) if interface not ambigous
66 3) DERIVED_INTERFACE( BASEINTERFACE, DERIVEDINTERFACE ) => use it as parameter INTERFACEx at 4) if interface can be ambigous
67 4) DECLARE_XINTERFACE_0( CLASS, BASECLASS ) => use it to define implementation of XInterface for 0 additional interface to baseclass
68 DECLARE_XINTERFACE_1( CLASS, BASECLASS, INTERFACE1 ) => use it to define implementation of XInterface for 1 additional interface to baseclass
69 ...
70 DECLARE_XINTERFACE_16( CLASS, BASECLASS, INTERFACE1, ... , INTERFACE16 )
72 _________________________________________________________________________________________________________________*/
74 //*****************************************************************************************************************
75 // private
76 // implementation of XInterface::aquire()
77 // XInterface::release()
78 //*****************************************************************************************************************
79 #define PRIVATE_DEFINE_XINTERFACE_AQUIRE_RELEASE( CLASS, BASECLASS ) \
80 void SAL_CALL CLASS::acquire() throw() \
81 { \
82 /* Don't use mutex in methods of XInterface! */ \
83 BASECLASS::acquire(); \
84 } \
86 void SAL_CALL CLASS::release() throw() \
87 { \
88 /* Don't use mutex in methods of XInterface! */ \
89 BASECLASS::release(); \
92 //*****************************************************************************************************************
93 // private
94 // implementation of XInterface::queryInterface() without any other interfaces!
95 //*****************************************************************************************************************
96 #define PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE_PURE( CLASS, BASECLASS ) \
97 ::com::sun::star::uno::Any SAL_CALL CLASS::queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ) \
98 { \
99 /* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */ \
100 /* I have no own supported interfaces ... */ \
101 /* ... ask baseclass for interfaces! */ \
102 return BASECLASS::queryInterface( aType ); \
105 //*****************************************************************************************************************
106 // private
107 // implementation of XInterface::queryInterface() with max. 12 other interfaces!
108 //*****************************************************************************************************************
109 #define PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE( CLASS, BASECLASS, INTERFACES ) \
110 ::com::sun::star::uno::Any SAL_CALL CLASS::queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ) \
112 /* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */ \
113 /* Ask for my own supported interfaces ... */ \
114 ::com::sun::star::uno::Any aReturn ( ::cppu::queryInterface INTERFACES \
115 ); \
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 ); \
122 /* Return result of this search. */ \
123 return aReturn; \
126 //*****************************************************************************************************************
127 // private
128 // implementation of XInterface::queryInterface() with more then 12 other interfaces!
129 //*****************************************************************************************************************
130 #define PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE_LARGE( CLASS, BASECLASS, INTERFACES_FIRST, INTERFACES_SECOND ) \
131 ::com::sun::star::uno::Any SAL_CALL CLASS::queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ) \
133 /* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */ \
134 /* Ask for my own supported interfaces ... */ \
135 ::com::sun::star::uno::Any aReturn ( ::cppu::queryInterface INTERFACES_FIRST \
136 ); \
137 /* If searched interface not supported by first group ... */ \
138 if ( aReturn.hasValue() == sal_False ) \
140 /* ... search in second group. (cppuhelper support 12 items only!) */ \
141 aReturn = ::cppu::queryInterface INTERFACES_SECOND ; \
142 /* If searched interface not supported by this class ... */ \
143 if ( aReturn.hasValue() == sal_False ) \
145 /* ... ask baseclass for interfaces! */ \
146 aReturn = BASECLASS::queryInterface( aType ); \
149 /* Return result of this search. */ \
150 return aReturn; \
153 //*****************************************************************************************************************
154 // private
155 // complete implementation of XInterface for different use cases
156 //*****************************************************************************************************************
157 #define PRIVATE_DEFINE_XINTERFACE_PURE( CLASS, BASECLASS ) \
158 PRIVATE_DEFINE_XINTERFACE_AQUIRE_RELEASE( CLASS, BASECLASS ) \
159 PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE_PURE( CLASS, BASECLASS )
161 #define PRIVATE_DEFINE_XINTERFACE( CLASS, BASECLASS, INTERFACES ) \
162 PRIVATE_DEFINE_XINTERFACE_AQUIRE_RELEASE( CLASS, BASECLASS ) \
163 PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE( CLASS, BASECLASS, INTERFACES )
165 #define PRIVATE_DEFINE_XINTERFACE_LARGE( CLASS, BASECLASS, INTERFACES_FIRST, INTERFACES_SECOND ) \
166 PRIVATE_DEFINE_XINTERFACE_AQUIRE_RELEASE( CLASS, BASECLASS ) \
167 PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE_LARGE( CLASS, BASECLASS, INTERFACES_FIRST, INTERFACES_SECOND )
169 //*****************************************************************************************************************
170 // private
171 // help macros to replace INTERFACES in queryInterface() [see before]
172 //*****************************************************************************************************************
174 #ifdef ENABLE_SERVICEDEBUG
175 #define PRIVATE_DEFINE_INTERFACE_1( INTERFACE1 ) \
176 static_cast< XSPECIALDEBUGINTERFACE##* >( this ), \
177 INTERFACE1
178 #else
180 #define PRIVATE_DEFINE_INTERFACE_1( INTERFACE1 ) \
181 INTERFACE1
182 //#endif // #ifdef ENABLE_SERVICEDEBUG
184 #define PRIVATE_DEFINE_INTERFACE_2( INTERFACE1, INTERFACE2 ) \
185 PRIVATE_DEFINE_INTERFACE_1( INTERFACE1 ), \
186 INTERFACE2
188 #define PRIVATE_DEFINE_INTERFACE_3( INTERFACE1, INTERFACE2, INTERFACE3 ) \
189 PRIVATE_DEFINE_INTERFACE_2( INTERFACE1, INTERFACE2 ), \
190 INTERFACE3
192 #define PRIVATE_DEFINE_INTERFACE_4( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4 ) \
193 PRIVATE_DEFINE_INTERFACE_3( INTERFACE1, INTERFACE2, INTERFACE3 ), \
194 INTERFACE4
196 #define PRIVATE_DEFINE_INTERFACE_5( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5 ) \
197 PRIVATE_DEFINE_INTERFACE_4( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4 ), \
198 INTERFACE5
200 #define PRIVATE_DEFINE_INTERFACE_6( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6 ) \
201 PRIVATE_DEFINE_INTERFACE_5( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5 ), \
202 INTERFACE6
204 #define PRIVATE_DEFINE_INTERFACE_7( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7 ) \
205 PRIVATE_DEFINE_INTERFACE_6( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6 ), \
206 INTERFACE7
208 #define PRIVATE_DEFINE_INTERFACE_8( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8 ) \
209 PRIVATE_DEFINE_INTERFACE_7( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7 ), \
210 INTERFACE8
212 #define PRIVATE_DEFINE_INTERFACE_9( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9 ) \
213 PRIVATE_DEFINE_INTERFACE_8( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8 ), \
214 INTERFACE9
216 #define PRIVATE_DEFINE_INTERFACE_10( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10 ) \
217 PRIVATE_DEFINE_INTERFACE_9( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9 ), \
218 INTERFACE10
220 #define PRIVATE_DEFINE_INTERFACE_11( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11 ) \
221 PRIVATE_DEFINE_INTERFACE_10( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10 ), \
222 INTERFACE11
224 //*****************************************************************************************************************
225 // public
226 // help macros for follow XInterface definitions
227 //*****************************************************************************************************************
229 // Use it as parameter for DEFINE_XINTERFACE_X(), if you CAN use an interface directly in queryInterface()!
230 #define DIRECT_INTERFACE( INTERFACE ) \
231 static_cast< INTERFACE* >( this )
233 // Use it as parameter for DEFINE_XINTERFACE_X(), if you CAN'T use an interface directly in queryInterface()!
234 // (zB at ambigous errors!)
235 #define DERIVED_INTERFACE( BASEINTERFACE, DERIVEDINTERFACE ) \
236 static_cast< BASEINTERFACE* >( static_cast< DERIVEDINTERFACE* >( this ) )
238 //*****************************************************************************************************************
239 // public
240 // declaration of XInterface
241 //*****************************************************************************************************************
242 #define FWK_DECLARE_XINTERFACE \
243 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ); \
244 virtual void SAL_CALL acquire ( ) throw(); \
245 virtual void SAL_CALL release ( ) throw();
247 //*****************************************************************************************************************
248 // public
249 // implementation of XInterface
250 //*****************************************************************************************************************
252 // implementation of XInterface with 0 additional interface for queryInterface()
253 #define DEFINE_XINTERFACE_0( CLASS, BASECLASS ) \
254 PRIVATE_DEFINE_XINTERFACE_PURE ( CLASS, \
255 BASECLASS \
258 // implementation of XInterface with 1 additional interface for queryInterface()
259 #define DEFINE_XINTERFACE_1( CLASS, BASECLASS, INTERFACE1 ) \
260 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
261 BASECLASS, \
262 ( aType, PRIVATE_DEFINE_INTERFACE_1 ( INTERFACE1 \
267 // implementation of XInterface with 2 additional interfaces for queryInterface()
268 #define DEFINE_XINTERFACE_2( CLASS, BASECLASS, INTERFACE1, INTERFACE2 ) \
269 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
270 BASECLASS, \
271 ( aType, PRIVATE_DEFINE_INTERFACE_2 ( INTERFACE1 , \
272 INTERFACE2 \
277 // implementation of XInterface with 3 additional interfaces for queryInterface()
278 #define DEFINE_XINTERFACE_3( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3 ) \
279 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
280 BASECLASS, \
281 ( aType, PRIVATE_DEFINE_INTERFACE_3 ( INTERFACE1 , \
282 INTERFACE2 , \
283 INTERFACE3 \
288 // implementation of XInterface with 4 additional interfaces for queryInterface()
289 #define DEFINE_XINTERFACE_4( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4 ) \
290 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
291 BASECLASS, \
292 ( aType, PRIVATE_DEFINE_INTERFACE_4 ( INTERFACE1 , \
293 INTERFACE2 , \
294 INTERFACE3 , \
295 INTERFACE4 \
300 // implementation of XInterface with 5 additional interfaces for queryInterface()
301 #define DEFINE_XINTERFACE_5( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5 ) \
302 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
303 BASECLASS, \
304 ( aType, PRIVATE_DEFINE_INTERFACE_5 ( INTERFACE1 , \
305 INTERFACE2 , \
306 INTERFACE3 , \
307 INTERFACE4 , \
308 INTERFACE5 \
313 // implementation of XInterface with 6 additional interfaces for queryInterface()
314 #define DEFINE_XINTERFACE_6( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6 ) \
315 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
316 BASECLASS, \
317 ( aType, PRIVATE_DEFINE_INTERFACE_6 ( INTERFACE1 , \
318 INTERFACE2 , \
319 INTERFACE3 , \
320 INTERFACE4 , \
321 INTERFACE5 , \
322 INTERFACE6 \
327 // implementation of XInterface with 7 additional interfaces for queryInterface()
328 #define DEFINE_XINTERFACE_7( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7 ) \
329 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
330 BASECLASS, \
331 ( aType, PRIVATE_DEFINE_INTERFACE_7 ( INTERFACE1 , \
332 INTERFACE2 , \
333 INTERFACE3 , \
334 INTERFACE4 , \
335 INTERFACE5 , \
336 INTERFACE6 , \
337 INTERFACE7 \
342 // implementation of XInterface with 8 additional interfaces for queryInterface()
343 #define DEFINE_XINTERFACE_8( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8 ) \
344 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
345 BASECLASS, \
346 ( aType, PRIVATE_DEFINE_INTERFACE_8 ( INTERFACE1 , \
347 INTERFACE2 , \
348 INTERFACE3 , \
349 INTERFACE4 , \
350 INTERFACE5 , \
351 INTERFACE6 , \
352 INTERFACE7 , \
353 INTERFACE8 \
358 // implementation of XInterface with 9 additional interfaces for queryInterface()
359 #define DEFINE_XINTERFACE_9( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9 ) \
360 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
361 BASECLASS, \
362 ( aType, PRIVATE_DEFINE_INTERFACE_9 ( INTERFACE1 , \
363 INTERFACE2 , \
364 INTERFACE3 , \
365 INTERFACE4 , \
366 INTERFACE5 , \
367 INTERFACE6 , \
368 INTERFACE7 , \
369 INTERFACE8 , \
370 INTERFACE9 \
375 // implementation of XInterface with 10 additional interfaces for queryInterface()
376 #define DEFINE_XINTERFACE_10( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10 ) \
377 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
378 BASECLASS, \
379 ( aType, PRIVATE_DEFINE_INTERFACE_10 ( INTERFACE1 , \
380 INTERFACE2 , \
381 INTERFACE3 , \
382 INTERFACE4 , \
383 INTERFACE5 , \
384 INTERFACE6 , \
385 INTERFACE7 , \
386 INTERFACE8 , \
387 INTERFACE9 , \
388 INTERFACE10 \
393 // implementation of XInterface with 11 additional interfaces for queryInterface()
394 #define DEFINE_XINTERFACE_11( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11 ) \
395 PRIVATE_DEFINE_XINTERFACE ( CLASS, \
396 BASECLASS, \
397 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
398 INTERFACE2 , \
399 INTERFACE3 , \
400 INTERFACE4 , \
401 INTERFACE5 , \
402 INTERFACE6 , \
403 INTERFACE7 , \
404 INTERFACE8 , \
405 INTERFACE9 , \
406 INTERFACE10 , \
407 INTERFACE11 \
412 // implementation of XInterface with 12 additional interfaces for queryInterface()
413 #define DEFINE_XINTERFACE_12( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12 ) \
414 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
415 BASECLASS, \
416 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
417 INTERFACE2 , \
418 INTERFACE3 , \
419 INTERFACE4 , \
420 INTERFACE5 , \
421 INTERFACE6 , \
422 INTERFACE7 , \
423 INTERFACE8 , \
424 INTERFACE9 , \
425 INTERFACE10 , \
426 INTERFACE11 \
428 ), \
429 ( aType, PRIVATE_DEFINE_INTERFACE_1 ( INTERFACE12 \
434 // implementation of XInterface with 13 additional interfaces for queryInterface()
435 #define DEFINE_XINTERFACE_13( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13 ) \
436 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
437 BASECLASS, \
438 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
439 INTERFACE2 , \
440 INTERFACE3 , \
441 INTERFACE4 , \
442 INTERFACE5 , \
443 INTERFACE6 , \
444 INTERFACE7 , \
445 INTERFACE8 , \
446 INTERFACE9 , \
447 INTERFACE10 , \
448 INTERFACE11 \
450 ), \
451 ( aType, PRIVATE_DEFINE_INTERFACE_2 ( INTERFACE12 , \
452 INTERFACE13 \
457 // implementation of XInterface with 14 additional interfaces for queryInterface()
458 #define DEFINE_XINTERFACE_14( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14 ) \
459 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
460 BASECLASS, \
461 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
462 INTERFACE2 , \
463 INTERFACE3 , \
464 INTERFACE4 , \
465 INTERFACE5 , \
466 INTERFACE6 , \
467 INTERFACE7 , \
468 INTERFACE8 , \
469 INTERFACE9 , \
470 INTERFACE10 , \
471 INTERFACE11 \
473 ), \
474 ( aType, PRIVATE_DEFINE_INTERFACE_3 ( INTERFACE12 , \
475 INTERFACE13 , \
476 INTERFACE14 \
481 // implementation of XInterface with 15 additional interfaces for queryInterface()
482 #define DEFINE_XINTERFACE_15( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14, INTERFACE15 ) \
483 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
484 BASECLASS, \
485 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
486 INTERFACE2 , \
487 INTERFACE3 , \
488 INTERFACE4 , \
489 INTERFACE5 , \
490 INTERFACE6 , \
491 INTERFACE7 , \
492 INTERFACE8 , \
493 INTERFACE9 , \
494 INTERFACE10 , \
495 INTERFACE11 \
497 ), \
498 ( aType, PRIVATE_DEFINE_INTERFACE_4 ( INTERFACE12 , \
499 INTERFACE13 , \
500 INTERFACE14 , \
501 INTERFACE15 \
506 // implementation of XInterface with 16 additional interfaces for queryInterface()
507 #define DEFINE_XINTERFACE_16( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14, INTERFACE15, INTERFACE16 ) \
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_5 ( INTERFACE12 , \
524 INTERFACE13 , \
525 INTERFACE14 , \
526 INTERFACE15 , \
527 INTERFACE16 \
532 // implementation of XInterface with 17 additional interfaces for queryInterface()
533 #define DEFINE_XINTERFACE_17( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14, INTERFACE15, INTERFACE16, INTERFACE17 ) \
534 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
535 BASECLASS, \
536 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
537 INTERFACE2 , \
538 INTERFACE3 , \
539 INTERFACE4 , \
540 INTERFACE5 , \
541 INTERFACE6 , \
542 INTERFACE7 , \
543 INTERFACE8 , \
544 INTERFACE9 , \
545 INTERFACE10 , \
546 INTERFACE11 \
548 ), \
549 ( aType, PRIVATE_DEFINE_INTERFACE_6 ( INTERFACE12 , \
550 INTERFACE13 , \
551 INTERFACE14 , \
552 INTERFACE15 , \
553 INTERFACE16 , \
554 INTERFACE17 \
559 // implementation of XInterface with 18 additional interfaces for queryInterface()
560 #define DEFINE_XINTERFACE_18( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14, INTERFACE15, INTERFACE16, INTERFACE17, INTERFACE18 ) \
561 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
562 BASECLASS, \
563 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
564 INTERFACE2 , \
565 INTERFACE3 , \
566 INTERFACE4 , \
567 INTERFACE5 , \
568 INTERFACE6 , \
569 INTERFACE7 , \
570 INTERFACE8 , \
571 INTERFACE9 , \
572 INTERFACE10 , \
573 INTERFACE11 \
575 ), \
576 ( aType, PRIVATE_DEFINE_INTERFACE_7 ( INTERFACE12 , \
577 INTERFACE13 , \
578 INTERFACE14 , \
579 INTERFACE15 , \
580 INTERFACE16 , \
581 INTERFACE17 , \
582 INTERFACE18 \
587 // implementation of XInterface with 19 additional interfaces for queryInterface()
588 #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 ) \
589 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
590 BASECLASS, \
591 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
592 INTERFACE2 , \
593 INTERFACE3 , \
594 INTERFACE4 , \
595 INTERFACE5 , \
596 INTERFACE6 , \
597 INTERFACE7 , \
598 INTERFACE8 , \
599 INTERFACE9 , \
600 INTERFACE10 , \
601 INTERFACE11 \
603 ), \
604 ( aType, PRIVATE_DEFINE_INTERFACE_8 ( INTERFACE12 , \
605 INTERFACE13 , \
606 INTERFACE14 , \
607 INTERFACE15 , \
608 INTERFACE16 , \
609 INTERFACE17 , \
610 INTERFACE18 , \
611 INTERFACE19 \
616 // implementation of XInterface with 20 additional interfaces for queryInterface()
617 #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 ) \
618 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
619 BASECLASS, \
620 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
621 INTERFACE2 , \
622 INTERFACE3 , \
623 INTERFACE4 , \
624 INTERFACE5 , \
625 INTERFACE6 , \
626 INTERFACE7 , \
627 INTERFACE8 , \
628 INTERFACE9 , \
629 INTERFACE10 , \
630 INTERFACE11 \
632 ), \
633 ( aType, PRIVATE_DEFINE_INTERFACE_9 ( INTERFACE12 , \
634 INTERFACE13 , \
635 INTERFACE14 , \
636 INTERFACE15 , \
637 INTERFACE16 , \
638 INTERFACE17 , \
639 INTERFACE18 , \
640 INTERFACE19 , \
641 INTERFACE20 \
646 // implementation of XInterface with 21 additional interfaces for queryInterface()
647 #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 ) \
648 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
649 BASECLASS, \
650 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
651 INTERFACE2 , \
652 INTERFACE3 , \
653 INTERFACE4 , \
654 INTERFACE5 , \
655 INTERFACE6 , \
656 INTERFACE7 , \
657 INTERFACE8 , \
658 INTERFACE9 , \
659 INTERFACE10 , \
660 INTERFACE11 \
662 ), \
663 ( aType, PRIVATE_DEFINE_INTERFACE_10 ( INTERFACE12 , \
664 INTERFACE13 , \
665 INTERFACE14 , \
666 INTERFACE15 , \
667 INTERFACE16 , \
668 INTERFACE17 , \
669 INTERFACE18 , \
670 INTERFACE19 , \
671 INTERFACE20 , \
672 INTERFACE21 \
677 // implementation of XInterface with 22 additional interfaces for queryInterface()
678 #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 ) \
679 PRIVATE_DEFINE_XINTERFACE_LARGE ( CLASS, \
680 BASECLASS, \
681 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE1 , \
682 INTERFACE2 , \
683 INTERFACE3 , \
684 INTERFACE4 , \
685 INTERFACE5 , \
686 INTERFACE6 , \
687 INTERFACE7 , \
688 INTERFACE8 , \
689 INTERFACE9 , \
690 INTERFACE10 , \
691 INTERFACE11 \
693 ), \
694 ( aType, PRIVATE_DEFINE_INTERFACE_11 ( INTERFACE12 , \
695 INTERFACE13 , \
696 INTERFACE14 , \
697 INTERFACE15 , \
698 INTERFACE16 , \
699 INTERFACE17 , \
700 INTERFACE18 , \
701 INTERFACE19 , \
702 INTERFACE20 , \
703 INTERFACE22 , \
704 INTERFACE21 \
709 } // namespace framework
711 #endif // #ifndef __FRAMEWORK_MACROS_XINTERFACE_HXX_