LibreOffice LibreOffice 4.1 SDK C/C++ API Reference

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19 #ifndef _CPPUHELPER_IMPLBASE_EX_HXX_
20 #define _CPPUHELPER_IMPLBASE_EX_HXX_
21
22 #include <cppuhelper/weak.hxx>
23 #include <cppuhelper/weakagg.hxx>
24 #include <com/sun/star/lang/XTypeProvider.hpp>
25
26 // Despite the fact that the following include is not used in this header, it has to remain,
27 // because it is expected by files including cppuhelper/implbaseN.hxx.
28 // So maybe we can omit it some time in the future...
29 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
30
31 /* If you need to define implementation helper classes that deal with more than
32 12 interfaces, then use macros as follows, e.g. for 3 interfaces:
33
34 #include <cppuhelper/implbase_ex_pre.hxx>
35 #define __IFC_EX_TYPE_INIT3( class_cast ) \
36 __IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 ), \
37 __IFC_EX_TYPE_INIT( class_cast, 3 )
38 #include <cppuhelper/implbase_ex_post.hxx>
39 __DEF_IMPLHELPER_EX( 3 )
40 */
41
43
44 namespace cppu
45 {
46
49 typedef ::com::sun::star::uno::Type const & (SAL_CALL * fptr_getCppuType)( void * ) SAL_THROW(());
50
53 struct type_entry
54 {
59 union
60 {
61 fptr_getCppuType getCppuType;
62 typelib_TypeDescriptionReference * typeRef;
63 } m_type;
66 sal_IntPtr m_offset;
67 };
68
71 struct class_data
72 {
75 sal_Int16 m_nTypes;
76
79 sal_Bool m_storedTypeRefs;
80
83 sal_Bool m_createdId;
84
87 sal_Int8 m_id[ 16 ];
88
91 type_entry m_typeEntries[ 1 ];
92 };
93
96 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL ImplHelper_query(
97 ::com::sun::star::uno::Type const & rType,
98 class_data * cd,
99 void * that )
100 SAL_THROW( (::com::sun::star::uno::RuntimeException) );
103 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL ImplHelper_queryNoXInterface(
104 ::com::sun::star::uno::Type const & rType,
105 class_data * cd,
106 void * that )
107 SAL_THROW( (::com::sun::star::uno::RuntimeException) );
110 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
111 SAL_CALL ImplHelper_getTypes(
112 class_data * cd )
113 SAL_THROW( (::com::sun::star::uno::RuntimeException) );
116 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
117 SAL_CALL ImplInhHelper_getTypes(
118 class_data * cd,
119 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > const & rAddTypes )
120 SAL_THROW( (::com::sun::star::uno::RuntimeException) );
123 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< sal_Int8 >
124 SAL_CALL ImplHelper_getImplementationId(
125 class_data * cd )
126 SAL_THROW( (::com::sun::star::uno::RuntimeException) );
127
130 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL WeakImplHelper_query(
131 ::com::sun::star::uno::Type const & rType,
132 class_data * cd,
133 void * that,
134 ::cppu::OWeakObject * pBase )
135 SAL_THROW( (::com::sun::star::uno::RuntimeException) );
138 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
139 SAL_CALL WeakImplHelper_getTypes(
140 class_data * cd )
141 SAL_THROW( (::com::sun::star::uno::RuntimeException) );
142
145 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Any
146 SAL_CALL WeakAggImplHelper_queryAgg(
147 ::com::sun::star::uno::Type const & rType,
148 class_data * cd,
149 void * that,
150 ::cppu::OWeakAggObject * pBase )
151 SAL_THROW( (::com::sun::star::uno::RuntimeException) );
154 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
155 SAL_CALL WeakAggImplHelper_getTypes(
156 class_data * cd )
157 SAL_THROW( (::com::sun::star::uno::RuntimeException) );
158
159 }
160
162
163 #endif
164
165 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
weakagg.hxx
_typelib_TypeDescriptionReference
Holds a weak reference to a type description.
Definition: typedescription.h:40
com::sun::star::uno::Type
C++ class representing an IDL meta type.
Definition: Type.h:55
cppu::OWeakAggObject
Base class to implement an UNO object supporting weak references, i.e.
Definition: weakagg.hxx:40
SAL_THROW
#define SAL_THROW(exc)
Definition of function throw clause macros.
Definition: types.h:356
weak.hxx
sal_Bool
unsigned char sal_Bool
Definition: types.h:37
cppu::OWeakObject
Base class to implement an UNO object supporting weak references, i.e.
Definition: weak.hxx:43
sal_Int8
signed char sal_Int8
Definition: types.h:42
com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
getCppuType
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:369