1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __FRAMEWORK_MACROS_XTYPEPROVIDER_HXX_
21 #define __FRAMEWORK_MACROS_XTYPEPROVIDER_HXX_
23 #include <com/sun/star/lang/XTypeProvider.hpp>
24 #include <com/sun/star/uno/RuntimeException.hpp>
26 #include <com/sun/star/uno/Any.hxx>
27 #include <com/sun/star/uno/Reference.hxx>
28 #include <com/sun/star/uno/Sequence.hxx>
29 #include <com/sun/star/uno/Type.hxx>
30 #include <cppuhelper/typeprovider.hxx>
31 #include <osl/mutex.hxx>
32 #include <rtl/ustring.hxx>
36 /*_________________________________________________________________________________________________________________
38 macros for declaration and definition of XTypeProvider
39 Please use follow public macros only!
41 1) DEFINE_XTYPEPROVIDER => use it in header to declare XTypeProvider and his methods
42 2) DECLARE_TYPEPROVIDER_0( CLASS ) => use it to define implementation of XTypeProvider for 0 supported type
43 DECLARE_TYPEPROVIDER_1( CLASS, TYPE1 ) => use it to define implementation of XTypeProvider for 1 supported type
45 DECLARE_TYPEPROVIDER_16( CLASS, TYPE1, ... , TYPE16 )
46 3) DEFINE_XTYPEPROVIDER_1_WITH_BASECLASS( CLASS, BASECLASS, TYPE1 ) => use it to define implementation of XTypeProvider for 1 additional supported type to baseclass
48 DEFINE_XTYPEPROVIDER_5_WITH_BASECLASS( CLASS, BASECLASS, TYPE1, ..., TYPE5 )
50 _________________________________________________________________________________________________________________*/
52 //*****************************************************************************************************************
54 // implementation of XTypeProvider::getImplementationId()
55 //*****************************************************************************************************************
56 #define PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
57 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL CLASS::getImplementationId() throw( ::com::sun::star::uno::RuntimeException ) \
59 /* Create one Id for all instances of this class. */ \
60 /* Use ethernet address to do this! (sal_True) */ \
61 /* Optimize this method */ \
62 /* We initialize a static variable only one time. And we don't must use a mutex at every call! */ \
63 /* For the first call; pID is NULL - for the second call pID is different from NULL! */ \
64 static ::cppu::OImplementationId* pID = NULL ; \
67 /* Ready for multithreading; get global mutex for first call of this method only! see before */ \
68 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); \
69 /* Control these pointer again ... it can be, that another instance will be faster then these! */ \
72 /* Create a new static ID ... */ \
73 static ::cppu::OImplementationId aID( sal_False ); \
74 /* ... and set his address to static pointer! */ \
78 return pID->getImplementationId(); \
81 //*****************************************************************************************************************
83 // implementation of XTypeProvider::getTypes() with max. 12 interfaces!
84 //*****************************************************************************************************************
85 #define PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES( CLASS, TYPES ) \
86 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL CLASS::getTypes() throw( ::com::sun::star::uno::RuntimeException ) \
88 /* Optimize this method ! */ \
89 /* We initialize a static variable only one time. */ \
90 /* And we don't must use a mutex at every call! */ \
91 /* For the first call; pTypeCollection is NULL - */ \
92 /* for the second call pTypeCollection is different from NULL! */ \
93 static ::cppu::OTypeCollection* pTypeCollection = NULL ; \
94 if ( pTypeCollection == NULL ) \
96 /* Ready for multithreading; get global mutex for first call of this method only! see before */ \
97 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); \
98 /* Control these pointer again ... it can be, that another instance will be faster then these! */ \
99 if ( pTypeCollection == NULL ) \
101 /* Create a static typecollection ... */ \
102 /* Attention: "TYPES" will expand to "(...)"! */ \
103 static ::cppu::OTypeCollection aTypeCollection TYPES ; \
104 /* ... and set his address to static pointer! */ \
105 pTypeCollection = &aTypeCollection ; \
108 return pTypeCollection->getTypes(); \
111 //*****************************************************************************************************************
113 // implementation of XTypeProvider::getTypes() with more then 12 interfaces!
114 //*****************************************************************************************************************
115 #define PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_LARGE( CLASS, TYPES_FIRST, TYPES_SECOND ) \
116 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL CLASS::getTypes() throw( ::com::sun::star::uno::RuntimeException ) \
118 /* Optimize this method ! */ \
119 /* We initialize a static variable only one time. */ \
120 /* And we don't must use a mutex at every call! */ \
121 /* For the first call; pTypeCollection is NULL - */ \
122 /* for the second call pTypeCollection is different from NULL! */ \
123 static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >* pTypeCollection = NULL ; \
124 if ( pTypeCollection == NULL ) \
126 /* Ready for multithreading; get global mutex for first call of this method only! see before */ \
127 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); \
128 /* Control these pointer again ... it can be, that another instance will be faster then these! */ \
129 if ( pTypeCollection == NULL ) \
131 /* Create two typecollections */ \
132 /* (cppuhelper support 12 items per collection only!) */ \
133 ::cppu::OTypeCollection aTypeCollection1 TYPES_FIRST ; \
134 ::cppu::OTypeCollection aTypeCollection2 TYPES_SECOND ; \
135 /* Copy all items from both sequences to one result list! */ \
136 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqTypes1 = aTypeCollection1.getTypes(); \
137 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqTypes2 = aTypeCollection2.getTypes(); \
138 sal_Int32 nCount1 = seqTypes1.getLength(); \
139 sal_Int32 nCount2 = seqTypes2.getLength(); \
140 static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqResult ( nCount1+nCount2 ); \
141 sal_Int32 nSource = 0; \
142 sal_Int32 nDestination= 0; \
143 while( nSource<nCount1 ) \
145 seqResult[nDestination] = seqTypes1[nSource]; \
150 while( nSource<nCount2 ) \
152 seqResult[nDestination] = seqTypes2[nSource]; \
156 /* ... and set his address to static pointer! */ \
157 pTypeCollection = &seqResult; \
160 return *pTypeCollection; \
163 //*****************************************************************************************************************
165 // implementation of XTypeProvider::getTypes() with using max. 12 interfaces + baseclass!
166 //*****************************************************************************************************************
167 #define PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_BASECLASS( CLASS, BASECLASS, TYPES ) \
168 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL CLASS::getTypes() throw( ::com::sun::star::uno::RuntimeException ) \
170 /* Optimize this method ! */ \
171 /* We initialize a static variable only one time. */ \
172 /* And we don't must use a mutex at every call! */ \
173 /* For the first call; pTypeCollection is NULL - */ \
174 /* for the second call pTypeCollection is different from NULL! */ \
175 static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >* pTypeCollection = NULL ; \
176 if ( pTypeCollection == NULL ) \
178 /* Ready for multithreading; get global mutex for first call of this method only! see before */ \
179 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); \
180 /* Control these pointer again ... it can be, that another instance will be faster then these! */ \
181 if ( pTypeCollection == NULL ) \
183 /* Create static typecollection for my own interfaces! */ \
184 static ::cppu::OTypeCollection aTypeCollection TYPES ; \
185 /* Copy all items from my list sequences and from my baseclass */ \
186 /* to one result list! */ \
187 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqTypes1 = aTypeCollection.getTypes(); \
188 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqTypes2 = BASECLASS::getTypes(); \
189 sal_Int32 nCount1 = seqTypes1.getLength(); \
190 sal_Int32 nCount2 = seqTypes2.getLength(); \
191 static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqResult ( nCount1+nCount2 ); \
192 sal_Int32 nSource = 0; \
193 sal_Int32 nDestination= 0; \
194 while( nSource<nCount1 ) \
196 seqResult[nDestination] = seqTypes1[nSource]; \
201 while( nSource<nCount2 ) \
203 seqResult[nDestination] = seqTypes2[nSource]; \
207 /* ... and set his address to static pointer! */ \
208 pTypeCollection = &seqResult; \
211 return *pTypeCollection; \
214 //*****************************************************************************************************************
216 // help macros to replace TYPES in getTypes() [see before]
217 //*****************************************************************************************************************
218 #define PRIVATE_DEFINE_TYPE_1( TYPE1 ) \
219 ::getCppuType(( const ::com::sun::star::uno::Reference< TYPE1 >*)NULL )
221 #define PRIVATE_DEFINE_TYPE_2( TYPE1, TYPE2 ) \
222 PRIVATE_DEFINE_TYPE_1( TYPE1 ), \
223 ::getCppuType(( const ::com::sun::star::uno::Reference< TYPE2 >*)NULL )
225 #define PRIVATE_DEFINE_TYPE_3( TYPE1, TYPE2, TYPE3 ) \
226 PRIVATE_DEFINE_TYPE_2( TYPE1, TYPE2 ), \
227 ::getCppuType(( const ::com::sun::star::uno::Reference< TYPE3 >*)NULL )
229 #define PRIVATE_DEFINE_TYPE_4( TYPE1, TYPE2, TYPE3, TYPE4 ) \
230 PRIVATE_DEFINE_TYPE_3( TYPE1, TYPE2, TYPE3 ), \
231 ::getCppuType(( const ::com::sun::star::uno::Reference< TYPE4 >*)NULL )
233 #define PRIVATE_DEFINE_TYPE_5( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5 ) \
234 PRIVATE_DEFINE_TYPE_4( TYPE1, TYPE2, TYPE3, TYPE4 ), \
235 ::getCppuType(( const ::com::sun::star::uno::Reference< TYPE5 >*)NULL )
237 #define PRIVATE_DEFINE_TYPE_6( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6 ) \
238 PRIVATE_DEFINE_TYPE_5( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5 ), \
239 ::getCppuType(( const ::com::sun::star::uno::Reference< TYPE6 >*)NULL )
241 #define PRIVATE_DEFINE_TYPE_7( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7 ) \
242 PRIVATE_DEFINE_TYPE_6( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6 ), \
243 ::getCppuType(( const ::com::sun::star::uno::Reference< TYPE7 >*)NULL )
245 #define PRIVATE_DEFINE_TYPE_8( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8 ) \
246 PRIVATE_DEFINE_TYPE_7( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7 ), \
247 ::getCppuType(( const ::com::sun::star::uno::Reference< TYPE8 >*)NULL )
249 #define PRIVATE_DEFINE_TYPE_9( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9 ) \
250 PRIVATE_DEFINE_TYPE_8( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8 ), \
251 ::getCppuType(( const ::com::sun::star::uno::Reference< TYPE9 >*)NULL )
253 #define PRIVATE_DEFINE_TYPE_10( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10 ) \
254 PRIVATE_DEFINE_TYPE_9( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9 ), \
255 ::getCppuType(( const ::com::sun::star::uno::Reference< TYPE10 >*)NULL )
257 #define PRIVATE_DEFINE_TYPE_11( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11 ) \
258 PRIVATE_DEFINE_TYPE_10( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10 ), \
259 ::getCppuType(( const ::com::sun::star::uno::Reference< TYPE11 >*)NULL )
261 #define PRIVATE_DEFINE_TYPE_12( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12 ) \
262 PRIVATE_DEFINE_TYPE_11( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11 ), \
263 ::getCppuType(( const ::com::sun::star::uno::Reference< TYPE12 >*)NULL )
265 //*****************************************************************************************************************
267 // complete implementation of XTypeProvider
268 //*****************************************************************************************************************
269 #define PRIVATE_DEFINE_XTYPEPROVIDER_PURE( CLASS ) \
270 PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
271 PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES( CLASS, ::getCppuType(( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XTypeProvider >*)NULL ) )
273 #define PRIVATE_DEFINE_XTYPEPROVIDER( CLASS, TYPES ) \
274 PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
275 PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES( CLASS, TYPES )
277 #define PRIVATE_DEFINE_XTYPEPROVIDER_LARGE( CLASS, TYPES_FIRST, TYPES_SECOND ) \
278 PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
279 PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_LARGE( CLASS, TYPES_FIRST, TYPES_SECOND )
281 #define PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS( CLASS, BASECLASS, TYPES ) \
282 PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
283 PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_BASECLASS( CLASS, BASECLASS, TYPES )
285 //*****************************************************************************************************************
287 // declaration of XTypeProvider
288 //*****************************************************************************************************************
289 #define FWK_DECLARE_XTYPEPROVIDER \
290 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes () throw( ::com::sun::star::uno::RuntimeException );\
291 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( ::com::sun::star::uno::RuntimeException );
293 //*****************************************************************************************************************
295 // implementation of XTypeProvider
296 //*****************************************************************************************************************
297 // implementation of XTypeProvider without additional interface for getTypes()
298 // XTypeProvider is used as the only one interface automaticly.
299 // Following defines don't use XTypeProvider automaticly!!!!
300 #define DEFINE_XTYPEPROVIDER_0( CLASS ) \
301 PRIVATE_DEFINE_XTYPEPROVIDER_PURE( CLASS )
303 // implementation of XTypeProvider with 1 additional interface for getTypes()
304 #define DEFINE_XTYPEPROVIDER_1( CLASS, TYPE1 ) \
305 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
306 (PRIVATE_DEFINE_TYPE_1 ( TYPE1 \
310 // implementation of XTypeProvider with 2 additional interfaces for getTypes()
311 #define DEFINE_XTYPEPROVIDER_2( CLASS, TYPE1, TYPE2 ) \
312 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
313 (PRIVATE_DEFINE_TYPE_2 ( TYPE1 , \
318 // implementation of XTypeProvider with 3 additional interfaces for getTypes()
319 #define DEFINE_XTYPEPROVIDER_3( CLASS, TYPE1, TYPE2, TYPE3 ) \
320 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
321 (PRIVATE_DEFINE_TYPE_3 ( TYPE1 , \
327 // implementation of XTypeProvider with 4 additional interfaces for getTypes()
328 #define DEFINE_XTYPEPROVIDER_4( CLASS, TYPE1, TYPE2, TYPE3, TYPE4 ) \
329 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
330 (PRIVATE_DEFINE_TYPE_4 ( TYPE1 , \
337 // implementation of XTypeProvider with 5 additional interfaces for getTypes()
338 #define DEFINE_XTYPEPROVIDER_5( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5 ) \
339 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
340 (PRIVATE_DEFINE_TYPE_5 ( TYPE1 , \
348 // implementation of XTypeProvider with 6 additional interfaces for getTypes()
349 #define DEFINE_XTYPEPROVIDER_6( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6 ) \
350 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
351 (PRIVATE_DEFINE_TYPE_6 ( TYPE1 , \
360 // implementation of XTypeProvider with 7 additional interfaces for getTypes()
361 #define DEFINE_XTYPEPROVIDER_7( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7 ) \
362 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
363 (PRIVATE_DEFINE_TYPE_7 ( TYPE1 , \
373 // implementation of XTypeProvider with 8 additional interfaces for getTypes()
374 #define DEFINE_XTYPEPROVIDER_8( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8 ) \
375 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
376 (PRIVATE_DEFINE_TYPE_8 ( TYPE1 , \
387 // implementation of XTypeProvider with 9 additional interfaces for getTypes()
388 #define DEFINE_XTYPEPROVIDER_9( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9 ) \
389 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
390 (PRIVATE_DEFINE_TYPE_9 ( TYPE1 , \
402 // implementation of XTypeProvider with 10 additional interfaces for getTypes()
403 #define DEFINE_XTYPEPROVIDER_10( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10 ) \
404 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
405 (PRIVATE_DEFINE_TYPE_10 ( TYPE1 , \
418 // implementation of XTypeProvider with 11 additional interfaces for getTypes()
419 #define DEFINE_XTYPEPROVIDER_11( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11 ) \
420 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
421 (PRIVATE_DEFINE_TYPE_11 ( TYPE1 , \
435 // implementation of XTypeProvider with 12 additional interfaces for getTypes()
436 #define DEFINE_XTYPEPROVIDER_12( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12 ) \
437 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
438 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
453 // implementation of XTypeProvider with 13 additional interfaces for getTypes()
454 #define DEFINE_XTYPEPROVIDER_13( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13 ) \
455 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
456 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
469 (PRIVATE_DEFINE_TYPE_1 ( TYPE13 \
473 // implementation of XTypeProvider with 14 additional interfaces for getTypes()
474 #define DEFINE_XTYPEPROVIDER_14( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14 ) \
475 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
476 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
489 (PRIVATE_DEFINE_TYPE_2 ( TYPE13 , \
494 // implementation of XTypeProvider with 15 additional interfaces for getTypes()
495 #define DEFINE_XTYPEPROVIDER_15( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15 ) \
496 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
497 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
510 (PRIVATE_DEFINE_TYPE_3 ( TYPE13 , \
516 // implementation of XTypeProvider with 16 additional interfaces for getTypes()
517 #define DEFINE_XTYPEPROVIDER_16( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16 ) \
518 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
519 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
532 (PRIVATE_DEFINE_TYPE_4 ( TYPE13 , \
539 // implementation of XTypeProvider with 17 additional interfaces for getTypes()
540 #define DEFINE_XTYPEPROVIDER_17( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16, TYPE17 ) \
541 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
542 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
555 (PRIVATE_DEFINE_TYPE_5 ( TYPE13 , \
563 // implementation of XTypeProvider with 18 additional interfaces for getTypes()
564 #define DEFINE_XTYPEPROVIDER_18( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16, TYPE17, TYPE18 ) \
565 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
566 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
579 (PRIVATE_DEFINE_TYPE_6 ( TYPE13 , \
588 // implementation of XTypeProvider with 19 additional interfaces for getTypes()
589 #define DEFINE_XTYPEPROVIDER_19( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16, TYPE17, TYPE18, TYPE19 ) \
590 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
591 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
604 (PRIVATE_DEFINE_TYPE_7 ( TYPE13 , \
614 // implementation of XTypeProvider with 20 additional interfaces for getTypes()
615 #define DEFINE_XTYPEPROVIDER_20( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16, TYPE17, TYPE18, TYPE19, TYPE20 ) \
616 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
617 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
630 (PRIVATE_DEFINE_TYPE_8 ( TYPE13 , \
641 // implementation of XTypeProvider with 20 additional interfaces for getTypes()
642 #define DEFINE_XTYPEPROVIDER_21( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16, TYPE17, TYPE18, TYPE19, TYPE20, TYPE21 ) \
643 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
644 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
657 (PRIVATE_DEFINE_TYPE_9 ( TYPE13 , \
669 // implementation of XTypeProvider with 1 additional interface for getTypes() AND using 1 baseclass
670 #define DEFINE_XTYPEPROVIDER_1_WITH_BASECLASS( CLASS, BASECLASS, TYPE1 ) \
671 PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS ( CLASS, \
673 (PRIVATE_DEFINE_TYPE_1 ( TYPE1 \
677 // implementation of XTypeProvider with 2 additional interface for getTypes() AND using 1 baseclass
678 #define DEFINE_XTYPEPROVIDER_2_WITH_BASECLASS( CLASS, BASECLASS, TYPE1, TYPE2 ) \
679 PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS ( CLASS, \
681 (PRIVATE_DEFINE_TYPE_2 ( TYPE1 , \
686 // implementation of XTypeProvider with 3 additional interface for getTypes() AND using 1 baseclass
687 #define DEFINE_XTYPEPROVIDER_3_WITH_BASECLASS( CLASS, BASECLASS, TYPE1, TYPE2, TYPE3 ) \
688 PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS ( CLASS, \
690 (PRIVATE_DEFINE_TYPE_3 ( TYPE1 , \
695 // implementation of XTypeProvider with 4 additional interface for getTypes() AND using 1 baseclass
696 #define DEFINE_XTYPEPROVIDER_4_WITH_BASECLASS( CLASS, BASECLASS, TYPE1, TYPE2, TYPE3, TYPE4 ) \
697 PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS ( CLASS, \
699 (PRIVATE_DEFINE_TYPE_4 ( TYPE1 , \
705 // implementation of XTypeProvider with 5 additional interface for getTypes() AND using 1 baseclass
706 #define DEFINE_XTYPEPROVIDER_5_WITH_BASECLASS( CLASS, BASECLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5 ) \
707 PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS ( CLASS, \
709 (PRIVATE_DEFINE_TYPE_5 ( TYPE1 , \
717 } // namespace framework
719 #endif // #ifndef __FRAMEWORK_MACROS_XTYPEPROVIDER_HXX_
721 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */