diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-14 10:49:08 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-03-14 11:06:48 +0000 |
commit | 218cd09611583437c05c33e2aa3b2b81cb416f98 (patch) | |
tree | 1b3b99677e6acff1f6224f9bd7441f161fcf2596 /framework/inc/macros/xinterface.hxx | |
parent | f7965b0bcd559451c471a26bf5fd6f542887d95e (diff) |
inline some use-once macros
Change-Id: I7ebd8fe70b083a772118a1aab8cdfbf795d6f1e5
Reviewed-on: https://gerrit.libreoffice.org/23235
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'framework/inc/macros/xinterface.hxx')
-rw-r--r-- | framework/inc/macros/xinterface.hxx | 64 |
1 files changed, 16 insertions, 48 deletions
diff --git a/framework/inc/macros/xinterface.hxx b/framework/inc/macros/xinterface.hxx index 4adf324cbfcc..36396856a66f 100644 --- a/framework/inc/macros/xinterface.hxx +++ b/framework/inc/macros/xinterface.hxx @@ -63,9 +63,10 @@ ________________________________________________________________________________ } // private -// implementation of XInterface::queryInterface() with max. 12 other interfaces! +// complete implementation of XInterface with max. 12 other interfaces! -#define PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE( CLASS, BASECLASS, INTERFACES ) \ +#define PRIVATE_DEFINE_XINTERFACE( CLASS, BASECLASS, INTERFACES ) \ + PRIVATE_DEFINE_XINTERFACE_ACQUIRE_RELEASE( CLASS, BASECLASS ) \ css::uno::Any SAL_CALL CLASS::queryInterface( const css::uno::Type& aType ) throw( css::uno::RuntimeException, std::exception ) \ { \ /* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */ \ @@ -82,10 +83,11 @@ ________________________________________________________________________________ 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 ) \ +#define PRIVATE_DEFINE_XINTERFACE_LARGE( CLASS, BASECLASS, INTERFACES_FIRST, INTERFACES_SECOND ) \ + PRIVATE_DEFINE_XINTERFACE_ACQUIRE_RELEASE( CLASS, BASECLASS ) \ css::uno::Any SAL_CALL CLASS::queryInterface( const css::uno::Type& aType ) throw( css::uno::RuntimeException, std::exception ) \ { \ /* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */ \ @@ -108,16 +110,6 @@ ________________________________________________________________________________ return aReturn; \ } -// private -// complete implementation of XInterface for different use cases - -#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] @@ -133,44 +125,20 @@ ________________________________________________________________________________ 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 ), \ + PRIVATE_DEFINE_INTERFACE_1( 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 ), \ + PRIVATE_DEFINE_INTERFACE_6( INTERFACE1, INTERFACE2, INTERFACE3, INTERFACE4, INTERFACE5, INTERFACE6 ), \ + INTERFACE7, \ + INTERFACE8, \ + INTERFACE9, \ + INTERFACE10, \ INTERFACE11 // public |