My Project
UDK 3.2.7 C/C++ API Reference
 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  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * Copyright 2000, 2010 Oracle and/or its affiliates.
7  *
8  * OpenOffice.org - a multi-platform office productivity suite
9  *
10  * This file is part of OpenOffice.org.
11  *
12  * OpenOffice.org is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License version 3
14  * only, as published by the Free Software Foundation.
15  *
16  * OpenOffice.org is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Lesser General Public License version 3 for more details
20  * (a copy is included in the LICENSE file that accompanied this code).
21  *
22  * You should have received a copy of the GNU Lesser General Public License
23  * version 3 along with OpenOffice.org. If not, see
24  * <http://www.openoffice.org/license.html>
25  * for a copy of the LGPLv3 License.
26  *
27  ************************************************************************/
28 #ifndef _CPPUHELPER_IMPLBASE_EX_HXX_
29 #define _CPPUHELPER_IMPLBASE_EX_HXX_
30 
31 #include <cppuhelper/weak.hxx>
32 #include <cppuhelper/weakagg.hxx>
33 #include <com/sun/star/lang/XTypeProvider.hpp>
34 
35 // Despite the fact that the following include is not used in this header, it has to remain,
36 // because it is expected by files including cppuhelper/implbaseN.hxx.
37 // So maybe we can omit it some time in the future...
38 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
39 
40 /* If you need to define implementation helper classes that deal with more than
41  12 interfaces, then use macros as follows, e.g. for 3 interfaces:
42 
43 #include <cppuhelper/implbase_ex_pre.hxx>
44 #define __IFC_EX_TYPE_INIT3( class_cast ) \
45  __IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 ), \
46  __IFC_EX_TYPE_INIT( class_cast, 3 )
47 #include <cppuhelper/implbase_ex_post.hxx>
48 __DEF_IMPLHELPER_EX( 3 )
49 */
50 
52 
53 namespace cppu
54 {
55 
58 typedef ::com::sun::star::uno::Type const & (SAL_CALL * fptr_getCppuType)( void * ) SAL_THROW(());
59 
62 struct type_entry
63 {
68  union
69  {
70  fptr_getCppuType getCppuType;
72  } m_type;
75  sal_IntPtr m_offset;
76 };
77 
80 struct class_data
81 {
84  sal_Int16 m_nTypes;
85 
88  sal_Bool m_storedTypeRefs;
89 
92  sal_Bool m_createdId;
93 
96  sal_Int8 m_id[ 16 ];
97 
100  type_entry m_typeEntries[ 1 ];
101 };
102 
105 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL ImplHelper_query(
106  ::com::sun::star::uno::Type const & rType,
107  class_data * cd,
108  void * that )
109  SAL_THROW( (::com::sun::star::uno::RuntimeException) );
112 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL ImplHelper_queryNoXInterface(
113  ::com::sun::star::uno::Type const & rType,
114  class_data * cd,
115  void * that )
116  SAL_THROW( (::com::sun::star::uno::RuntimeException) );
119 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
120 SAL_CALL ImplHelper_getTypes(
121  class_data * cd )
122  SAL_THROW( (::com::sun::star::uno::RuntimeException) );
125 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
126 SAL_CALL ImplInhHelper_getTypes(
127  class_data * cd,
129  SAL_THROW( (::com::sun::star::uno::RuntimeException) );
132 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< sal_Int8 >
133 SAL_CALL ImplHelper_getImplementationId(
134  class_data * cd )
135  SAL_THROW( (::com::sun::star::uno::RuntimeException) );
136 
139 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Any SAL_CALL WeakImplHelper_query(
140  ::com::sun::star::uno::Type const & rType,
141  class_data * cd,
142  void * that,
143  ::cppu::OWeakObject * pBase )
144  SAL_THROW( (::com::sun::star::uno::RuntimeException) );
147 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
148 SAL_CALL WeakImplHelper_getTypes(
149  class_data * cd )
150  SAL_THROW( (::com::sun::star::uno::RuntimeException) );
151 
154 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Any
155 SAL_CALL WeakAggImplHelper_queryAgg(
156  ::com::sun::star::uno::Type const & rType,
157  class_data * cd,
158  void * that,
159  ::cppu::OWeakAggObject * pBase )
160  SAL_THROW( (::com::sun::star::uno::RuntimeException) );
163 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
164 SAL_CALL WeakAggImplHelper_getTypes(
165  class_data * cd )
166  SAL_THROW( (::com::sun::star::uno::RuntimeException) );
167 
168 }
169 
171 
172 #endif
173 
174 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */