LibreOffice
LibreOffice 7.1 SDK C/C++ API Reference
typeprovider.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 INCLUDED_CPPUHELPER_TYPEPROVIDER_HXX
20#define INCLUDED_CPPUHELPER_TYPEPROVIDER_HXX
21
22#include "sal/config.h"
23
24#include <cstddef>
25
26#include "rtl/alloc.h"
29
30
31namespace cppu
32{
33
38{
39 css::uno::Sequence< css::uno::Type > _aTypes;
40
41public:
43 // these are here to force memory de/allocation to sal lib.
44 static void * SAL_CALL operator new( size_t nSize )
45 { return ::rtl_allocateMemory( nSize ); }
46 static void SAL_CALL operator delete( void * pMem )
47 { ::rtl_freeMemory( pMem ); }
48 static void * SAL_CALL operator new( size_t, void * pMem )
49 { return pMem; }
50 static void SAL_CALL operator delete( void *, void * )
51 {}
53
55 const css::uno::Type & rType1,
56 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
58 const css::uno::Type & rType1,
59 const css::uno::Type & rType2,
60 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
62 const css::uno::Type & rType1,
63 const css::uno::Type & rType2,
64 const css::uno::Type & rType3,
65 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
67 const css::uno::Type & rType1,
68 const css::uno::Type & rType2,
69 const css::uno::Type & rType3,
70 const css::uno::Type & rType4,
71 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
73 const css::uno::Type & rType1,
74 const css::uno::Type & rType2,
75 const css::uno::Type & rType3,
76 const css::uno::Type & rType4,
77 const css::uno::Type & rType5,
78 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
80 const css::uno::Type & rType1,
81 const css::uno::Type & rType2,
82 const css::uno::Type & rType3,
83 const css::uno::Type & rType4,
84 const css::uno::Type & rType5,
85 const css::uno::Type & rType6,
86 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
88 const css::uno::Type & rType1,
89 const css::uno::Type & rType2,
90 const css::uno::Type & rType3,
91 const css::uno::Type & rType4,
92 const css::uno::Type & rType5,
93 const css::uno::Type & rType6,
94 const css::uno::Type & rType7,
95 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
97 const css::uno::Type & rType1,
98 const css::uno::Type & rType2,
99 const css::uno::Type & rType3,
100 const css::uno::Type & rType4,
101 const css::uno::Type & rType5,
102 const css::uno::Type & rType6,
103 const css::uno::Type & rType7,
104 const css::uno::Type & rType8,
105 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
107 const css::uno::Type & rType1,
108 const css::uno::Type & rType2,
109 const css::uno::Type & rType3,
110 const css::uno::Type & rType4,
111 const css::uno::Type & rType5,
112 const css::uno::Type & rType6,
113 const css::uno::Type & rType7,
114 const css::uno::Type & rType8,
115 const css::uno::Type & rType9,
116 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
118 const css::uno::Type & rType1,
119 const css::uno::Type & rType2,
120 const css::uno::Type & rType3,
121 const css::uno::Type & rType4,
122 const css::uno::Type & rType5,
123 const css::uno::Type & rType6,
124 const css::uno::Type & rType7,
125 const css::uno::Type & rType8,
126 const css::uno::Type & rType9,
127 const css::uno::Type & rType10,
128 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
130 const css::uno::Type & rType1,
131 const css::uno::Type & rType2,
132 const css::uno::Type & rType3,
133 const css::uno::Type & rType4,
134 const css::uno::Type & rType5,
135 const css::uno::Type & rType6,
136 const css::uno::Type & rType7,
137 const css::uno::Type & rType8,
138 const css::uno::Type & rType9,
139 const css::uno::Type & rType10,
140 const css::uno::Type & rType11,
141 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
143 const css::uno::Type & rType1,
144 const css::uno::Type & rType2,
145 const css::uno::Type & rType3,
146 const css::uno::Type & rType4,
147 const css::uno::Type & rType5,
148 const css::uno::Type & rType6,
149 const css::uno::Type & rType7,
150 const css::uno::Type & rType8,
151 const css::uno::Type & rType9,
152 const css::uno::Type & rType10,
153 const css::uno::Type & rType11,
154 const css::uno::Type & rType12,
155 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
156
161 css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
162 { return _aTypes; }
163#if defined LIBO_INTERNAL_ONLY
164 css::uno::Sequence< css::uno::Type > const & SAL_CALL getTypes() const
165 { return _aTypes; }
166#endif
167};
168
173{
174 mutable css::uno::Sequence< sal_Int8 > * _pSeq;
175 sal_Bool _bUseEthernetAddress;
176
177public:
179
180 // these are here to force memory de/allocation to sal lib.
181 static void * SAL_CALL operator new( size_t nSize )
182 { return ::rtl_allocateMemory( nSize ); }
183 static void SAL_CALL operator delete( void * pMem )
184 { ::rtl_freeMemory( pMem ); }
185 static void * SAL_CALL operator new( size_t, void * pMem )
186 { return pMem; }
187 static void SAL_CALL operator delete( void *, void * )
188 {}
189
191
193
198 OImplementationId( bool bUseEthernetAddress = true )
199 : _pSeq( NULL )
200 , _bUseEthernetAddress( bUseEthernetAddress )
201 {}
206 OImplementationId( const css::uno::Sequence< sal_Int8 > & rSeq )
207 : _pSeq( new css::uno::Sequence< sal_Int8 >( rSeq ) )
208 , _bUseEthernetAddress( false )
209 {}
211 : _pSeq( new css::uno::Sequence< sal_Int8 >( rId.getImplementationId() ) )
212 , _bUseEthernetAddress( false )
213 {}
214
219 css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() const;
220};
221
222}
223
224#endif
225
226/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
unsigned char sal_Bool
Definition: types.h:34
signed char sal_Int8
Definition: types.h:39
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:558
SAL_DLLPUBLIC void rtl_freeMemory(void *Ptr) SAL_THROW_EXTERN_C()
Free memory.
SAL_DLLPUBLIC void * rtl_allocateMemory(sal_Size Bytes) SAL_THROW_EXTERN_C()
Allocate memory.
#define CPPUHELPER_DLLPUBLIC
Definition: cppuhelperdllapi.h:28
Definition: Enterable.hxx:27
Definition: unotype.hxx:35
Helper class to implement css::lang::XTypeProvider.
Definition: typeprovider.hxx:38
OTypeCollection(const css::uno::Type &rType1, const css::uno::Type &rType2, const css::uno::Sequence< css::uno::Type > &rAddTypes=css::uno::Sequence< css::uno::Type >())
OTypeCollection(const css::uno::Type &rType1, const css::uno::Type &rType2, const css::uno::Type &rType3, const css::uno::Type &rType4, const css::uno::Type &rType5, const css::uno::Type &rType6, const css::uno::Type &rType7, const css::uno::Type &rType8, const css::uno::Type &rType9, const css::uno::Type &rType10, const css::uno::Type &rType11, const css::uno::Type &rType12, const css::uno::Sequence< css::uno::Type > &rAddTypes=css::uno::Sequence< css::uno::Type >())
OTypeCollection(const css::uno::Type &rType1, const css::uno::Type &rType2, const css::uno::Type &rType3, const css::uno::Type &rType4, const css::uno::Type &rType5, const css::uno::Type &rType6, const css::uno::Sequence< css::uno::Type > &rAddTypes=css::uno::Sequence< css::uno::Type >())
OTypeCollection(const css::uno::Type &rType1, const css::uno::Type &rType2, const css::uno::Type &rType3, const css::uno::Type &rType4, const css::uno::Type &rType5, const css::uno::Type &rType6, const css::uno::Type &rType7, const css::uno::Type &rType8, const css::uno::Type &rType9, const css::uno::Type &rType10, const css::uno::Sequence< css::uno::Type > &rAddTypes=css::uno::Sequence< css::uno::Type >())
css::uno::Sequence< css::uno::Type > getTypes()
Called upon XTypeProvider::getTypes().
Definition: typeprovider.hxx:161
OTypeCollection(const css::uno::Type &rType1, const css::uno::Type &rType2, const css::uno::Type &rType3, const css::uno::Type &rType4, const css::uno::Type &rType5, const css::uno::Sequence< css::uno::Type > &rAddTypes=css::uno::Sequence< css::uno::Type >())
OTypeCollection(const css::uno::Type &rType1, const css::uno::Type &rType2, const css::uno::Type &rType3, const css::uno::Type &rType4, const css::uno::Sequence< css::uno::Type > &rAddTypes=css::uno::Sequence< css::uno::Type >())
OTypeCollection(const css::uno::Type &rType1, const css::uno::Type &rType2, const css::uno::Type &rType3, const css::uno::Sequence< css::uno::Type > &rAddTypes=css::uno::Sequence< css::uno::Type >())
OTypeCollection(const css::uno::Type &rType1, const css::uno::Type &rType2, const css::uno::Type &rType3, const css::uno::Type &rType4, const css::uno::Type &rType5, const css::uno::Type &rType6, const css::uno::Type &rType7, const css::uno::Type &rType8, const css::uno::Sequence< css::uno::Type > &rAddTypes=css::uno::Sequence< css::uno::Type >())
OTypeCollection(const css::uno::Type &rType1, const css::uno::Type &rType2, const css::uno::Type &rType3, const css::uno::Type &rType4, const css::uno::Type &rType5, const css::uno::Type &rType6, const css::uno::Type &rType7, const css::uno::Sequence< css::uno::Type > &rAddTypes=css::uno::Sequence< css::uno::Type >())
OTypeCollection(const css::uno::Type &rType1, const css::uno::Type &rType2, const css::uno::Type &rType3, const css::uno::Type &rType4, const css::uno::Type &rType5, const css::uno::Type &rType6, const css::uno::Type &rType7, const css::uno::Type &rType8, const css::uno::Type &rType9, const css::uno::Sequence< css::uno::Type > &rAddTypes=css::uno::Sequence< css::uno::Type >())
OTypeCollection(const css::uno::Type &rType1, const css::uno::Sequence< css::uno::Type > &rAddTypes=css::uno::Sequence< css::uno::Type >())
OTypeCollection(const css::uno::Type &rType1, const css::uno::Type &rType2, const css::uno::Type &rType3, const css::uno::Type &rType4, const css::uno::Type &rType5, const css::uno::Type &rType6, const css::uno::Type &rType7, const css::uno::Type &rType8, const css::uno::Type &rType9, const css::uno::Type &rType10, const css::uno::Type &rType11, const css::uno::Sequence< css::uno::Type > &rAddTypes=css::uno::Sequence< css::uno::Type >())
Helper class to implement IDs for XUnoTunnel.
Definition: typeprovider.hxx:173
OImplementationId(bool bUseEthernetAddress=true)
Constructor.
Definition: typeprovider.hxx:198
OImplementationId(const OImplementationId &rId)
Definition: typeprovider.hxx:210
OImplementationId(const css::uno::Sequence< sal_Int8 > &rSeq)
Constructor giving implementation id.
Definition: typeprovider.hxx:206
css::uno::Sequence< sal_Int8 > getImplementationId() const
Get implementation id.