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