LibreOffice: cppuhelper/typeprovider.hxx Source File

LibreOffice LibreOffice 25.8 SDK C/C++ API Reference

Loading...
Searching...
No Matches
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
20/*
21 * This file is part of LibreOffice published API.
22 */
23#ifndef INCLUDED_CPPUHELPER_TYPEPROVIDER_HXX
24#define INCLUDED_CPPUHELPER_TYPEPROVIDER_HXX
25
26#include "sal/config.h"
27
28#include <cstddef>
29
30#include "rtl/alloc.h"
31#include "com/sun/star/uno/Sequence.hxx"
32#include "cppuhelper/cppuhelperdllapi.h"
33
34
35namespace cppu
36{
37
41 class SAL_WARN_UNUSED CPPUHELPER_DLLPUBLIC OTypeCollection
42{
43 css::uno::Sequence< css::uno::Type > _aTypes;
44
45public:
47 // these are here to force memory de/allocation to sal lib.
48 static void * SAL_CALL operator new( size_t nSize )
49 { return ::rtl_allocateMemory( nSize ); }
50 static void SAL_CALL operator delete( void * pMem )
51 { ::rtl_freeMemory( pMem ); }
52 static void * SAL_CALL operator new( size_t, void * pMem )
53 { return pMem; }
54 static void SAL_CALL operator delete( void *, void * )
55 {}
57
58 OTypeCollection(
59 const css::uno::Type & rType1,
60 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
61 OTypeCollection(
62 const css::uno::Type & rType1,
63 const css::uno::Type & rType2,
64 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
65 OTypeCollection(
66 const css::uno::Type & rType1,
67 const css::uno::Type & rType2,
68 const css::uno::Type & rType3,
69 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
70 OTypeCollection(
71 const css::uno::Type & rType1,
72 const css::uno::Type & rType2,
73 const css::uno::Type & rType3,
74 const css::uno::Type & rType4,
75 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
76 OTypeCollection(
77 const css::uno::Type & rType1,
78 const css::uno::Type & rType2,
79 const css::uno::Type & rType3,
80 const css::uno::Type & rType4,
81 const css::uno::Type & rType5,
82 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
83 OTypeCollection(
84 const css::uno::Type & rType1,
85 const css::uno::Type & rType2,
86 const css::uno::Type & rType3,
87 const css::uno::Type & rType4,
88 const css::uno::Type & rType5,
89 const css::uno::Type & rType6,
90 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
91 OTypeCollection(
92 const css::uno::Type & rType1,
93 const css::uno::Type & rType2,
94 const css::uno::Type & rType3,
95 const css::uno::Type & rType4,
96 const css::uno::Type & rType5,
97 const css::uno::Type & rType6,
98 const css::uno::Type & rType7,
99 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
100 OTypeCollection(
101 const css::uno::Type & rType1,
102 const css::uno::Type & rType2,
103 const css::uno::Type & rType3,
104 const css::uno::Type & rType4,
105 const css::uno::Type & rType5,
106 const css::uno::Type & rType6,
107 const css::uno::Type & rType7,
108 const css::uno::Type & rType8,
109 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
110 OTypeCollection(
111 const css::uno::Type & rType1,
112 const css::uno::Type & rType2,
113 const css::uno::Type & rType3,
114 const css::uno::Type & rType4,
115 const css::uno::Type & rType5,
116 const css::uno::Type & rType6,
117 const css::uno::Type & rType7,
118 const css::uno::Type & rType8,
119 const css::uno::Type & rType9,
120 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
121 OTypeCollection(
122 const css::uno::Type & rType1,
123 const css::uno::Type & rType2,
124 const css::uno::Type & rType3,
125 const css::uno::Type & rType4,
126 const css::uno::Type & rType5,
127 const css::uno::Type & rType6,
128 const css::uno::Type & rType7,
129 const css::uno::Type & rType8,
130 const css::uno::Type & rType9,
131 const css::uno::Type & rType10,
132 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
133 OTypeCollection(
134 const css::uno::Type & rType1,
135 const css::uno::Type & rType2,
136 const css::uno::Type & rType3,
137 const css::uno::Type & rType4,
138 const css::uno::Type & rType5,
139 const css::uno::Type & rType6,
140 const css::uno::Type & rType7,
141 const css::uno::Type & rType8,
142 const css::uno::Type & rType9,
143 const css::uno::Type & rType10,
144 const css::uno::Type & rType11,
145 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
146 OTypeCollection(
147 const css::uno::Type & rType1,
148 const css::uno::Type & rType2,
149 const css::uno::Type & rType3,
150 const css::uno::Type & rType4,
151 const css::uno::Type & rType5,
152 const css::uno::Type & rType6,
153 const css::uno::Type & rType7,
154 const css::uno::Type & rType8,
155 const css::uno::Type & rType9,
156 const css::uno::Type & rType10,
157 const css::uno::Type & rType11,
158 const css::uno::Type & rType12,
159 const css::uno::Sequence< css::uno::Type > & rAddTypes = css::uno::Sequence< css::uno::Type >() );
160
165 css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
166 { return _aTypes; }
167#if defined LIBO_INTERNAL_ONLY
168 css::uno::Sequence< css::uno::Type > const & getTypes() const
169 { return _aTypes; }
170#endif
171};
172
176 class SAL_DEPRECATED("Uses broken double checked locking") SAL_WARN_UNUSED CPPUHELPER_DLLPUBLIC OImplementationId
177{
178 mutable css::uno::Sequence< sal_Int8 > * _pSeq;
179 sal_Bool _bUseEthernetAddress;
180
181public:
183
184 // these are here to force memory de/allocation to sal lib.
185 static void * SAL_CALL operator new( size_t nSize )
186 { return ::rtl_allocateMemory( nSize ); }
187 static void SAL_CALL operator delete( void * pMem )
188 { ::rtl_freeMemory( pMem ); }
189 static void * SAL_CALL operator new( size_t, void * pMem )
190 { return pMem; }
191 static void SAL_CALL operator delete( void *, void * )
192 {}
193
194 ~OImplementationId();
195
197
202 OImplementationId( bool bUseEthernetAddress = true )
203 : _pSeq( NULL )
204 , _bUseEthernetAddress( bUseEthernetAddress )
205 {}
206
210 OImplementationId( const css::uno::Sequence< sal_Int8 > & rSeq )
211 : _pSeq( new css::uno::Sequence< sal_Int8 >( rSeq ) )
212 , _bUseEthernetAddress( false )
213 {}
214 SAL_WNODEPRECATED_DECLARATIONS_PUSH
215 OImplementationId( const OImplementationId & rId )
216 : _pSeq( new css::uno::Sequence< sal_Int8 >( rId.getImplementationId() ) )
217 , _bUseEthernetAddress( false )
218 {}
219 SAL_WNODEPRECATED_DECLARATIONS_POP
220
225 css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() const;
226};
227
228}
229
230#endif
231
232/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_DEPRECATED
#define SAL_DEPRECATED(message)
Use as follows: SAL_DEPRECATED("Don't use, it's evil.") void doit(int nPara);.
Definition types.h:492
SAL_WNODEPRECATED_DECLARATIONS_POP
#define SAL_WNODEPRECATED_DECLARATIONS_POP
Definition types.h:533
sal_Bool
unsigned char sal_Bool
Definition types.h:38
sal_Int8
signed char sal_Int8
Definition types.h:43
SAL_WNODEPRECATED_DECLARATIONS_PUSH
#define SAL_WNODEPRECATED_DECLARATIONS_PUSH
Use as follows: SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptr<X> ... SAL_WNODEPRECATED_DECLARAT...
Definition types.h:532
SAL_WARN_UNUSED
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition types.h:611
config.h
alloc.h
rtl_freeMemory
SAL_DLLPUBLIC void rtl_freeMemory(void *Ptr) SAL_THROW_EXTERN_C()
Free memory.
cppuhelperdllapi.h
CPPUHELPER_DLLPUBLIC
#define CPPUHELPER_DLLPUBLIC
Definition cppuhelperdllapi.h:32
Sequence.hxx
com::sun::star
Definition types.h:377
cppu
Definition Enterable.hxx:31
com::sun::star::uno::Sequence
Template C++ class representing an IDL sequence.
Definition Sequence.h:61
cppu::OTypeCollection::OTypeCollection
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 >())
cppu::OTypeCollection::OTypeCollection
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 >())
cppu::OTypeCollection::OTypeCollection
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 >())
cppu::OTypeCollection::OTypeCollection
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 >())
cppu::OTypeCollection::getTypes
css::uno::Sequence< css::uno::Type > getTypes()
Called upon XTypeProvider::getTypes().
Definition typeprovider.hxx:165
cppu::OTypeCollection::OTypeCollection
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 >())
cppu::OTypeCollection::OTypeCollection
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 >())
cppu::OTypeCollection::OTypeCollection
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 >())
cppu::OTypeCollection::OTypeCollection
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 >())
cppu::OTypeCollection::OTypeCollection
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 >())
cppu::OTypeCollection::OTypeCollection
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 >())
cppu::OTypeCollection::OTypeCollection
OTypeCollection(const css::uno::Type &rType1, const css::uno::Sequence< css::uno::Type > &rAddTypes=css::uno::Sequence< css::uno::Type >())
cppu::OTypeCollection::OTypeCollection
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 >())
cppu::OImplementationId::OImplementationId
OImplementationId(bool bUseEthernetAddress=true)
Constructor.
Definition typeprovider.hxx:202
cppu::OImplementationId::OImplementationId
SAL_WNODEPRECATED_DECLARATIONS_PUSH OImplementationId(const OImplementationId &rId)
Definition typeprovider.hxx:215
cppu::OImplementationId::OImplementationId
OImplementationId(const css::uno::Sequence< sal_Int8 > &rSeq)
Constructor giving implementation id.
Definition typeprovider.hxx:210
cppu::OImplementationId::getImplementationId
SAL_WNODEPRECATED_DECLARATIONS_POP css::uno::Sequence< sal_Int8 > getImplementationId() const
Get implementation id.
com::sun::star::uno::Type
C++ class representing an IDL meta type.
Definition Type.h:59