AlterOffice
AlterOffice 3.4 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 #ifndef INCLUDED_CPPUHELPER_IMPLBASE9_HXX
4 #define INCLUDED_CPPUHELPER_IMPLBASE9_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_data9
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[ 9 + 1 ];
23  };
24 
25  template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Ifc7, typename Ifc8, typename Ifc9, typename Impl >
26  struct SAL_WARN_UNUSED ImplClassData9
27  {
28  class_data* operator ()()
29  {
30  static class_data9 s_cd =
31  {
32  9 +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(css::lang::XTypeProvider)
45  }
46  };
47  return reinterpret_cast< class_data * >(&s_cd);
48  }
49  };
50 
52 
61  template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
62  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelper9
63  : public css::lang::XTypeProvider
64  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9
65  {
66  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> > > {};
67  public:
68 #if defined LIBO_INTERNAL_ONLY
69  ImplHelper9() = default;
70  ImplHelper9(ImplHelper9 const &) = default;
71  ImplHelper9(ImplHelper9 &&) = default;
72  ImplHelper9 & operator =(ImplHelper9 const &) = default;
73  ImplHelper9 & operator =(ImplHelper9 &&) = default;
74 #endif
75 
76  virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
77  { return ImplHelper_query( rType, cd::get(), this ); }
78  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
79  { return ImplHelper_getTypes( cd::get() ); }
80  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
81  { return ImplHelper_getImplementationId( cd::get() ); }
82 
83 #if !defined _MSC_VER // public -> protected changes mangled names there
84  protected:
85 #endif
87  };
96  template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
97  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper9
98  : public OWeakObject
99  , public css::lang::XTypeProvider
100  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9
101  {
102  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> > > {};
103  public:
104  virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
105  { return WeakImplHelper_query( rType, cd::get(), this, static_cast<OWeakObject *>(this) ); }
106  virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
107  { OWeakObject::acquire(); }
108  virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
109  { OWeakObject::release(); }
110  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
111  { return WeakImplHelper_getTypes( cd::get() ); }
112  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
113  { return ImplHelper_getImplementationId( cd::get() ); }
114  };
128  template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
129  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggImplHelper9
130  : public OWeakAggObject
131  , public css::lang::XTypeProvider
132  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9
133  {
134  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> > > {};
135  public:
136  virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
137  { return OWeakAggObject::queryInterface( rType ); }
138  virtual css::uno::Any SAL_CALL queryAggregation( css::uno::Type const & rType ) SAL_OVERRIDE
139  { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, static_cast<OWeakAggObject *>(this) ); }
140  virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
142  virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
144  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
145  { return WeakAggImplHelper_getTypes( cd::get() ); }
146  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
147  { return ImplHelper_getImplementationId( cd::get() ); }
148  };
165  template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
166  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplInheritanceHelper9
167  : public BaseClass
168  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9
169  {
170  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> > > {};
171  protected:
172  template< typename T1 >
173  explicit ImplInheritanceHelper9(T1 const & arg1): BaseClass(arg1) {}
174  template< typename T1, typename T2 >
175  ImplInheritanceHelper9(T1 const & arg1, T2 const & arg2):
176  BaseClass(arg1, arg2) {}
177  template< typename T1, typename T2, typename T3 >
179  T1 const & arg1, T2 const & arg2, T3 const & arg3):
180  BaseClass(arg1, arg2, arg3) {}
181  template< typename T1, typename T2, typename T3, typename T4 >
183  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
184  BaseClass(arg1, arg2, arg3, arg4) {}
185  template<
186  typename T1, typename T2, typename T3, typename T4, typename T5 >
188  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
189  T5 const & arg5):
190  BaseClass(arg1, arg2, arg3, arg4, arg5) {}
191  template<
192  typename T1, typename T2, typename T3, typename T4, typename T5,
193  typename T6 >
195  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
196  T5 const & arg5, T6 const & arg6):
197  BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
198  public:
200  virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
201  {
202  css::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
203  if (aRet.hasValue())
204  return aRet;
205  return BaseClass::queryInterface( rType );
206  }
207  virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
208  { BaseClass::acquire(); }
209  virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
210  { BaseClass::release(); }
211  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
212  { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
213  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
214  { return ImplHelper_getImplementationId( cd::get() ); }
215  };
233  template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
234  class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE AggImplInheritanceHelper9
235  : public BaseClass
236  , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9
237  {
238  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> > > {};
239  protected:
240  template< typename T1 >
241  explicit AggImplInheritanceHelper9(T1 const & arg1): BaseClass(arg1) {}
242  template< typename T1, typename T2 >
243  AggImplInheritanceHelper9(T1 const & arg1, T2 const & arg2):
244  BaseClass(arg1, arg2) {}
245  template< typename T1, typename T2, typename T3 >
247  T1 const & arg1, T2 const & arg2, T3 const & arg3):
248  BaseClass(arg1, arg2, arg3) {}
249  template< typename T1, typename T2, typename T3, typename T4 >
251  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
252  BaseClass(arg1, arg2, arg3, arg4) {}
253  template<
254  typename T1, typename T2, typename T3, typename T4, typename T5 >
256  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
257  T5 const & arg5):
258  BaseClass(arg1, arg2, arg3, arg4, arg5) {}
259  template<
260  typename T1, typename T2, typename T3, typename T4, typename T5,
261  typename T6 >
263  T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
264  T5 const & arg5, T6 const & arg6):
265  BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
266  public:
268  virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
269  { return BaseClass::queryInterface( rType ); }
270  virtual css::uno::Any SAL_CALL queryAggregation( css::uno::Type const & rType ) SAL_OVERRIDE
271  {
272  css::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
273  if (aRet.hasValue())
274  return aRet;
275  return BaseClass::queryAggregation( rType );
276  }
277  virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
278  { BaseClass::acquire(); }
279  virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
280  { BaseClass::release(); }
281  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
282  { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
283  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
284  { return ImplHelper_getImplementationId( cd::get() ); }
285  };
286 }
287 
288 #endif
289 
290 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: implbase9.hxx:283
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
Definition: implbase9.hxx:209
unsigned char sal_Bool
Definition: types.h:18
AggImplInheritanceHelper9(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4, T5 const &arg5)
Definition: implbase9.hxx:255
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: implbase9.hxx:146
ImplInheritanceHelper9(T1 const &arg1, T2 const &arg2, T3 const &arg3)
Definition: implbase9.hxx:178
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: implbase9.hxx:112
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
If a delegator is set, then the delegators gets acquired.
Definition: implbase9.hxx:140
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
If a delegator is set, then the delegators gets released.
AggImplInheritanceHelper9(T1 const &arg1)
Definition: implbase9.hxx:241
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition: implbase9.hxx:110
Base class to implement a UNO object supporting weak references, i.e.
Definition: weakagg.hxx:25
ImplInheritanceHelper9(T1 const &arg1, T2 const &arg2)
Definition: implbase9.hxx:175
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: implbase9.hxx:136
AggImplInheritanceHelper9(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4, T5 const &arg5, T6 const &arg6)
Definition: implbase9.hxx:262
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
Definition: implbase9.hxx:207
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
Definition: implbase9.hxx:76
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
Definition: implbase9.hxx:268
Implementation helper implementing interface css::lang::XTypeProvider and method XInterface::queryInt...
Definition: implbase9.hxx:62
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
increasing m_refCount
Definition: implbase9.hxx:106
ImplInheritanceHelper9(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4, T5 const &arg5, T6 const &arg6)
Definition: implbase9.hxx:194
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition: implbase9.hxx:281
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:567
virtual css::uno::Any queryAggregation(css::uno::Type const &rType) SAL_OVERRIDE
Definition: implbase9.hxx:270
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: implbase9.hxx:144
AggImplInheritanceHelper9()
Definition: implbase9.hxx:267
Helper class for a late-initialized static aggregate, e.g.
Definition: instance.hxx:528
Implementation helper implementing interfaces css::lang::XTypeProvider and css::uno::XInterface which...
Definition: implbase9.hxx:129
css::uno::Any queryInterface(const css::uno::Type &rType, Interface1 *p1)
Compares demanded type to given template argument types.
Definition: queryinterface.hxx:23
#define SAL_NOEXCEPT
Macro for C++11 &quot;noexcept&quot; vs.
Definition: types.h:396
ImplInheritanceHelper9()
Definition: implbase9.hxx:199
AggImplInheritanceHelper9(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4)
Definition: implbase9.hxx:250
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
If a delegator is set, then the delegators gets released.
Definition: implbase9.hxx:142
#define SAL_NO_VTABLE
Use this for pure virtual classes, e.g.
Definition: types.h:274
Implementation helper implementing interfaces css::lang::XTypeProvider and css::uno::XInterface which...
Definition: implbase9.hxx:97
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
If a delegator is set, then the delegators gets acquired.
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.
ImplInheritanceHelper9(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4, T5 const &arg5)
Definition: implbase9.hxx:187
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
decreasing m_refCount
Definition: implbase9.hxx:108
ImplInheritanceHelper9(T1 const &arg1, T2 const &arg2, T3 const &arg3, T4 const &arg4)
Definition: implbase9.hxx:182
AggImplInheritanceHelper9(T1 const &arg1, T2 const &arg2, T3 const &arg3)
Definition: implbase9.hxx:246
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition: implbase9.hxx:78
~ImplHelper9() SAL_NOEXCEPT
Definition: implbase9.hxx:86
signed char sal_Int8
Definition: types.h:23
virtual css::uno::Any queryAggregation(css::uno::Type const &rType) SAL_OVERRIDE
Called by the delegator or queryInterface.
Definition: implbase9.hxx:138
#define SAL_OVERRIDE
C++11 &quot;override&quot; feature.
Definition: types.h:371
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: implbase9.hxx:213
ImplInheritanceHelper9(T1 const &arg1)
Definition: implbase9.hxx:173
Base class to implement a UNO object supporting weak references, i.e.
Definition: weak.hxx:27
AggImplInheritanceHelper9(T1 const &arg1, T2 const &arg2)
Definition: implbase9.hxx:243
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition: implbase9.hxx:211
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: implbase9.hxx:104
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
Definition: implbase9.hxx:279
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
Definition: implbase9.hxx:200
Implementation helper implementing interfaces css::lang::XTypeProvider and css::uno::XInterface inher...
Definition: implbase9.hxx:234
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
Definition: implbase9.hxx:277
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: implbase9.hxx:80
Implementation helper implementing interfaces css::lang::XTypeProvider and css::uno::XInterface inher...
Definition: implbase9.hxx:166