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