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