LibreOffice Module cppuhelper (master) 1
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
20/*
21 * This file is part of LibreOffice published API.
22 */
23#ifndef INCLUDED_CPPUHELPER_IMPLBASE_EX_HXX
24#define INCLUDED_CPPUHELPER_IMPLBASE_EX_HXX
25
26#include "com/sun/star/uno/Any.h"
27#include "com/sun/star/uno/Sequence.h"
28#include "com/sun/star/uno/Type.h"
29#include "com/sun/star/uno/genfunc.h"
31#include "sal/types.h"
32
33namespace cppu { class OWeakAggObject; }
34namespace cppu { class OWeakObject; }
35
36
37/* If you need to define implementation helper classes that deal with more than
38 12 interfaces, then use macros as follows, e.g. for 3 interfaces:
39
40#include <cppuhelper/implbase_ex_pre.hxx>
41#define __IFC_EX_TYPE_INIT3( class_cast ) \
42 __IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 ), \
43 __IFC_EX_TYPE_INIT( class_cast, 3 )
44#include <cppuhelper/implbase_ex_post.hxx>
45__DEF_IMPLHELPER_EX( 3 )
46*/
47
49
50namespace cppu
51{
52
55typedef css::uno::Type const & (SAL_CALL * fptr_getCppuType)( void * );
56
59struct SAL_WARN_UNUSED type_entry
60{
65 union
66 {
67 fptr_getCppuType getCppuType;
68 typelib_TypeDescriptionReference * typeRef;
69 } m_type;
72 sal_IntPtr m_offset;
73};
74
76#define CPPUHELPER_DETAIL_TYPEENTRY(Ifc) \
77 { { Ifc::static_type }, \
78 reinterpret_cast<sal_IntPtr>( static_cast<Ifc *>( reinterpret_cast<Impl *>(16) )) - 16 }
79
82struct SAL_WARN_UNUSED class_data
83{
86 sal_Int16 m_nTypes;
87
90 sal_Bool m_storedTypeRefs;
91
94 sal_Bool m_createdId;
95
98 sal_Int8 m_id[ 16 ];
99
102 type_entry m_typeEntries[ 1 ];
103};
104
107CPPUHELPER_DLLPUBLIC css::uno::Any SAL_CALL ImplHelper_query(
108 css::uno::Type const & rType,
109 class_data * cd,
110 void * that );
114 css::uno::Type const & rType,
115 class_data * cd,
116 void * that );
119CPPUHELPER_DLLPUBLIC css::uno::Sequence< css::uno::Type >
120SAL_CALL ImplHelper_getTypes(
121 class_data * cd );
124CPPUHELPER_DLLPUBLIC css::uno::Sequence< css::uno::Type >
126 class_data * cd,
127 css::uno::Sequence< css::uno::Type > const & rAddTypes );
130CPPUHELPER_DLLPUBLIC css::uno::Sequence< sal_Int8 >
132 class_data * cd );
133
136CPPUHELPER_DLLPUBLIC css::uno::Any SAL_CALL WeakImplHelper_query(
137 css::uno::Type const & rType,
138 class_data * cd,
139 void * that,
140 ::cppu::OWeakObject * pBase );
143CPPUHELPER_DLLPUBLIC css::uno::Sequence< css::uno::Type >
145 class_data * cd );
146
149CPPUHELPER_DLLPUBLIC css::uno::Any
151 css::uno::Type const & rType,
152 class_data * cd,
153 void * that,
154 ::cppu::OWeakAggObject * pBase );
157CPPUHELPER_DLLPUBLIC css::uno::Sequence< css::uno::Type >
159 class_data * cd );
160
161}
162
164
165#endif
166
167/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class to implement a UNO object supporting weak references, i.e.
Definition: weakagg.hxx:48
Base class to implement a UNO object supporting weak references, i.e.
Definition: weak.hxx:48
#define CPPUHELPER_DLLPUBLIC
const Type m_type
Sequence< Type > SAL_CALL ImplInhHelper_getTypes(class_data *cd, Sequence< Type > const &rAddTypes)
Sequence< Type > SAL_CALL ImplHelper_getTypes(class_data *cd)
Any SAL_CALL WeakImplHelper_query(Type const &rType, class_data *cd, void *that, OWeakObject *pBase)
css::uno::Sequence< sal_Int8 > ImplHelper_getImplementationId(SAL_UNUSED_PARAMETER class_data *)
Any SAL_CALL WeakAggImplHelper_queryAgg(Type const &rType, class_data *cd, void *that, OWeakAggObject *pBase)
Sequence< Type > SAL_CALL WeakImplHelper_getTypes(class_data *cd)
Sequence< Type > SAL_CALL WeakAggImplHelper_getTypes(class_data *cd)
Any SAL_CALL ImplHelper_query(Type const &rType, class_data *cd, void *that)
Any SAL_CALL ImplHelper_queryNoXInterface(Type const &rType, class_data *cd, void *that)
::rtl::ByteSequence m_id
unsigned char sal_Bool
signed char sal_Int8
#define SAL_WARN_UNUSED