My Project
UDK 3.2.7 C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
implbase12.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_IMPLBASE12_HXX_
29 #define _CPPUHELPER_IMPLBASE12_HXX_
30 
32 #include <rtl/instance.hxx>
33 
34 namespace cppu
35 {
37 
38  struct class_data12
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[ 12 + 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 Ifc12, typename Impl >
48  struct ImplClassData12
49  {
50  class_data* operator ()()
51  {
52  static class_data12 s_cd =
53  {
54  12 +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  { { Ifc12::static_type }, ((sal_IntPtr)(Ifc12 *) (Impl *) 16) - 16 },
69  { { com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 }
70  }
71  };
72  return reinterpret_cast< class_data * >(&s_cd);
73  }
74  };
75 
77 
86  template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 >
87  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelper12
88  : public com::sun::star::lang::XTypeProvider
89  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
90  {
91  struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, ImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {};
92  public:
93  virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
94  { return ImplHelper_query( rType, cd::get(), this ); }
95  virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
96  { return ImplHelper_getTypes( cd::get() ); }
97  virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
98  { return ImplHelper_getImplementationId( cd::get() ); }
99 
100 #if !defined _MSC_VER // public -> protected changes mangled names there
101  protected:
102 #endif
103  ~ImplHelper12() throw () {}
104  };
113  template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 >
114  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper12
115  : public OWeakObject
116  , public com::sun::star::lang::XTypeProvider
117  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
118  {
119  struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, WeakImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {};
120  public:
121  virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
122  { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
123  virtual void SAL_CALL acquire() throw ()
124  { OWeakObject::acquire(); }
125  virtual void SAL_CALL release() throw ()
126  { OWeakObject::release(); }
127  virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
128  { return WeakImplHelper_getTypes( cd::get() ); }
129  virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
130  { return ImplHelper_getImplementationId( cd::get() ); }
131  };
145  template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 >
146  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggImplHelper12
147  : public OWeakAggObject
148  , public com::sun::star::lang::XTypeProvider
149  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
150  {
151  struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, WeakAggImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {};
152  public:
153  virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
154  { return OWeakAggObject::queryInterface( rType ); }
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 WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
157  virtual void SAL_CALL acquire() throw ()
159  virtual void SAL_CALL release() throw ()
161  virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
162  { return WeakAggImplHelper_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  };
182  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, class Ifc12 >
183  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplInheritanceHelper12
184  : public BaseClass
185  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
186  {
187  struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, ImplInheritanceHelper12<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {};
188  protected:
189  template< typename T1 >
190  explicit ImplInheritanceHelper12(T1 const & arg1): BaseClass(arg1) {}
191  template< typename T1, typename T2 >
192  ImplInheritanceHelper12(T1 const & arg1, T2 const & arg2):
193  BaseClass(arg1, arg2) {}
194  template< typename T1, typename T2, typename T3 >
196  T1 const & arg1, T2 const & arg2, T3 const & arg3):
197  BaseClass(arg1, arg2, arg3) {}
198  template< typename T1, typename T2, typename T3, typename T4 >
200  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
201  BaseClass(arg1, arg2, arg3, arg4) {}
202  template<
203  typename T1, typename T2, typename T3, typename T4, typename T5 >
205  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
206  T5 const & arg5):
207  BaseClass(arg1, arg2, arg3, arg4, arg5) {}
208  template<
209  typename T1, typename T2, typename T3, typename T4, typename T5,
210  typename T6 >
212  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
213  T5 const & arg5, T6 const & arg6):
214  BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
215  public:
217  virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
218  {
219  com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
220  if (aRet.hasValue())
221  return aRet;
222  return BaseClass::queryInterface( rType );
223  }
224  virtual void SAL_CALL acquire() throw ()
225  { BaseClass::acquire(); }
226  virtual void SAL_CALL release() throw ()
227  { BaseClass::release(); }
228  virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
229  { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
230  virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
231  { return ImplHelper_getImplementationId( cd::get() ); }
232  };
250  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, class Ifc12 >
251  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE AggImplInheritanceHelper12
252  : public BaseClass
253  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
254  {
255  struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, AggImplInheritanceHelper12<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {};
256  protected:
257  template< typename T1 >
258  explicit AggImplInheritanceHelper12(T1 const & arg1): BaseClass(arg1) {}
259  template< typename T1, typename T2 >
260  AggImplInheritanceHelper12(T1 const & arg1, T2 const & arg2):
261  BaseClass(arg1, arg2) {}
262  template< typename T1, typename T2, typename T3 >
264  T1 const & arg1, T2 const & arg2, T3 const & arg3):
265  BaseClass(arg1, arg2, arg3) {}
266  template< typename T1, typename T2, typename T3, typename T4 >
268  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
269  BaseClass(arg1, arg2, arg3, arg4) {}
270  template<
271  typename T1, typename T2, typename T3, typename T4, typename T5 >
273  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
274  T5 const & arg5):
275  BaseClass(arg1, arg2, arg3, arg4, arg5) {}
276  template<
277  typename T1, typename T2, typename T3, typename T4, typename T5,
278  typename T6 >
280  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
281  T5 const & arg5, T6 const & arg6):
282  BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
283  public:
285  virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
286  { return BaseClass::queryInterface( rType ); }
287  virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
288  {
289  com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
290  if (aRet.hasValue())
291  return aRet;
292  return BaseClass::queryAggregation( rType );
293  }
294  virtual void SAL_CALL acquire() throw ()
295  { BaseClass::acquire(); }
296  virtual void SAL_CALL release() throw ()
297  { BaseClass::release(); }
298  virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
299  { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
300  virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
301  { return ImplHelper_getImplementationId( cd::get() ); }
302  };
303 }
304 
305 #endif
306 
307 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */