summaryrefslogtreecommitdiff
path: root/framework/inc/macros/xinterface.hxx
blob: 2c2f378639dc19227dbc2102c820672378f752fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#ifndef INCLUDED_FRAMEWORK_INC_MACROS_XINTERFACE_HXX
#define INCLUDED_FRAMEWORK_INC_MACROS_XINTERFACE_HXX

#include <com/sun/star/uno/RuntimeException.hpp>

#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Type.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <rtl/ustring.hxx>

namespace framework{

/*_________________________________________________________________________________________________________________

    macros for declaration and definition of XInterface
    Please use follow public macros only!

    1)  DEFINE_XINTERFACE                                                               => use it in header to declare XInterface and his methods
    2)  DIRECT_INTERFACE( INTERFACE )                                                   => use it as parameter INTERFACEx at 4) if interface not ambigous
    3)  DERIVED_INTERFACE( BASEINTERFACE, DERIVEDINTERFACE )                            => use it as parameter INTERFACEx at 4) if interface can be ambigous
    4)  DECLARE_XINTERFACE_0( CLASS, BASECLASS )                                        => use it to define implementation of XInterface for 0 additional interface to baseclass
        DECLARE_XINTERFACE_1( CLASS, BASECLASS, INTERFACE1 )                            => use it to define implementation of XInterface for 1 additional interface to baseclass
        ...
        DECLARE_XINTERFACE_16( CLASS, BASECLASS, INTERFACE1, ... , INTERFACE16 )

_________________________________________________________________________________________________________________*/

//  private
//  implementation of   XInterface::acquire()
//                      XInterface::release()

#define PRIVATE_DEFINE_XINTERFACE_ACQUIRE_RELEASE( CLASS, BASECLASS )                                                                                        \
    void SAL_CALL CLASS::acquire() throw()                                                                          \
    {                                                                                                                                                       \
        /* Don't use mutex in methods of XInterface! */                                                                                                     \
        BASECLASS::acquire();                                                                                                                               \
    }                                                                                                                                                       \
                                                                                                                                                            \
    void SAL_CALL CLASS::release() throw()                                                                          \
    {                                                                                                                                                       \
        /* Don't use mutex in methods of XInterface! */                                                                                                     \
        BASECLASS::release();                                                                                                                               \
    }

//  private
//  implementation of XInterface::queryInterface() without any other interfaces!

#define PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE_PURE( CLASS, BASECLASS )                                                                                   \
    ::com::sun::star::uno::Any SAL_CALL CLASS::queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException )  \
    {                                                                                                                                                       \
        /* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */                                                              \
        /* I have no own supported interfaces ...                                           */                                                              \
        /* ... ask baseclass for interfaces!                                                */                                                              \
        return BASECLASS::queryInterface( aType );                                                                                                          \
    }

//  private
//  implementation of XInterface::queryInterface() with max. 12 other interfaces!

#define PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE( CLASS, BASECLASS, INTERFACES )                                                                            \
    ::com::sun::star::uno::Any SAL_CALL CLASS::queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException, std::exception )  \
    {                                                                                                                                                       \
        /* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */                                                              \
        /* Ask for my own supported interfaces ...                                          */                                                              \
        ::com::sun::star::uno::Any aReturn  ( ::cppu::queryInterface INTERFACES                                                                             \
                                            );                                                                                                              \
        /* If searched interface not supported by this class ... */                                                                                         \
        if ( !aReturn.hasValue() )                                                                                                                          \
        {                                                                                                                                                   \
            /* ... ask baseclass for interfaces! */                                                                                                         \
            aReturn = BASECLASS::queryInterface( aType );                                                                                                   \
        }                                                                                                                                                   \
        /* Return result of this search. */                                                                                                                 \
        return aReturn;                                                                                                                                     \
    }

//  private
//  implementation of XInterface::queryInterface() with more than 12 other interfaces!

#define PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE_LARGE( CLASS, BASECLASS, INTERFACES_FIRST, INTERFACES_SECOND )                                             \
    ::com::sun::star::uno::Any SAL_CALL CLASS::queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException, std::exception )  \
    {                                                                                                                                                       \
        /* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */                                                              \
        /* Ask for my own supported interfaces ...                                          */                                                              \
        ::com::sun::star::uno::Any aReturn  ( ::cppu::queryInterface INTERFACES_FIRST                                                                       \
                                            );                                                                                                              \
        /* If searched interface not supported by first group ... */                                                                                        \
        if ( !aReturn.hasValue() )                                                                                                                          \
        {                                                                                                                                                   \
            /* ... search in second group. (cppuhelper support 12 items only!) */                                                                           \
            aReturn = ::cppu::queryInterface INTERFACES_SECOND;                                                                                            \
            /* If searched interface not supported by this class ... */                                                                                     \
            if ( !aReturn.hasValue() )                                                                                                                      \
            {                                                                                                                                               \
                /* ... ask baseclass for interfaces! */                                                                                                     \
                aReturn = BASECLASS::queryInterface( aType );                                                                                               \
            }                                                                                                                                               \
        }                                                                                                                                                   \
        /* Return result of this search. */                                                                                                                 \
        return aReturn;                                                                                                                                     \
    }

//  private
//  complete implementation of XInterface for different use cases

#define PRIVATE_DEFINE_XINTERFACE_PURE( CLASS, BASECLASS )                                                                                                  \
    PRIVATE_DEFINE_XINTERFACE_ACQUIRE_RELEASE( CLASS, BASECLASS )                                                                                            \
    PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE_PURE( CLASS, BASECLASS )

#define PRIVATE_DEFINE_XINTERFACE( CLASS, BASECLASS, INTERFACES )                                                                                           \
    PRIVATE_DEFINE_XINTERFACE_ACQUIRE_RELEASE( CLASS, BASECLASS )                                                                                            \
    PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE( CLASS, BASECLASS, INTERFACES )

#define PRIVATE_DEFINE_XINTERFACE_LARGE( CLASS, BASECLASS, INTERFACES_FIRST, INTERFACES_SECOND )                                                            \
    PRIVATE_DEFINE_XINTERFACE_ACQUIRE_RELEASE( CLASS, BASECLASS )                                                                                            \
    PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE_LARGE( CLASS, BASECLASS, INTERFACES_FIRST, INTERFACES_SECOND )

//  private
//  help macros to replace INTERFACES in queryInterface() [see before]

/*
#ifdef ENABLE_SERVICEDEBUG
    #define PRIVATE_DEFINE_INTERFACE_1( INTERFACE1 )     \
        static_cast< XSPECIALDEBUGINTERFACE##* >( this ), \
        INTERFACE1
#else
*/
    #define PRIVATE_DEFINE_INTERFACE_1( INTERFACE1 )                                                                                                                                                    \
        INTERFACE1
//#endif // #ifdef ENABLE_SERVICEDEBUG

#define PRIVATE_DEFINE_INTERFACE_2( INTERFACE1, INTERFACE2 )                                                                                                                                            \
    PRIVATE_DEFINE_INTERFACE_1( INTERFACE1 ),                                                                                                                                                           \
    INTERFACE2

#define PRIVATE_DEFINE_INTERFACE_3( INTERFACE1, INTERFACE2, INTERFACE3 )                                                                                                                                \
    PRIVATE_DEFINE_INTERFACE_2( INTERFACE1, INTERFACE2 ),                                                                                                                                               \
    INTERFACE3

#define PRIVATE_DEFINE_INTERFACE_4( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4 )                                                                                                                    \
    PRIVATE_DEFINE_INTERFACE_3( INTERFACE1, INTERFACE2, INTERFACE3 ),                                                                                                                                   \
    INTERFACE4

#define PRIVATE_DEFINE_INTERFACE_5( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5 )                                                                                                        \
    PRIVATE_DEFINE_INTERFACE_4( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4 ),                                                                                                                       \
    INTERFACE5

#define PRIVATE_DEFINE_INTERFACE_6( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6 )                                                                                            \
    PRIVATE_DEFINE_INTERFACE_5( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5 ),                                                                                                           \
    INTERFACE6

#define PRIVATE_DEFINE_INTERFACE_7( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7 )                                                                                \
    PRIVATE_DEFINE_INTERFACE_6( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6 ),                                                                                               \
    INTERFACE7

#define PRIVATE_DEFINE_INTERFACE_8( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8 )                                                                    \
    PRIVATE_DEFINE_INTERFACE_7( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7 ),                                                                                   \
    INTERFACE8

#define PRIVATE_DEFINE_INTERFACE_9( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9 )                                                        \
    PRIVATE_DEFINE_INTERFACE_8( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8 ),                                                                       \
    INTERFACE9

#define PRIVATE_DEFINE_INTERFACE_10( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10 )                                          \
    PRIVATE_DEFINE_INTERFACE_9( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9 ),                                                           \
    INTERFACE10

#define PRIVATE_DEFINE_INTERFACE_11( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11 )                             \
    PRIVATE_DEFINE_INTERFACE_10( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10 ),                                             \
    INTERFACE11

//  public
//  help macros for follow XInterface definitions

//  Use it as parameter for DEFINE_XINTERFACE_X(), if you CAN use an interface directly in queryInterface()!
#define DIRECT_INTERFACE( INTERFACE ) \
    static_cast< INTERFACE* >( this )

//  Use it as parameter for DEFINE_XINTERFACE_X(), if you CAN'T use an interface directly in queryInterface()!
//  (zB at ambigous errors!)
#define DERIVED_INTERFACE( BASEINTERFACE, DERIVEDINTERFACE ) \
    static_cast< BASEINTERFACE* >( static_cast< DERIVEDINTERFACE* >( this ) )

//  public
//  declaration of XInterface

#define FWK_DECLARE_XINTERFACE                                                                                                                                      \
    virtual ::com::sun::star::uno::Any  SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType   ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; \
    virtual void                        SAL_CALL acquire       (                                            ) throw() SAL_OVERRIDE;  \
    virtual void                        SAL_CALL release       (                                            ) throw() SAL_OVERRIDE;

//  public
//  implementation of XInterface

//  implementation of XInterface with 0 additional interface for queryInterface()
#define DEFINE_XINTERFACE_0( CLASS, BASECLASS )                                                                     \
    PRIVATE_DEFINE_XINTERFACE_PURE  (   CLASS,                                                                      \
                                          BASECLASS                                                                 \
                                    )

//  implementation of XInterface with 1 additional interface for queryInterface()
#define DEFINE_XINTERFACE_1( CLASS, BASECLASS, INTERFACE1 )                                                         \
    PRIVATE_DEFINE_XINTERFACE   (   CLASS,                                                                          \
                                     BASECLASS,                                                                     \
                                     ( aType, PRIVATE_DEFINE_INTERFACE_1    (   INTERFACE1                              \
                                                                        )                                           \
                                    )                                                                               \
                                )

//  implementation of XInterface with 2 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_2( CLASS, BASECLASS, INTERFACE1, INTERFACE2 )                                             \
    PRIVATE_DEFINE_XINTERFACE   (   CLASS,                                                                          \
                                    BASECLASS,                                                                      \
                                    ( aType, PRIVATE_DEFINE_INTERFACE_2 (   INTERFACE1  ,                           \
                                                                             INTERFACE2                             \
                                                                        )                                           \
                                    )                                                                               \
                                )

