AlterOffice
AlterOffice 3.4 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
implbase_ex.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_IMPLBASE_EX_HXX
4 #define INCLUDED_CPPUHELPER_IMPLBASE_EX_HXX
5 
6 #include "com/sun/star/uno/Any.h"
11 #include "sal/types.h"
12 
13 namespace cppu { class OWeakAggObject; }
14 namespace cppu { class OWeakObject; }
15 
16 
17 /* If you need to define implementation helper classes that deal with more than
18  12 interfaces, then use macros as follows, e.g. for 3 interfaces:
19 
20 #include <cppuhelper/implbase_ex_pre.hxx>
21 #define __IFC_EX_TYPE_INIT3( class_cast ) \
22  __IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 ), \
23  __IFC_EX_TYPE_INIT( class_cast, 3 )
24 #include <cppuhelper/implbase_ex_post.hxx>
25 __DEF_IMPLHELPER_EX( 3 )
26 */
27 
29 
30 namespace cppu
31 {
32 
35 typedef css::uno::Type const & (SAL_CALL * fptr_getCppuType)( void * );
36 
39 struct SAL_WARN_UNUSED type_entry
40 {
45  union
46  {
47  fptr_getCppuType getCppuType;
49  } m_type;
52  sal_IntPtr m_offset;
53 };
54 
56 #define CPPUHELPER_DETAIL_TYPEENTRY(Ifc) \
57  { { Ifc::static_type }, \
58  reinterpret_cast<sal_IntPtr>( static_cast<Ifc *>( reinterpret_cast<Impl *>(16) )) - 16 }
59 
62 struct SAL_WARN_UNUSED class_data
63 {
66  sal_Int16 m_nTypes;
67 
70  sal_Bool m_storedTypeRefs;
71 
74  sal_Bool m_createdId;
75 
78  sal_Int8 m_id[ 16 ];
79 
82  type_entry m_typeEntries[ 1 ];
83 };
84 
87 CPPUHELPER_DLLPUBLIC css::uno::Any SAL_CALL ImplHelper_query(
88  css::uno::Type const & rType,
89  class_data * cd,
90  void * that );
93 CPPUHELPER_DLLPUBLIC css::uno::Any SAL_CALL ImplHelper_queryNoXInterface(
94  css::uno::Type const & rType,
95  class_data * cd,
96  void * that );
99 CPPUHELPER_DLLPUBLIC css::uno::Sequence< css::uno::Type >
100 SAL_CALL ImplHelper_getTypes(
101  class_data * cd );
104 CPPUHELPER_DLLPUBLIC css::uno::Sequence< css::uno::Type >
105 SAL_CALL ImplInhHelper_getTypes(
106  class_data * cd,
107  css::uno::Sequence< css::uno::Type > const & rAddTypes );
110 CPPUHELPER_DLLPUBLIC css::uno::Sequence< sal_Int8 >
111 SAL_CALL ImplHelper_getImplementationId(
112  class_data * cd );
113 
116 CPPUHELPER_DLLPUBLIC css::uno::Any SAL_CALL WeakImplHelper_query(
117  css::uno::Type const & rType,
118  class_data * cd,
119  void * that,
120  ::cppu::OWeakObject * pBase );
123 CPPUHELPER_DLLPUBLIC css::uno::Sequence< css::uno::Type >
124 SAL_CALL WeakImplHelper_getTypes(
125  class_data * cd );
126 
129 CPPUHELPER_DLLPUBLIC css::uno::Any
130 SAL_CALL WeakAggImplHelper_queryAgg(
131  css::uno::Type const & rType,
132  class_data * cd,
133  void * that,
134  ::cppu::OWeakAggObject * pBase );
137 CPPUHELPER_DLLPUBLIC css::uno::Sequence< css::uno::Type >
138 SAL_CALL WeakAggImplHelper_getTypes(
139  class_data * cd );
140 
141 }
142 
144 
145 #endif
146 
147 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
unsigned char sal_Bool
Definition: types.h:18
struct SAL_DLLPUBLIC_RTTI _typelib_TypeDescriptionReference typelib_TypeDescriptionReference
Holds a weak reference to a type description.
const ::com::sun::star::uno::Type & getCppuType(SAL_UNUSED_PARAMETER const ::com::sun::star::uno::Any *)
Gets the meta type of IDL type any.
Definition: Any.h:470
Base class to implement a UNO object supporting weak references, i.e.
Definition: weakagg.hxx:25
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:567
#define CPPUHELPER_DLLPUBLIC
Definition: cppuhelperdllapi.h:12
signed char sal_Int8
Definition: types.h:23
Base class to implement a UNO object supporting weak references, i.e.
Definition: weak.hxx:27