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