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