//  implementation of XInterface with 3 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_3( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3 )                                 \
    PRIVATE_DEFINE_XINTERFACE   (   CLASS,                                                                          \
                                    BASECLASS,                                                                      \
                                    ( aType, PRIVATE_DEFINE_INTERFACE_3 (   INTERFACE1  ,                           \
                                                                             INTERFACE2 ,                           \
                                                                            INTERFACE3                              \
                                                                        )                                           \
                                    )                                                                               \
                                )

//  implementation of XInterface with 4 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_4( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4 )                     \
    PRIVATE_DEFINE_XINTERFACE   (   CLASS,                                                                          \
                                    BASECLASS,                                                                      \
                                    ( aType, PRIVATE_DEFINE_INTERFACE_4 (   INTERFACE1  ,                           \
                                                                            INTERFACE2  ,                           \
                                                                            INTERFACE3  ,                           \
                                                                            INTERFACE4                              \
                                                                        )                                           \
                                    )                                                                               \
                                )

//  implementation of XInterface with 5 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_5( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5 )         \
    PRIVATE_DEFINE_XINTERFACE   (   CLASS,                                                                          \
                                    BASECLASS,                                                                      \
                                    ( aType, PRIVATE_DEFINE_INTERFACE_5 (   INTERFACE1  ,                           \
                                                                            INTERFACE2  ,                           \
                                                                            INTERFACE3  ,                           \
                                                                            INTERFACE4  ,                           \
                                                                            INTERFACE5                              \
                                                                        )                                           \
                                    )                                                                               \
                                )

//  implementation of XInterface with 6 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_6( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6 ) \
    PRIVATE_DEFINE_XINTERFACE   (   CLASS,                                                                          \
                                    BASECLASS,                                                                      \
                                    ( aType, PRIVATE_DEFINE_INTERFACE_6 (   INTERFACE1  ,                           \
                                                                            INTERFACE2  ,                           \
                                                                            INTERFACE3  ,                           \
                                                                            INTERFACE4  ,                           \
                                                                            INTERFACE5  ,                           \
                                                                            INTERFACE6                              \
                                                                        )                                           \
                                    )                                                                               \
                                )

//  implementation of XInterface with 7 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_7( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7 ) \
    PRIVATE_DEFINE_XINTERFACE   (   CLASS,                                                                          \
                                    BASECLASS,                                                                      \
                                    ( aType, PRIVATE_DEFINE_INTERFACE_7 (   INTERFACE1  ,                           \
                                                                            INTERFACE2  ,                           \
                                                                            INTERFACE3  ,                           \
                                                                            INTERFACE4  ,                           \
                                                                            INTERFACE5  ,                           \
                                                                            INTERFACE6  ,                           \
                                                                            INTERFACE7                              \
                                                                        )                                           \
                                    )                                                                               \
                                )

//  implementation of XInterface with 8 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_8( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8 ) \
    PRIVATE_DEFINE_XINTERFACE   (   CLASS,                                                                          \
                                    BASECLASS,                                                                      \
                                    ( aType, PRIVATE_DEFINE_INTERFACE_8 (   INTERFACE1  ,                           \
                                                                            INTERFACE2  ,                           \
                                                                            INTERFACE3  ,                           \
                                                                            INTERFACE4  ,                           \
                                                                            INTERFACE5  ,                           \
                                                                            INTERFACE6  ,                           \
                                                                            INTERFACE7  ,                           \
                                                                            INTERFACE8                              \
                                                                        )                                           \
                                    )                                                                               \
                                )

//  implementation of XInterface with 9 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_9( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9 ) \
    PRIVATE_DEFINE_XINTERFACE   (   CLASS,                                                                          \
                                    BASECLASS,                                                                      \
                                    ( aType, PRIVATE_DEFINE_INTERFACE_9 (   INTERFACE1  ,                           \
                                                                            INTERFACE2  ,                           \
                                                                            INTERFACE3  ,                           \
                                                                            INTERFACE4  ,                           \
                                                                            INTERFACE5  ,                           \
                                                                            INTERFACE6  ,                           \
                                                                            INTERFACE7  ,                           \
                                                                            INTERFACE8  ,                           \
                                                                            INTERFACE9                              \
                                                                        )                                           \
                                    )                                                                               \
                                )

//  implementation of XInterface with 10 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_10( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10 )   \
    PRIVATE_DEFINE_XINTERFACE   (   CLASS,                                                                          \
                                    BASECLASS,                                                                      \
                                    ( aType, PRIVATE_DEFINE_INTERFACE_10    (   INTERFACE1  ,                       \
                                                                                INTERFACE2  ,                       \
                                                                                INTERFACE3  ,                       \
                                                                                INTERFACE4  ,                       \
                                                                                INTERFACE5  ,                       \
                                                                                INTERFACE6  ,                       \
                                                                                INTERFACE7  ,                       \
                                                                                INTERFACE8  ,                       \
                                                                                INTERFACE9  ,                       \
                                                                                INTERFACE10                         \
                                                                            )                                       \
                                    )                                                                               \
                                )

//  implementation of XInterface with 11 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_11( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11 )  \
    PRIVATE_DEFINE_XINTERFACE   (   CLASS,                                                                          \
                                    BASECLASS,                                                                      \
                                    ( aType, PRIVATE_DEFINE_INTERFACE_11    (   INTERFACE1  ,                       \
                                                                                INTERFACE2  ,                       \
                                                                                INTERFACE3  ,                       \
                                                                                INTERFACE4  ,                       \
                                                                                INTERFACE5  ,                       \
                                                                                INTERFACE6  ,                       \
                                                                                INTERFACE7  ,                       \
                                                                                INTERFACE8  ,                       \
                                                                                INTERFACE9  ,                       \
                                                                                INTERFACE10 ,                       \
                                                                                INTERFACE11                         \
                                                                            )                                       \
                                    )                                                                               \
                                )

//  implementation of XInterface with 12 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_12( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12 ) \
    PRIVATE_DEFINE_XINTERFACE_LARGE (   CLASS,                                                                      \
                                        BASECLASS,                                                                  \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_11    (   INTERFACE1  ,                   \
                                                                                    INTERFACE2  ,                   \
                                                                                    INTERFACE3  ,                   \
                                                                                    INTERFACE4  ,                   \
                                                                                    INTERFACE5  ,                   \
                                                                                    INTERFACE6  ,                   \
                                                                                    INTERFACE7  ,                   \
                                                                                    INTERFACE8  ,                   \
                                                                                    INTERFACE9  ,                   \
                                                                                    INTERFACE10 ,                   \
                                                                                    INTERFACE11                     \
                                                                                )                                   \
                                        ),                                                                          \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_1     (   INTERFACE12                     \
                                                                                )                                   \
                                        )                                                                           \
                                    )

//  implementation of XInterface with 13 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_13( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13 )    \
    PRIVATE_DEFINE_XINTERFACE_LARGE (   CLASS,                                                                      \
                                        BASECLASS,                                                                  \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_11    (   INTERFACE1  ,                   \
                                                                                    INTERFACE2  ,                   \
                                                                                    INTERFACE3  ,                   \
                                                                                    INTERFACE4  ,                   \
                                                                                    INTERFACE5  ,                   \
                                                                                    INTERFACE6  ,                   \
                                                                                    INTERFACE7  ,                   \
                                                                                    INTERFACE8  ,                   \
                                                                                    INTERFACE9  ,                   \
                                                                                    INTERFACE10 ,                   \
                                                                                    INTERFACE11                     \
                                                                                )                                   \
                                        ),                                                                          \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_2     (   INTERFACE12 ,                   \
                                                                                    INTERFACE13                     \
                                                                                )                                   \
                                        )                                                                           \
                                    )

//  implementation of XInterface with 14 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_14( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14 )   \
    PRIVATE_DEFINE_XINTERFACE_LARGE (   CLASS,                                                                      \
                                        BASECLASS,                                                                  \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_11    (   INTERFACE1  ,                   \
                                                                                    INTERFACE2  ,                   \
                                                                                    INTERFACE3  ,                   \
                                                                                    INTERFACE4  ,                   \
                                                                                    INTERFACE5  ,                   \
                                                                                    INTERFACE6  ,                   \
                                                                                    INTERFACE7  ,                   \
                                                                                    INTERFACE8  ,                   \
                                                                                    INTERFACE9  ,                   \
                                                                                    INTERFACE10 ,                   \
                                                                                    INTERFACE11                     \
                                                                                )                                   \
                                        ),                                                                          \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_3     (   INTERFACE12 ,                   \
                                                                                    INTERFACE13 ,                   \
                                                                                    INTERFACE14                     \
                                                                                )                                   \
                                        )                                                                           \
                                    )

//  implementation of XInterface with 15 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_15( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14, INTERFACE15 )  \
    PRIVATE_DEFINE_XINTERFACE_LARGE (   CLASS,                                                                      \
                                        BASECLASS,                                                                  \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_11    (   INTERFACE1  ,                   \
                                                                                    INTERFACE2  ,                   \
                                                                                    INTERFACE3  ,                   \
                                                                                    INTERFACE4  ,                   \
                                                                                    INTERFACE5  ,                   \
                                                                                    INTERFACE6  ,                   \
                                                                                    INTERFACE7  ,                   \
                                                                                    INTERFACE8  ,                   \
                                                                                    INTERFACE9  ,                   \
                                                                                    INTERFACE10 ,                   \
                                                                                    INTERFACE11                     \
                                                                                )                                   \
                                        ),                                                                          \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_4     (   INTERFACE12 ,                   \
                                                                                    INTERFACE13 ,                   \
                                                                                    INTERFACE14 ,                   \
                                                                                    INTERFACE15                     \
                                                                                )                                   \
                                        )                                                                           \
                                    )

//  implementation of XInterface with 16 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_16( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14, INTERFACE15, INTERFACE16 ) \
    PRIVATE_DEFINE_XINTERFACE_LARGE (   CLASS,                                                                      \
                                        BASECLASS,                                                                  \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_11    (   INTERFACE1  ,                   \
                                                                                    INTERFACE2  ,                   \
                                                                                    INTERFACE3  ,                   \
                                                                                    INTERFACE4  ,                   \
                                                                                    INTERFACE5  ,                   \
                                                                                    INTERFACE6  ,                   \
                                                                                    INTERFACE7  ,                   \
                                                                                    INTERFACE8  ,                   \
                                                                                    INTERFACE9  ,                   \
                                                                                    INTERFACE10 ,                   \
                                                                                    INTERFACE11                     \
                                                                                )                                   \
                                        ),                                                                          \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_5     (   INTERFACE12 ,                   \
                                                                                    INTERFACE13 ,                   \
                                                                                    INTERFACE14 ,                   \
                                                                                    INTERFACE15 ,                   \
                                                                                    INTERFACE16                     \
                                                                                )                                   \
                                        )                                                                           \
                                    )

//  implementation of XInterface with 17 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_17( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14, INTERFACE15, INTERFACE16, INTERFACE17 ) \
    PRIVATE_DEFINE_XINTERFACE_LARGE (   CLASS,                                                                      \
                                        BASECLASS,                                                                  \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_11    (   INTERFACE1  ,                   \
                                                                                    INTERFACE2  ,                   \
                                                                                    INTERFACE3  ,                   \
                                                                                    INTERFACE4  ,                   \
                                                                                    INTERFACE5  ,                   \
                                                                                    INTERFACE6  ,                   \
                                                                                    INTERFACE7  ,                   \
                                                                                    INTERFACE8  ,                   \
                                                                                    INTERFACE9  ,                   \
                                                                                    INTERFACE10 ,                   \
                                                                                    INTERFACE11                     \
                                                                                )                                   \
                                        ),                                                                          \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_6     (   INTERFACE12 ,                   \
                                                                                    INTERFACE13 ,                   \
                                                                                    INTERFACE14 ,                   \
                                                                                    INTERFACE15 ,                   \
                                                                                    INTERFACE16 ,                   \
                                                                                    INTERFACE17                     \
                                                                                )                                   \
                                        )                                                                           \
                                    )

//  implementation of XInterface with 18 additional interfaces for queryInterface()
#define DEFINE_XINTERFACE_18( CLASS, BASECLASS, INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6, INTERFACE7, INTERFACE8, INTERFACE9, INTERFACE10, INTERFACE11, INTERFACE12, INTERFACE13, INTERFACE14, INTERFACE15, INTERFACE16, INTERFACE17, INTERFACE18 ) \
    PRIVATE_DEFINE_XINTERFACE_LARGE (   CLASS,                                                                      \
                                        BASECLASS,                                                                  \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_11    (   INTERFACE1  ,                   \
                                                                                    INTERFACE2  ,                   \
                                                                                    INTERFACE3  ,                   \
                                                                                    INTERFACE4  ,                   \
                                                                                    INTERFACE5  ,                   \
                                                                                    INTERFACE6  ,                   \
                                                                                    INTERFACE7  ,                   \
                                                                                    INTERFACE8  ,                   \
                                                                                    INTERFACE9  ,                   \
                                                                                    INTERFACE10 ,                   \
                                                                                    INTERFACE11                     \
                                                                                )                                   \
                                        ),                                                                          \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_7     (   INTERFACE12 ,                   \
                                                                                    INTERFACE13 ,                   \
                                                                                    INTERFACE14 ,                   \
                                                                                    INTERFACE15 ,                   \
                                                                                    INTERFACE16 ,                   \
                                                                                    INTERFACE17 ,                   \
                                                                                    INTERFACE18                     \
                                                                                )                                   \
                                        )                                                                           \
                                    )

//  implementation of XInterface with 19 additional interfaces for queryInterface()
#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 ) \
    PRIVATE_DEFINE_XINTERFACE_LARGE (   CLASS,                                                                      \
                                        BASECLASS,                                                                  \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_11    (   INTERFACE1  ,                   \
                                                                                    INTERFACE2  ,                   \
                                                                                    INTERFACE3  ,                   \
                                                                                    INTERFACE4  ,                   \
                                                                                    INTERFACE5  ,                   \
                                                                                    INTERFACE6  ,                   \
                                                                                    INTERFACE7  ,                   \
                                                                                    INTERFACE8  ,                   \
                                                                                    INTERFACE9  ,                   \
                                                                                    INTERFACE10 ,                   \
                                                                                    INTERFACE11                     \
                                                                                )                                   \
                                        ),                                                                          \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_8     (   INTERFACE12 ,                   \
                                                                                    INTERFACE13 ,                   \
                                                                                    INTERFACE14 ,                   \
                                                                                    INTERFACE15 ,                   \
                                                                                    INTERFACE16 ,                   \
                                                                                    INTERFACE17 ,                   \
                                                                                    INTERFACE18 ,                   \
                                                                                    INTERFACE19                     \
                                                                                )                                   \
                                        )                                                                           \
                                    )

//  implementation of XInterface with 20 additional interfaces for queryInterface()
#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 ) \
    PRIVATE_DEFINE_XINTERFACE_LARGE (   CLASS,                                                                      \
                                        BASECLASS,                                                                  \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_11    (   INTERFACE1  ,                   \
                                                                                    INTERFACE2  ,                   \
                                                                                    INTERFACE3  ,                   \
                                                                                    INTERFACE4  ,                   \
                                                                                    INTERFACE5  ,                   \
                                                                                    INTERFACE6  ,                   \
                                                                                    INTERFACE7  ,                   \
                                                                                    INTERFACE8  ,                   \
                                                                                    INTERFACE9  ,                   \
                                                                                    INTERFACE10 ,                   \
                                                                                    INTERFACE11                     \
                                                                                )                                   \
                                        ),                                                                          \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_9     (   INTERFACE12 ,                   \
                                                                                    INTERFACE13 ,                   \
                                                                                    INTERFACE14 ,                   \
                                                                                    INTERFACE15 ,                   \
                                                                                    INTERFACE16 ,                   \
                                                                                    INTERFACE17 ,                   \
                                                                                    INTERFACE18 ,                   \
                                                                                    INTERFACE19 ,                   \
                                                                                    INTERFACE20                     \
                                                                                )                                   \
                                        )                                                                           \
                                    )

//  implementation of XInterface with 21 additional interfaces for queryInterface()
#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 ) \
    PRIVATE_DEFINE_XINTERFACE_LARGE (   CLASS,                                                                      \
                                        BASECLASS,                                                                  \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_11    (   INTERFACE1  ,                   \
                                                                                    INTERFACE2  ,                   \
                                                                                    INTERFACE3  ,                   \
                                                                                    INTERFACE4  ,                   \
                                                                                    INTERFACE5  ,                   \
                                                                                    INTERFACE6  ,                   \
                                                                                    INTERFACE7  ,                   \
                                                                                    INTERFACE8  ,                   \
                                                                                    INTERFACE9  ,                   \
                                                                                    INTERFACE10 ,                   \
                                                                                    INTERFACE11                     \
                                                                                )                                   \
                                        ),                                                                          \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_10    (   INTERFACE12 ,                   \
                                                                                    INTERFACE13 ,                   \
                                                                                    INTERFACE14 ,                   \
                                                                                    INTERFACE15 ,                   \
                                                                                    INTERFACE16 ,                   \
                                                                                    INTERFACE17 ,                   \
                                                                                    INTERFACE18 ,                   \
                                                                                    INTERFACE19 ,                   \
                                                                                    INTERFACE20 ,                   \
                                                                                    INTERFACE21                     \
                                                                                )                                   \
                                        )                                                                           \
                                    )

//  implementation of XInterface with 22 additional interfaces for queryInterface()
#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 ) \
    PRIVATE_DEFINE_XINTERFACE_LARGE (   CLASS,                                                                      \
                                        BASECLASS,                                                                  \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_11    (   INTERFACE1  ,                   \
                                                                                    INTERFACE2  ,                   \
                                                                                    INTERFACE3  ,                   \
                                                                                    INTERFACE4  ,                   \
                                                                                    INTERFACE5  ,                   \
                                                                                    INTERFACE6  ,                   \
                                                                                    INTERFACE7  ,                   \
                                                                                    INTERFACE8  ,                   \
                                                                                    INTERFACE9  ,                   \
                                                                                    INTERFACE10 ,                   \
                                                                                    INTERFACE11                     \
                                                                                )                                   \
                                        ),                                                                          \
                                        ( aType, PRIVATE_DEFINE_INTERFACE_11    (   INTERFACE12 ,                   \
                                                                                    INTERFACE13 ,                   \
                                                                                    INTERFACE14 ,                   \
                                                                                    INTERFACE15 ,                   \
                                                                                    INTERFACE16 ,                   \
                                                                                    INTERFACE17 ,                   \
                                                                                    INTERFACE18 ,                   \
                                                                                    INTERFACE19 ,                   \
                                                                                    INTERFACE20 ,                   \
                                                                                    INTERFACE22 ,                   \
                                                                                    INTERFACE21                     \
                                                                                )                                   \
                                        )                                                                           \
                                    )

}       //  namespace framework

#endif // INCLUDED_FRAMEWORK_INC_MACROS_XINTERFACE_HXX

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */