AlterOffice
AlterOffice 3.4 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
implbase6.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 
3 #ifndef INCLUDED_CPPUHELPER_IMPLBASE6_HXX
4 #define INCLUDED_CPPUHELPER_IMPLBASE6_HXX
5 
7 #include "rtl/instance.hxx"
8 #include "cppuhelper/weak.hxx"
9 #include "cppuhelper/weakagg.hxx"
10 #include "com/sun/star/lang/XTypeProvider.hpp"
11 
12 namespace cppu
13 {
15 
16  struct class_data6
17  {
18  sal_Int16 m_nTypes;
19  sal_Bool m_storedTypeRefs;
20  sal_Bool m_storedId;
21  sal_Int8 m_id[ 16 ];
22  type_entry m_typeEntries[ 6 + 1 ];
23  };
24 
25  template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Impl >
26  struct SAL_WARN_UNUSED ImplClassData6
27  {
28  class_data* operator ()()
29  {
30  static class_data6 s_cd =
31  {
32  6 +1, false, false,
33  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
34  {
35  CPPUHELPER_DETAIL_TYPEENTRY(Ifc1),
36  CPPUHELPER_DETAIL_TYPEENTRY(Ifc2),
37  CPPUHELPER_DETAIL_TYPEENTRY(Ifc3),
38  CPPUHELPER_DETAIL_TYPEENTRY(Ifc4),
39  CPPUHELPER_DETAIL_TYPEENTRY(Ifc5),
40  CPPUHELPER_DETAIL_TYPEENTRY(Ifc6),
41  CPPUHELPER_DETAIL_TYPEENTRY(css::lang::XTypeProvider)
42  }
43  };
44  return reinterpret_cast< class_data * >(&s_cd);
45  }
46  };
47 
49 
58  template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
59  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelper6
60  : public css::lang::XTypeProvider
61  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6
62  {
63  struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, ImplHelper6<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {};
64  public:
65 #if defined LIBO_INTERNAL_ONLY
66  ImplHelper6() = default;
67  ImplHelper6(ImplHelper6 const &) = default;
68  ImplHelper6(ImplHelper6 &&) = default;
69  ImplHelper6 & operator =(ImplHelper6 const &) = default;
70  ImplHelper6 & operator =(ImplHelper6 &&) = default;
71 #endif
72 
73  virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
74  { return ImplHelper_query( rType, cd::get(), this ); }
75  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
76  { return ImplHelper_getTypes( cd::get() ); }
77  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
78  { return ImplHelper_getImplementationId( cd::get() ); }
79 
80 #if !defined _MSC_VER // public -> protected changes mangled names there
81  protected:
82 #endif
84  };
93  template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
94  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper6
95  : public OWeakObject
96  , public css::lang::XTypeProvider
97  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6
98  {
99  struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, WeakImplHelper6<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {};
100  public:
101  virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
102  { return WeakImplHelper_query( rType, cd::get(), this, static_cast<OWeakObject *>(this) ); }
103  virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
104  { OWeakObject::acquire(); }
105  virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
106  { OWeakObject::release(); }
107  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
108  { return WeakImplHelper_getTypes( cd::get() ); }
109  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
110  { return ImplHelper_getImplementationId( cd::get() ); }
111  };
125  template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
126  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggImplHelper6
127  : public OWeakAggObject
128  , public css::lang::XTypeProvider
129  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6
130  {
131  struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, WeakAggImplHelper6<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {};
132  public:
133  virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
134  { return OWeakAggObject::queryInterface( rType ); }
135  virtual css::uno::Any SAL_CALL queryAggregation( css::uno::Type const & rType ) SAL_OVERRIDE
136  { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, static_cast<OWeakAggObject *>(this) ); }
137  virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
139  virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
141  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
142  { return WeakAggImplHelper_getTypes( cd::get() ); }
143  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
144  { return ImplHelper_getImplementationId( cd::get() ); }
145  };
162  template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
163  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplInheritanceHelper6
164  : public BaseClass
165  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6
166  {
167  struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, ImplInheritanceHelper6<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {};
168  protected:
169  template< typename T1 >
170  explicit ImplInheritanceHelper6(T1 const & arg1): BaseClass(arg1) {}
171  template< typename T1, typename T2 >
172  ImplInheritanceHelper6(T1 const & arg1, T2 const & arg2):
173  BaseClass(arg1, arg2) {}
174  template< typename T1, typename T2, typename T3 >
176  T1 const & arg1, T2 const & arg2, T3 const & arg3):
177  BaseClass(arg1, arg2, arg3) {}
178  template< typename T1, typename T2, typename T3, typename T4 >
180  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
181  BaseClass(arg1, arg2, arg3, arg4) {}
182  template<
183  typename T1, typename T2, typename T3, typename T4, typename T5 >
185  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
186  T5 const & arg5):
187  BaseClass(arg1, arg2, arg3, arg4, arg5) {}
188  template<
189  typename T1, typename T2, typename T3, typename T4, typename T5,
190  typename T6 >
192  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
193  T5 const & arg5, T6 const & arg6):
194  BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
195  public:
197  virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
198  {
199  css::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
200  if (aRet.hasValue())
201  return aRet;
202  return BaseClass::queryInterface( rType );
203  }
204  virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
205  { BaseClass::acquire(); }
206  virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
207  { BaseClass::release(); }
208  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
209  { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
210  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
211  { return ImplHelper_getImplementationId( cd::get() ); }
212  };
230  template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
231  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE AggImplInheritanceHelper6
232  : public BaseClass
233  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6
234  {
235  struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, AggImplInheritanceHelper6<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {};
236  protected:
237  template< typename T1 >
238  explicit AggImplInheritanceHelper6(T1 const & arg1): BaseClass(arg1) {}
239  template< typename T1, typename T2 >
240  AggImplInheritanceHelper6(T1 const & arg1, T2 const & arg2):
241  BaseClass(arg1, arg2) {}
242  template< typename T1, typename T2, typename T3 >
244  T1 const & arg1, T2 const & arg2, T3 const & arg3):
245  BaseClass(arg1, arg2, arg3) {}
246  template< typename T1, typename T2, typename T3, typename T4 >
248  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
249  BaseClass(arg1, arg2, arg3, arg4) {}
250  template<
251  typename T1, typename T2, typename T3, typename T4, typename T5 >
253  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
254  T5 const & arg5):
255  BaseClass(arg1, arg2, arg3, arg4, arg5) {}
256  template<
257  typename T1, typename T2, typename T3, typename T4, typename T5,
258  typename T6 >
260  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
261  T5 const & arg5, T6 const & arg6):
262  BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
263  public:
265  virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
266  { return BaseClass::queryInterface( rType ); }
267  virtual css::uno::Any SAL_CALL queryAggregation( css::uno::Type const & rType ) SAL_OVERRIDE
268  {
269  css::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
270  if (aRet.hasValue())
271  return aRet;
272  return BaseClass::queryAggregation( rType );
273  }
274  virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
275  { BaseClass::acquire(); }
276  virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
277  { BaseClass::release(); }
278  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
279  { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
280  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
281  { return ImplHelper_getImplementationId( cd::get() ); }
282  };
283 }
284 
285 #endif
286 
287 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ImplInheritanceHelper6(T1 const &arg1, T2 const &arg2, T3 const &arg3)
Definition: implbase6.hxx:175
virtual css::uno::Any queryAggregation(css::uno::Type const &rType) SAL_OVERRIDE
Called by the delegator or queryInterface.
Definition: implbase6.hxx:135
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
If a delegator is set, then the delegators gets released.
Definition: implbase6.hxx:139
unsigned char sal_Bool
Definition: types.h:18
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: implbase6.hxx:210
Implementation helper implementing interface css::lang::XTypeProvider and method XInterface::queryInt...
Definition: implbase6.hxx:59
virtual css::uno::Any queryAggregation(css::uno::Type const &rType) SAL_OVERRIDE
Definition: implbase6.hxx:267
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
If a delegator is set, then the delegators gets released.
ImplInheritanceHelper6(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4, T5 const &arg5)
Definition: implbase6.hxx:184
Base class to implement a UNO object supporting weak references, i.e.
Definition: weakagg.hxx:25
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: implbase6.hxx:143
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
Definition: implbase6.hxx:265
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: implbase6.hxx:280
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
decreasing m_refCount
Definition: implbase6.hxx:105
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition: implbase6.hxx:75
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
Definition: implbase6.hxx:204
Implementation helper implementing interfaces css::lang::XTypeProvider and css::uno::XInterface which...
Definition: implbase6.hxx:126
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:567
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
decreasing m_refCount
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
increasing m_refCount
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition: implbase6.hxx:208
Helper class for a late-initialized static aggregate, e.g.
Definition: instance.hxx:528
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
Basic queryInterface() implementation supporting com::sun::star::uno::XWeak and com::sun::star::uno::...
Definition: implbase6.hxx:101
AggImplInheritanceHelper6()
Definition: implbase6.hxx:264
css::uno::Any queryInterface(const css::uno::Type &rType, Interface1 *p1)
Compares demanded type to given template argument types.
Definition: queryinterface.hxx:23
ImplInheritanceHelper6()
Definition: implbase6.hxx:196
ImplInheritanceHelper6(T1 const &arg1)
Definition: implbase6.hxx:170
AggImplInheritanceHelper6(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4, T5 const &arg5)
Definition: implbase6.hxx:252
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
If a delegator is set, then the delegators gets acquired.
Definition: implbase6.hxx:137
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
Definition: implbase6.hxx:276
#define SAL_NOEXCEPT
Macro for C++11 &quot;noexcept&quot; vs.
Definition: types.h:396
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition: implbase6.hxx:107
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
Definition: implbase6.hxx:274
AggImplInheritanceHelper6(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4, T5 const &arg5, T6 const &arg6)
Definition: implbase6.hxx:259
#define SAL_NO_VTABLE
Use this for pure virtual classes, e.g.
Definition: types.h:274
AggImplInheritanceHelper6(T1 const &arg1, T2 const &arg2, T3 const &arg3)
Definition: implbase6.hxx:243
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
If a delegator is set, then the delegators gets acquired.
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
Definition: implbase6.hxx:206
virtual css::uno::Any queryInterface(const css::uno::Type &rType) SAL_OVERRIDE
If a delegator is set, then the delegator is queried for the demanded interface.
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
increasing m_refCount
Definition: implbase6.hxx:103
AggImplInheritanceHelper6(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4)
Definition: implbase6.hxx:247
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
If a delegator is set, then the delegator is queried for the demanded interface.
Definition: implbase6.hxx:133
Implementation helper implementing interfaces css::lang::XTypeProvider and css::uno::XInterface inher...
Definition: implbase6.hxx:231
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition: implbase6.hxx:278
AggImplInheritanceHelper6(T1 const &arg1)
Definition: implbase6.hxx:238
signed char sal_Int8
Definition: types.h:23
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition: implbase6.hxx:141
ImplInheritanceHelper6(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4, T5 const &arg5, T6 const &arg6)
Definition: implbase6.hxx:191
#define SAL_OVERRIDE
C++11 &quot;override&quot; feature.
Definition: types.h:371
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: implbase6.hxx:77
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: implbase6.hxx:109
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
Definition: implbase6.hxx:197
ImplInheritanceHelper6(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4)
Definition: implbase6.hxx:179
Implementation helper implementing interfaces css::lang::XTypeProvider and css::uno::XInterface which...
Definition: implbase6.hxx:94
Base class to implement a UNO object supporting weak references, i.e.
Definition: weak.hxx:27
Implementation helper implementing interfaces css::lang::XTypeProvider and css::uno::XInterface inher...
Definition: implbase6.hxx:163
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
Definition: implbase6.hxx:73
~ImplHelper6() SAL_NOEXCEPT
Definition: implbase6.hxx:83
ImplInheritanceHelper6(T1 const &arg1, T2 const &arg2)
Definition: implbase6.hxx:172
AggImplInheritanceHelper6(T1 const &arg1, T2 const &arg2)
Definition: implbase6.hxx:240