My Project
UDK 3.2.7 C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
implbase11.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_IMPLBASE11_HXX_
29 #define _CPPUHELPER_IMPLBASE11_HXX_
30 
32 #include <rtl/instance.hxx>
33 
34 namespace cppu
35 {
37 
38  struct class_data11
39  {
40  sal_Int16 m_nTypes;
41  sal_Bool m_storedTypeRefs;
42  sal_Bool m_storedId;
43  sal_Int8 m_id[ 16 ];
44  type_entry m_typeEntries[ 11 + 1 ];
45  };
46 
47  template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Ifc7, typename Ifc8, typename Ifc9, typename Ifc10, typename Ifc11, typename Impl >
48  struct ImplClassData11
49  {
50  class_data* operator ()()
51  {
52  static class_data11 s_cd =
53  {
54  11 +1, sal_False, sal_False,
55  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
56  {
57  { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 },
58  { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 },
59  { { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 },
60  { { Ifc4::static_type }, ((sal_IntPtr)(Ifc4 *) (Impl *) 16) - 16 },
61  { { Ifc5::static_type }, ((sal_IntPtr)(Ifc5 *) (Impl *) 16) - 16 },
62  { { Ifc6::static_type }, ((sal_IntPtr)(Ifc6 *) (Impl *) 16) - 16 },
63  { { Ifc7::static_type }, ((sal_IntPtr)(Ifc7 *) (Impl *) 16) - 16 },
64  { { Ifc8::static_type }, ((sal_IntPtr)(Ifc8 *) (Impl *) 16) - 16 },
65  { { Ifc9::static_type }, ((sal_IntPtr)(Ifc9 *) (Impl *) 16) - 16 },
66  { { Ifc10::static_type }, ((sal_IntPtr)(Ifc10 *) (Impl *) 16) - 16 },
67  { { Ifc11::static_type }, ((sal_IntPtr)(Ifc11 *) (Impl *) 16) - 16 },
68  { { com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 }
69  }
70  };
71  return reinterpret_cast< class_data * >(&s_cd);
72  }
73  };
74 
76 
85  template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 >
86  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelper11
87  : public com::sun::star::lang::XTypeProvider
88  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11
89  {
90  struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, ImplHelper11<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {};
91  public:
92  virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
93  { return ImplHelper_query( rType, cd::get(), this ); }
94  virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
95  { return ImplHelper_getTypes( cd::get() ); }
96  virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
97  { return ImplHelper_getImplementationId( cd::get() ); }
98 
99 #if !defined _MSC_VER // public -> protected changes mangled names there
100  protected:
101 #endif
102  ~ImplHelper11() throw () {}
103  };
112  template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 >
113  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper11
114  : public OWeakObject
115  , public com::sun::star::lang::XTypeProvider
116  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11
117  {
118  struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, WeakImplHelper11<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {};
119  public:
120  virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
121  { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
122  virtual void SAL_CALL acquire() throw ()
123  { OWeakObject::acquire(); }
124  virtual void SAL_CALL release() throw ()
125  { OWeakObject::release(); }
126  virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
127  { return WeakImplHelper_getTypes( cd::get() ); }
128  virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
129  { return ImplHelper_getImplementationId( cd::get() ); }
130  };
144  template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 >
145  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggImplHelper11
146  : public OWeakAggObject
147  , public com::sun::star::lang::XTypeProvider
148  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11
149  {
150  struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, WeakAggImplHelper11<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {};
151  public:
152  virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
153  { return OWeakAggObject::queryInterface( rType ); }
154  virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
155  { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
156  virtual void SAL_CALL acquire() throw ()
158  virtual void SAL_CALL release() throw ()
160  virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
161  { return WeakAggImplHelper_getTypes( cd::get() ); }
162  virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
163  { return ImplHelper_getImplementationId( cd::get() ); }
164  };
181  template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 >
182  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplInheritanceHelper11
183  : public BaseClass
184  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11
185  {
186  struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, ImplInheritanceHelper11<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {};
187  protected:
188  template< typename T1 >
189  explicit ImplInheritanceHelper11(T1 const & arg1): BaseClass(arg1) {}
190  template< typename T1, typename T2 >
191  ImplInheritanceHelper11(T1 const & arg1, T2 const & arg2):
192  BaseClass(arg1, arg2) {}
193  template< typename T1, typename T2, typename T3 >
195  T1 const & arg1, T2 const & arg2, T3 const & arg3):
196  BaseClass(arg1, arg2, arg3) {}
197  template< typename T1, typename T2, typename T3, typename T4 >
199  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
200  BaseClass(arg1, arg2, arg3, arg4) {}
201  template<
202  typename T1, typename T2, typename T3, typename T4, typename T5 >
204  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
205  T5 const & arg5):
206  BaseClass(arg1, arg2, arg3, arg4, arg5) {}
207  template<
208  typename T1, typename T2, typename T3, typename T4, typename T5,
209  typename T6 >
211  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
212  T5 const & arg5, T6 const & arg6):
213  BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
214  public:
216  virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
217  {
218  com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
219  if (aRet.hasValue())
220  return aRet;
221  return BaseClass::queryInterface( rType );
222  }
223  virtual void SAL_CALL acquire() throw ()
224  { BaseClass::acquire(); }
225  virtual void SAL_CALL release() throw ()
226  { BaseClass::release(); }
227  virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
228  { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
229  virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
230  { return ImplHelper_getImplementationId( cd::get() ); }
231  };
249  template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 >
250  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE AggImplInheritanceHelper11
251  : public BaseClass
252  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11
253  {
254  struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, AggImplInheritanceHelper11<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {};
255  protected:
256  template< typename T1 >
257  explicit AggImplInheritanceHelper11(T1 const & arg1): BaseClass(arg1) {}
258  template< typename T1, typename T2 >
259  AggImplInheritanceHelper11(T1 const & arg1, T2 const & arg2):
260  BaseClass(arg1, arg2) {}
261  template< typename T1, typename T2, typename T3 >
263  T1 const & arg1, T2 const & arg2, T3 const & arg3):
264  BaseClass(arg1, arg2, arg3) {}
265  template< typename T1, typename T2, typename T3, typename T4 >
267  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
268  BaseClass(arg1, arg2, arg3, arg4) {}
269  template<
270  typename T1, typename T2, typename T3, typename T4, typename T5 >
272  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
273  T5 const & arg5):
274  BaseClass(arg1, arg2, arg3, arg4, arg5) {}
275  template<
276  typename T1, typename T2, typename T3, typename T4, typename T5,
277  typename T6 >
279  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
280  T5 const & arg5, T6 const & arg6):
281  BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
282  public:
284  virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
285  { return BaseClass::queryInterface( rType ); }
286  virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
287  {
288  com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
289  if (aRet.hasValue())
290  return aRet;
291  return BaseClass::queryAggregation( rType );
292  }
293  virtual void SAL_CALL acquire() throw ()
294  { BaseClass::acquire(); }
295  virtual void SAL_CALL release() throw ()
296  { BaseClass::release(); }
297  virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
298  { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
299  virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
300  { return ImplHelper_getImplementationId( cd::get() ); }
301  };
302 }
303 
304 #endif
305 
306 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */