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