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 INCLUDED_FRAMEWORK_INC_MACROS_XTYPEPROVIDER_HXX
21 #define INCLUDED_FRAMEWORK_INC_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 _________________________________________________________________________________________________________________*/
53 // implementation of XTypeProvider::getImplementationId()
55 #define PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
56 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL CLASS::getImplementationId() throw( ::com::sun::star::uno::RuntimeException, std::exception ) \
58 return css::uno::Sequence<sal_Int8>(); \
62 // implementation of XTypeProvider::getTypes() with max. 12 interfaces!
64 #define PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES( CLASS, TYPES ) \
65 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL CLASS::getTypes() throw( ::com::sun::star::uno::RuntimeException, std::exception ) \
67 /* Optimize this method ! */ \
68 /* We initialize a static variable only one time. */ \
69 /* And we don't must use a mutex at every call! */ \
70 /* For the first call; pTypeCollection is NULL - */ \
71 /* for the second call pTypeCollection is different from NULL! */ \
72 static ::cppu::OTypeCollection* pTypeCollection = NULL; \
73 if ( pTypeCollection == NULL ) \
75 /* Ready for multithreading; get global mutex for first call of this method only! see before */ \
76 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); \
77 /* Control these pointer again ... it can be, that another instance will be faster then these! */ \
78 if ( pTypeCollection == NULL ) \
80 /* Create a static typecollection ... */ \
81 /* Attention: "TYPES" will expand to "(...)"! */ \
82 static ::cppu::OTypeCollection aTypeCollection TYPES; \
83 /* ... and set his address to static pointer! */ \
84 pTypeCollection = &aTypeCollection; \
87 return pTypeCollection->getTypes(); \
91 // implementation of XTypeProvider::getTypes() with more than 12 interfaces!
93 #define PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_LARGE( CLASS, TYPES_FIRST, TYPES_SECOND ) \
94 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL CLASS::getTypes() throw( ::com::sun::star::uno::RuntimeException, std::exception ) \
96 /* Optimize this method ! */ \
97 /* We initialize a static variable only one time. */ \
98 /* And we don't must use a mutex at every call! */ \
99 /* For the first call; pTypeCollection is NULL - */ \
100 /* for the second call pTypeCollection is different from NULL! */ \
101 static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >* pTypeCollection = NULL; \
102 if ( pTypeCollection == NULL ) \
104 /* Ready for multithreading; get global mutex for first call of this method only! see before */ \
105 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); \
106 /* Control these pointer again ... it can be, that another instance will be faster then these! */ \
107 if ( pTypeCollection == NULL ) \
109 /* Create two typecollections */ \
110 /* (cppuhelper support 12 items per collection only!) */ \
111 ::cppu::OTypeCollection aTypeCollection1 TYPES_FIRST; \
112 ::cppu::OTypeCollection aTypeCollection2 TYPES_SECOND; \
113 /* Copy all items from both sequences to one result list! */ \
114 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqTypes1 = aTypeCollection1.getTypes(); \
115 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqTypes2 = aTypeCollection2.getTypes(); \
116 sal_Int32 nCount1 = seqTypes1.getLength(); \
117 sal_Int32 nCount2 = seqTypes2.getLength(); \
118 static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqResult ( nCount1+nCount2 ); \
119 sal_Int32 nSource = 0; \
120 sal_Int32 nDestination= 0; \
121 while( nSource<nCount1 ) \
123 seqResult[nDestination] = seqTypes1[nSource]; \
128 while( nSource<nCount2 ) \
130 seqResult[nDestination] = seqTypes2[nSource]; \
134 /* ... and set his address to static pointer! */ \
135 pTypeCollection = &seqResult; \
138 return *pTypeCollection; \
142 // implementation of XTypeProvider::getTypes() with using max. 12 interfaces + baseclass!
144 #define PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_BASECLASS( CLASS, BASECLASS, TYPES ) \
145 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL CLASS::getTypes() throw( ::com::sun::star::uno::RuntimeException ) \
147 /* Optimize this method ! */ \
148 /* We initialize a static variable only one time. */ \
149 /* And we don't must use a mutex at every call! */ \
150 /* For the first call; pTypeCollection is NULL - */ \
151 /* for the second call pTypeCollection is different from NULL! */ \
152 static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >* pTypeCollection = NULL; \
153 if ( pTypeCollection == NULL ) \
155 /* Ready for multithreading; get global mutex for first call of this method only! see before */ \
156 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); \
157 /* Control these pointer again ... it can be, that another instance will be faster then these! */ \
158 if ( pTypeCollection == NULL ) \
160 /* Create static typecollection for my own interfaces! */ \
161 static ::cppu::OTypeCollection aTypeCollection TYPES; \
162 /* Copy all items from my list sequences and from my baseclass */ \
163 /* to one result list! */ \
164 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqTypes1 = aTypeCollection.getTypes(); \
165 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqTypes2 = BASECLASS::getTypes(); \
166 sal_Int32 nCount1 = seqTypes1.getLength(); \
167 sal_Int32 nCount2 = seqTypes2.getLength(); \
168 static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqResult ( nCount1+nCount2 ); \
169 sal_Int32 nSource = 0; \
170 sal_Int32 nDestination= 0; \
171 while( nSource<nCount1 ) \
173 seqResult[nDestination] = seqTypes1[nSource]; \
178 while( nSource<nCount2 ) \
180 seqResult[nDestination] = seqTypes2[nSource]; \
184 /* ... and set his address to static pointer! */ \
185 pTypeCollection = &seqResult; \
188 return *pTypeCollection; \
192 // help macros to replace TYPES in getTypes() [see before]
194 #define PRIVATE_DEFINE_TYPE_1( TYPE1 ) \
195 cppu::UnoType<TYPE1>::get()
197 #define PRIVATE_DEFINE_TYPE_2( TYPE1, TYPE2 ) \
198 PRIVATE_DEFINE_TYPE_1( TYPE1 ), \
199 cppu::UnoType<TYPE2>::get()
201 #define PRIVATE_DEFINE_TYPE_3( TYPE1, TYPE2, TYPE3 ) \
202 PRIVATE_DEFINE_TYPE_2( TYPE1, TYPE2 ), \
203 cppu::UnoType<TYPE3>::get()
205 #define PRIVATE_DEFINE_TYPE_4( TYPE1, TYPE2, TYPE3, TYPE4 ) \
206 PRIVATE_DEFINE_TYPE_3( TYPE1, TYPE2, TYPE3 ), \
207 cppu::UnoType<TYPE4>::get()
209 #define PRIVATE_DEFINE_TYPE_5( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5 ) \
210 PRIVATE_DEFINE_TYPE_4( TYPE1, TYPE2, TYPE3, TYPE4 ), \
211 cppu::UnoType<TYPE5>::get()
213 #define PRIVATE_DEFINE_TYPE_6( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6 ) \
214 PRIVATE_DEFINE_TYPE_5( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5 ), \
215 cppu::UnoType<TYPE6>::get()
217 #define PRIVATE_DEFINE_TYPE_7( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7 ) \
218 PRIVATE_DEFINE_TYPE_6( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6 ), \
219 cppu::UnoType<TYPE7>::get()
221 #define PRIVATE_DEFINE_TYPE_8( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8 ) \
222 PRIVATE_DEFINE_TYPE_7( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7 ), \
223 cppu::UnoType<TYPE8>::get()
225 #define PRIVATE_DEFINE_TYPE_9( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9 ) \
226 PRIVATE_DEFINE_TYPE_8( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8 ), \
227 cppu::UnoType<TYPE9>::get()
229 #define PRIVATE_DEFINE_TYPE_10( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10 ) \
230 PRIVATE_DEFINE_TYPE_9( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9 ), \
231 cppu::UnoType<TYPE10>::get()
233 #define PRIVATE_DEFINE_TYPE_11( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11 ) \
234 PRIVATE_DEFINE_TYPE_10( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10 ), \
235 cppu::UnoType<TYPE11>::get()
237 #define PRIVATE_DEFINE_TYPE_12( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12 ) \
238 PRIVATE_DEFINE_TYPE_11( TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11 ), \
239 cppu::UnoType<TYPE12>::get()
242 // complete implementation of XTypeProvider
244 #define PRIVATE_DEFINE_XTYPEPROVIDER_PURE( CLASS ) \
245 PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
246 PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES( CLASS, cppu::UnoType<com::sun::star::lang::XTypeProvider>::get())
248 #define PRIVATE_DEFINE_XTYPEPROVIDER( CLASS, TYPES ) \
249 PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
250 PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES( CLASS, TYPES )
252 #define PRIVATE_DEFINE_XTYPEPROVIDER_LARGE( CLASS, TYPES_FIRST, TYPES_SECOND ) \
253 PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
254 PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_LARGE( CLASS, TYPES_FIRST, TYPES_SECOND )
256 #define PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS( CLASS, BASECLASS, TYPES ) \
257 PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
258 PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_BASECLASS( CLASS, BASECLASS, TYPES )
261 // declaration of XTypeProvider
263 #define FWK_DECLARE_XTYPEPROVIDER \
264 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes () throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;\
265 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
268 // implementation of XTypeProvider
270 // implementation of XTypeProvider without additional interface for getTypes()
271 // XTypeProvider is used as the only one interface automatically.
272 // Following defines don't use XTypeProvider automatically!!!!
273 #define DEFINE_XTYPEPROVIDER_0( CLASS ) \
274 PRIVATE_DEFINE_XTYPEPROVIDER_PURE( CLASS )
276 // implementation of XTypeProvider with 1 additional interface for getTypes()
277 #define DEFINE_XTYPEPROVIDER_1( CLASS, TYPE1 ) \
278 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
279 (PRIVATE_DEFINE_TYPE_1 ( TYPE1 \
283 // implementation of XTypeProvider with 2 additional interfaces for getTypes()
284 #define DEFINE_XTYPEPROVIDER_2( CLASS, TYPE1, TYPE2 ) \
285 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
286 (PRIVATE_DEFINE_TYPE_2 ( TYPE1 , \
291 // implementation of XTypeProvider with 3 additional interfaces for getTypes()
292 #define DEFINE_XTYPEPROVIDER_3( CLASS, TYPE1, TYPE2, TYPE3 ) \
293 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
294 (PRIVATE_DEFINE_TYPE_3 ( TYPE1 , \
300 // implementation of XTypeProvider with 4 additional interfaces for getTypes()
301 #define DEFINE_XTYPEPROVIDER_4( CLASS, TYPE1, TYPE2, TYPE3, TYPE4 ) \
302 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
303 (PRIVATE_DEFINE_TYPE_4 ( TYPE1 , \
310 // implementation of XTypeProvider with 5 additional interfaces for getTypes()
311 #define DEFINE_XTYPEPROVIDER_5( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5 ) \
312 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
313 (PRIVATE_DEFINE_TYPE_5 ( TYPE1 , \
321 // implementation of XTypeProvider with 6 additional interfaces for getTypes()
322 #define DEFINE_XTYPEPROVIDER_6( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6 ) \
323 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
324 (PRIVATE_DEFINE_TYPE_6 ( TYPE1 , \
333 // implementation of XTypeProvider with 7 additional interfaces for getTypes()
334 #define DEFINE_XTYPEPROVIDER_7( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7 ) \
335 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
336 (PRIVATE_DEFINE_TYPE_7 ( TYPE1 , \
346 // implementation of XTypeProvider with 8 additional interfaces for getTypes()
347 #define DEFINE_XTYPEPROVIDER_8( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8 ) \
348 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
349 (PRIVATE_DEFINE_TYPE_8 ( TYPE1 , \
360 // implementation of XTypeProvider with 9 additional interfaces for getTypes()
361 #define DEFINE_XTYPEPROVIDER_9( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9 ) \
362 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
363 (PRIVATE_DEFINE_TYPE_9 ( TYPE1 , \
375 // implementation of XTypeProvider with 10 additional interfaces for getTypes()
376 #define DEFINE_XTYPEPROVIDER_10( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10 ) \
377 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
378 (PRIVATE_DEFINE_TYPE_10 ( TYPE1 , \
391 // implementation of XTypeProvider with 11 additional interfaces for getTypes()
392 #define DEFINE_XTYPEPROVIDER_11( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11 ) \
393 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
394 (PRIVATE_DEFINE_TYPE_11 ( TYPE1 , \
408 // implementation of XTypeProvider with 12 additional interfaces for getTypes()
409 #define DEFINE_XTYPEPROVIDER_12( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12 ) \
410 PRIVATE_DEFINE_XTYPEPROVIDER ( CLASS, \
411 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
426 // implementation of XTypeProvider with 13 additional interfaces for getTypes()
427 #define DEFINE_XTYPEPROVIDER_13( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13 ) \
428 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
429 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
442 (PRIVATE_DEFINE_TYPE_1 ( TYPE13 \
446 // implementation of XTypeProvider with 14 additional interfaces for getTypes()
447 #define DEFINE_XTYPEPROVIDER_14( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14 ) \
448 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
449 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
462 (PRIVATE_DEFINE_TYPE_2 ( TYPE13 , \
467 // implementation of XTypeProvider with 15 additional interfaces for getTypes()
468 #define DEFINE_XTYPEPROVIDER_15( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15 ) \
469 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
470 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
483 (PRIVATE_DEFINE_TYPE_3 ( TYPE13 , \
489 // implementation of XTypeProvider with 16 additional interfaces for getTypes()
490 #define DEFINE_XTYPEPROVIDER_16( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16 ) \
491 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
492 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
505 (PRIVATE_DEFINE_TYPE_4 ( TYPE13 , \
512 // implementation of XTypeProvider with 17 additional interfaces for getTypes()
513 #define DEFINE_XTYPEPROVIDER_17( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16, TYPE17 ) \
514 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
515 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
528 (PRIVATE_DEFINE_TYPE_5 ( TYPE13 , \
536 // implementation of XTypeProvider with 18 additional interfaces for getTypes()
537 #define DEFINE_XTYPEPROVIDER_18( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16, TYPE17, TYPE18 ) \
538 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
539 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
552 (PRIVATE_DEFINE_TYPE_6 ( TYPE13 , \
561 // implementation of XTypeProvider with 19 additional interfaces for getTypes()
562 #define DEFINE_XTYPEPROVIDER_19( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16, TYPE17, TYPE18, TYPE19 ) \
563 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
564 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
577 (PRIVATE_DEFINE_TYPE_7 ( TYPE13 , \
587 // implementation of XTypeProvider with 20 additional interfaces for getTypes()
588 #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 ) \
589 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
590 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
603 (PRIVATE_DEFINE_TYPE_8 ( TYPE13 , \
614 // implementation of XTypeProvider with 20 additional interfaces for getTypes()
615 #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 ) \
616 PRIVATE_DEFINE_XTYPEPROVIDER_LARGE ( CLASS, \
617 (PRIVATE_DEFINE_TYPE_12 ( TYPE1 , \
630 (PRIVATE_DEFINE_TYPE_9 ( TYPE13 , \
642 // implementation of XTypeProvider with 1 additional interface for getTypes() AND using 1 baseclass
643 #define DEFINE_XTYPEPROVIDER_1_WITH_BASECLASS( CLASS, BASECLASS, TYPE1 ) \
644 PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS ( CLASS, \
646 (PRIVATE_DEFINE_TYPE_1 ( TYPE1 \
650 // implementation of XTypeProvider with 2 additional interface for getTypes() AND using 1 baseclass
651 #define DEFINE_XTYPEPROVIDER_2_WITH_BASECLASS( CLASS, BASECLASS, TYPE1, TYPE2 ) \
652 PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS ( CLASS, \
654 (PRIVATE_DEFINE_TYPE_2 ( TYPE1 , \
659 // implementation of XTypeProvider with 3 additional interface for getTypes() AND using 1 baseclass
660 #define DEFINE_XTYPEPROVIDER_3_WITH_BASECLASS( CLASS, BASECLASS, TYPE1, TYPE2, TYPE3 ) \
661 PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS ( CLASS, \
663 (PRIVATE_DEFINE_TYPE_3 ( TYPE1 , \
668 // implementation of XTypeProvider with 4 additional interface for getTypes() AND using 1 baseclass
669 #define DEFINE_XTYPEPROVIDER_4_WITH_BASECLASS( CLASS, BASECLASS, TYPE1, TYPE2, TYPE3, TYPE4 ) \
670 PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS ( CLASS, \
672 (PRIVATE_DEFINE_TYPE_4 ( TYPE1 , \
678 // implementation of XTypeProvider with 5 additional interface for getTypes() AND using 1 baseclass
679 #define DEFINE_XTYPEPROVIDER_5_WITH_BASECLASS( CLASS, BASECLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5 ) \
680 PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS ( CLASS, \
682 (PRIVATE_DEFINE_TYPE_5 ( TYPE1 , \
690 } // namespace framework
692 #endif // INCLUDED_FRAMEWORK_INC_MACROS_XTYPEPROVIDER_HXX
694 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */