AlterOffice
AlterOffice 3.4 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
implbase13.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_IMPLBASE13_HXX
4 #define INCLUDED_CPPUHELPER_IMPLBASE13_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_data13
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[ 13 + 1 ];
23  };
24 
25  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 Ifc13, typename Impl >
26  struct SAL_WARN_UNUSED ImplClassData13
27  {
28  class_data* operator ()()
29  {
30  static class_data13 s_cd =
31  {
32  13 +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(Ifc7),
42  CPPUHELPER_DETAIL_TYPEENTRY(Ifc8),
43  CPPUHELPER_DETAIL_TYPEENTRY(Ifc9),
44  CPPUHELPER_DETAIL_TYPEENTRY(Ifc10),
45  CPPUHELPER_DETAIL_TYPEENTRY(Ifc11),
46  CPPUHELPER_DETAIL_TYPEENTRY(Ifc12),
47  CPPUHELPER_DETAIL_TYPEENTRY(Ifc13),
48  CPPUHELPER_DETAIL_TYPEENTRY(css::lang::XTypeProvider)
49  }
50  };
51  return reinterpret_cast< class_data * >(&s_cd);
52  }
53  };
54 
56 
65  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, class Ifc13 >
66  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelper13
67  : public css::lang::XTypeProvider
68  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12, public Ifc13
69  {
70  struct cd : public rtl::StaticAggregate< class_data, ImplClassData13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13, ImplHelper13<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13> > > {};
71  public:
72 #if defined LIBO_INTERNAL_ONLY
73  ImplHelper13() = default;
74  ImplHelper13(ImplHelper13 const &) = default;
75  ImplHelper13(ImplHelper13 &&) = default;
76  ImplHelper13 & operator =(ImplHelper13 const &) = default;
77  ImplHelper13 & operator =(ImplHelper13 &&) = default;
78 #endif
79 
80  virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
81  { return ImplHelper_query( rType, cd::get(), this ); }
82  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
83  { return ImplHelper_getTypes( cd::get() ); }
84  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
85  { return ImplHelper_getImplementationId( cd::get() ); }
86 
87 #if !defined _MSC_VER // public -> protected changes mangled names there
88  protected:
89 #endif
91  };
100  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, class Ifc13 >
101  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper13
102  : public OWeakObject
103  , public css::lang::XTypeProvider
104  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12, public Ifc13
105  {
106  struct cd : public rtl::StaticAggregate< class_data, ImplClassData13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13, WeakImplHelper13<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13> > > {};
107  public:
108  virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
109  { return WeakImplHelper_query( rType, cd::get(), this, static_cast<OWeakObject *>(this) ); }
110  virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
111  { OWeakObject::acquire(); }
112  virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
113  { OWeakObject::release(); }
114  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
115  { return WeakImplHelper_getTypes( cd::get() ); }
116  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
117  { return ImplHelper_getImplementationId( cd::get() ); }
118  };
132  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, class Ifc13 >
133  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggImplHelper13
134  : public OWeakAggObject
135  , public css::lang::XTypeProvider
136  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12, public Ifc13
137  {
138  struct cd : public rtl::StaticAggregate< class_data, ImplClassData13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13, WeakAggImplHelper13<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13> > > {};
139  public:
140  virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
141  { return OWeakAggObject::queryInterface( rType ); }
142  virtual css::uno::Any SAL_CALL queryAggregation( css::uno::Type const & rType ) SAL_OVERRIDE
143  { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, static_cast<OWeakAggObject *>(this) ); }
144  virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
146  virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
148  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
149  { return WeakAggImplHelper_getTypes( cd::get() ); }
150  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
151  { return ImplHelper_getImplementationId( cd::get() ); }
152  };
169  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, class Ifc13 >
170  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplInheritanceHelper13
171  : public BaseClass
172  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12, public Ifc13
173  {
174  struct cd : public rtl::StaticAggregate< class_data, ImplClassData13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13, ImplInheritanceHelper13<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13> > > {};
175  protected:
176  template< typename T1 >
177  explicit ImplInheritanceHelper13(T1 const & arg1): BaseClass(arg1) {}
178  template< typename T1, typename T2 >
179  ImplInheritanceHelper13(T1 const & arg1, T2 const & arg2):
180  BaseClass(arg1, arg2) {}
181  template< typename T1, typename T2, typename T3 >
183  T1 const & arg1, T2 const & arg2, T3 const & arg3):
184  BaseClass(arg1, arg2, arg3) {}
185  template< typename T1, typename T2, typename T3, typename T4 >
187  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
188  BaseClass(arg1, arg2, arg3, arg4) {}
189  template<
190  typename T1, typename T2, typename T3, typename T4, typename T5 >
192  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
193  T5 const & arg5):
194  BaseClass(arg1, arg2, arg3, arg4, arg5) {}
195  template<
196  typename T1, typename T2, typename T3, typename T4, typename T5,
197  typename T6 >
199  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
200  T5 const & arg5, T6 const & arg6):
201  BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
202  public:
204  virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
205  {
206  css::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
207  if (aRet.hasValue())
208  return aRet;
209  return BaseClass::queryInterface( rType );
210  }
211  virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
212  { BaseClass::acquire(); }
213  virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
214  { BaseClass::release(); }
215  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
216  { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
217  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
218  { return ImplHelper_getImplementationId( cd::get() ); }
219  };
237  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, class Ifc13 >
238  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE AggImplInheritanceHelper13
239  : public BaseClass
240  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12, public Ifc13
241  {
242  struct cd : public rtl::StaticAggregate< class_data, ImplClassData13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13, AggImplInheritanceHelper13<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13> > > {};
243  protected:
244  template< typename T1 >
245  explicit AggImplInheritanceHelper13(T1 const & arg1): BaseClass(arg1) {}
246  template< typename T1, typename T2 >
247  AggImplInheritanceHelper13(T1 const & arg1, T2 const & arg2):
248  BaseClass(arg1, arg2) {}
249  template< typename T1, typename T2, typename T3 >
251  T1 const & arg1, T2 const & arg2, T3 const & arg3):
252  BaseClass(arg1, arg2, arg3) {}
253  template< typename T1, typename T2, typename T3, typename T4 >
255  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
256  BaseClass(arg1, arg2, arg3, arg4) {}
257  template<
258  typename T1, typename T2, typename T3, typename T4, typename T5 >
260  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
261  T5 const & arg5):
262  BaseClass(arg1, arg2, arg3, arg4, arg5) {}
263  template<
264  typename T1, typename T2, typename T3, typename T4, typename T5,
265  typename T6 >
267  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
268  T5 const & arg5, T6 const & arg6):
269  BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
270  public:
272  virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
273  { return BaseClass::queryInterface( rType ); }
274  virtual css::uno::Any SAL_CALL queryAggregation( css::uno::Type const & rType ) SAL_OVERRIDE
275  {
276  css::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
277  if (aRet.hasValue())
278  return aRet;
279  return BaseClass::queryAggregation( rType );
280  }
281  virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
282  { BaseClass::acquire(); }
283  virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
284  { BaseClass::release(); }
285  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
286  { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
287  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
288  { return ImplHelper_getImplementationId( cd::get() ); }
289  };
290 }
291 
292 #endif
293 
294 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: implbase13.hxx:287
ImplInheritanceHelper13(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4, T5 const &arg5)
Definition: implbase13.hxx:191
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
If a delegator is set, then the delegators gets released.
Definition: implbase13.hxx:146
ImplInheritanceHelper13(T1 const &arg1, T2 const &arg2, T3 const &arg3)
Definition: implbase13.hxx:182
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: implbase13.hxx:217
unsigned char sal_Bool
Definition: types.h:18
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
decreasing m_refCount
Definition: implbase13.hxx:112
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
increasing m_refCount
Definition: implbase13.hxx:110
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: implbase13.hxx:150
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
Definition: implbase13.hxx:204
AggImplInheritanceHelper13(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4, T5 const &arg5)
Definition: implbase13.hxx:259
ImplInheritanceHelper13(T1 const &arg1)
Definition: implbase13.hxx:177
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
If a delegator is set, then the delegators gets released.
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition: implbase13.hxx:215
ImplInheritanceHelper13(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4, T5 const &arg5, T6 const &arg6)
Definition: implbase13.hxx:198
Base class to implement a UNO object supporting weak references, i.e.
Definition: weakagg.hxx:25
Implementation helper implementing interfaces css::lang::XTypeProvider and css::uno::XInterface which...
Definition: implbase13.hxx:133
AggImplInheritanceHelper13(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4)
Definition: implbase13.hxx:254
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition: implbase13.hxx:114
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
If a delegator is set, then the delegators gets acquired.
Definition: implbase13.hxx:144
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: implbase13.hxx:84
#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
AggImplInheritanceHelper13(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4, T5 const &arg5, T6 const &arg6)
Definition: implbase13.hxx:266
Helper class for a late-initialized static aggregate, e.g.
Definition: instance.hxx:528
AggImplInheritanceHelper13(T1 const &arg1)
Definition: implbase13.hxx:245
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
Definition: implbase13.hxx:281
Implementation helper implementing interfaces css::lang::XTypeProvider and css::uno::XInterface which...
Definition: implbase13.hxx:101
css::uno::Any queryInterface(const css::uno::Type &rType, Interface1 *p1)
Compares demanded type to given template argument types.
Definition: queryinterface.hxx:23
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
Definition: implbase13.hxx:211
#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: implbase13.hxx:82
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
Definition: implbase13.hxx:213
virtual css::uno::Any queryAggregation(css::uno::Type const &rType) SAL_OVERRIDE
Called by the delegator or queryInterface.
Definition: implbase13.hxx:142
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition: implbase13.hxx:285
#define SAL_NO_VTABLE
Use this for pure virtual classes, e.g.
Definition: types.h:274
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
If a delegator is set, then the delegators gets acquired.
ImplInheritanceHelper13(T1 const &arg1, T2 const &arg2)
Definition: implbase13.hxx:179
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.
Implementation helper implementing interfaces css::lang::XTypeProvider and css::uno::XInterface inher...
Definition: implbase13.hxx:238
Implementation helper implementing interface css::lang::XTypeProvider and method XInterface::queryInt...
Definition: implbase13.hxx:66
Implementation helper implementing interfaces css::lang::XTypeProvider and css::uno::XInterface inher...
Definition: implbase13.hxx:170
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
Definition: implbase13.hxx:283
~ImplHelper13() SAL_NOEXCEPT
Definition: implbase13.hxx:90
AggImplInheritanceHelper13(T1 const &arg1, T2 const &arg2, T3 const &arg3)
Definition: implbase13.hxx:250
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: implbase13.hxx:116
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
Definition: implbase13.hxx:272
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
Definition: implbase13.hxx:80
signed char sal_Int8
Definition: types.h:23
#define SAL_OVERRIDE
C++11 &quot;override&quot; feature.
Definition: types.h:371
AggImplInheritanceHelper13(T1 const &arg1, T2 const &arg2)
Definition: implbase13.hxx:247
ImplInheritanceHelper13(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4)
Definition: implbase13.hxx:186
AggImplInheritanceHelper13()
Definition: implbase13.hxx:271
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: implbase13.hxx:108
Base class to implement a UNO object supporting weak references, i.e.
Definition: weak.hxx:27
ImplInheritanceHelper13()
Definition: implbase13.hxx:203
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: implbase13.hxx:140
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition: implbase13.hxx:148
virtual css::uno::Any queryAggregation(css::uno::Type const &rType) SAL_OVERRIDE
Definition: implbase13.hxx:274