My Project
UDK 3.2.7 C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
compbase3.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
3  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * Copyright 2000, 2010 Oracle and/or its affiliates.
7  *
8  * OpenOffice.org - a multi-platform office productivity suite
9  *
10  * This file is part of OpenOffice.org.
11  *
12  * OpenOffice.org is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License version 3
14  * only, as published by the Free Software Foundation.
15  *
16  * OpenOffice.org is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Lesser General Public License version 3 for more details
20  * (a copy is included in the LICENSE file that accompanied this code).
21  *
22  * You should have received a copy of the GNU Lesser General Public License
23  * version 3 along with OpenOffice.org. If not, see
24  * <http://www.openoffice.org/license.html>
25  * for a copy of the LGPLv3 License.
26  *
27  ************************************************************************/
28 #ifndef _CPPUHELPER_COMPBASE3_HXX_
29 #define _CPPUHELPER_COMPBASE3_HXX_
30 
31 #include <cppuhelper/implbase3.hxx>
33 /*
34 __DEF_COMPIMPLHELPER_EX( 3 )
35 */
36 
37 namespace cppu
38 {
39 
40 // Suppress warnings about hidden functions in case any of the IfcN has
41 // functions named dispose, addEventListener, or removeEventListener:
42 #if defined __SUNPRO_CC
43 #pragma disable_warn
44 #endif
45 
60  template< class Ifc1, class Ifc2, class Ifc3 >
61  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakComponentImplHelper3
62  : public WeakComponentImplHelperBase
63  , public ::com::sun::star::lang::XTypeProvider
64  , public Ifc1, public Ifc2, public Ifc3
65  {
66  struct cd : public rtl::StaticAggregate< class_data, ImplClassData3 < Ifc1, Ifc2, Ifc3, WeakComponentImplHelper3<Ifc1, Ifc2, Ifc3> > > {};
67  public:
68  inline WeakComponentImplHelper3( ::osl::Mutex & rMutex ) throw ()
69  : WeakComponentImplHelperBase( rMutex )
70  {}
71  virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
72  { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); }
73  virtual void SAL_CALL acquire() throw ()
74  { WeakComponentImplHelperBase::acquire(); }
75  virtual void SAL_CALL release() throw ()
76  { WeakComponentImplHelperBase::release(); }
77  virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException)
78  { WeakComponentImplHelperBase::dispose(); }
79  virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException)
80  { WeakComponentImplHelperBase::addEventListener(xListener); }
81  virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException)
82  { WeakComponentImplHelperBase::removeEventListener(xListener); }
83  virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
84  { return WeakComponentImplHelper_getTypes( cd::get() ); }
85  virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
86  { return ImplHelper_getImplementationId( cd::get() ); }
87  };
88 
89 #if defined __SUNPRO_CC
90 #pragma enable_warn
91 #endif
92 
102  template< class Ifc1, class Ifc2, class Ifc3 >
103  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE PartialWeakComponentImplHelper3
104  : public WeakComponentImplHelperBase
105  , public ::com::sun::star::lang::XTypeProvider
106  , public Ifc1, public Ifc2, public Ifc3
107  {
108  struct cd : public rtl::StaticAggregate< class_data, ImplClassData3 < Ifc1, Ifc2, Ifc3, PartialWeakComponentImplHelper3<Ifc1, Ifc2, Ifc3> > > {};
109  public:
110  inline PartialWeakComponentImplHelper3( ::osl::Mutex & rMutex ) throw ()
111  : WeakComponentImplHelperBase( rMutex )
112  {}
113  virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
114  { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); }
115  virtual void SAL_CALL acquire() throw ()
116  { WeakComponentImplHelperBase::acquire(); }
117  virtual void SAL_CALL release() throw ()
118  { WeakComponentImplHelperBase::release(); }
119  virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
120  { return WeakComponentImplHelper_getTypes( cd::get() ); }
121  virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
122  { return ImplHelper_getImplementationId( cd::get() ); }
123  };
124 
142  template< class Ifc1, class Ifc2, class Ifc3 >
143  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggComponentImplHelper3
144  : public WeakAggComponentImplHelperBase
145  , public ::com::sun::star::lang::XTypeProvider
146  , public Ifc1, public Ifc2, public Ifc3
147  {
148  struct cd : public rtl::StaticAggregate< class_data, ImplClassData3 < Ifc1, Ifc2, Ifc3, WeakAggComponentImplHelper3<Ifc1, Ifc2, Ifc3> > > {};
149  public:
150  inline WeakAggComponentImplHelper3( ::osl::Mutex & rMutex ) throw ()
151  : WeakAggComponentImplHelperBase( rMutex )
152  {}
153  virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
155  virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
156  { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); }
157  virtual void SAL_CALL acquire() throw ()
158  { WeakAggComponentImplHelperBase::acquire(); }
159  virtual void SAL_CALL release() throw ()
160  { WeakAggComponentImplHelperBase::release(); }
161  virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
162  { return WeakAggComponentImplHelper_getTypes( cd::get() ); }
163  virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
164  { return ImplHelper_getImplementationId( cd::get() ); }
165  };
166 }
167 
168 #endif
169 
170 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */