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