LibreOffice
LibreOffice 5.0 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 <rtl/alloc.h>
25 
26 
27 namespace cppu
28 {
29 
34 {
36 
37 public:
39  // these are here to force memory de/allocation to sal lib.
40  inline static void * SAL_CALL operator new( size_t nSize )
41  { return ::rtl_allocateMemory( nSize ); }
42  inline static void SAL_CALL operator delete( void * pMem )
43  { ::rtl_freeMemory( pMem ); }
44  inline static void * SAL_CALL operator new( size_t, void * pMem )
45  { return pMem; }
46  inline static void SAL_CALL operator delete( void *, void * )
47  {}
49 
50  inline OTypeCollection( const OTypeCollection & rCollection )
51  : _aTypes( rCollection._aTypes )
52  {}
54  const ::com::sun::star::uno::Type & rType1,
55  const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() );
57  const ::com::sun::star::uno::Type & rType1,
58  const ::com::sun::star::uno::Type & rType2,
59  const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() );
61  const ::com::sun::star::uno::Type & rType1,
62  const ::com::sun::star::uno::Type & rType2,
63  const ::com::sun::star::uno::Type & rType3,
64  const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() );
66  const ::com::sun::star::uno::Type & rType1,
67  const ::com::sun::star::uno::Type & rType2,
68  const ::com::sun::star::uno::Type & rType3,
69  const ::com::sun::star::uno::Type & rType4,
70  const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() );
72  const ::com::sun::star::uno::Type & rType1,
73  const ::com::sun::star::uno::Type & rType2,
74  const ::com::sun::star::uno::Type & rType3,
75  const ::com::sun::star::uno::Type & rType4,
76  const ::com::sun::star::uno::Type & rType5,
77  const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() );
79  const ::com::sun::star::uno::Type & rType1,
80  const ::com::sun::star::uno::Type & rType2,
81  const ::com::sun::star::uno::Type & rType3,
82  const ::com::sun::star::uno::Type & rType4,
83  const ::com::sun::star::uno::Type & rType5,
84  const ::com::sun::star::uno::Type & rType6,
85  const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() );
87  const ::com::sun::star::uno::Type & rType1,
88  const ::com::sun::star::uno::Type & rType2,
89  const ::com::sun::star::uno::Type & rType3,
90  const ::com::sun::star::uno::Type & rType4,
91  const ::com::sun::star::uno::Type & rType5,
92  const ::com::sun::star::uno::Type & rType6,
93  const ::com::sun::star::uno::Type & rType7,
94  const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() );
96  const ::com::sun::star::uno::Type & rType1,
97  const ::com::sun::star::uno::Type & rType2,
98  const ::com::sun::star::uno::Type & rType3,
99  const ::com::sun::star::uno::Type & rType4,
100  const ::com::sun::star::uno::Type & rType5,
101  const ::com::sun::star::uno::Type & rType6,
102  const ::com::sun::star::uno::Type & rType7,
103  const ::com::sun::star::uno::Type & rType8,
104  const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() );
106  const ::com::sun::star::uno::Type & rType1,
107  const ::com::sun::star::uno::Type & rType2,
108  const ::com::sun::star::uno::Type & rType3,
109  const ::com::sun::star::uno::Type & rType4,
110  const ::com::sun::star::uno::Type & rType5,
111  const ::com::sun::star::uno::Type & rType6,
112  const ::com::sun::star::uno::Type & rType7,
113  const ::com::sun::star::uno::Type & rType8,
114  const ::com::sun::star::uno::Type & rType9,
115  const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() );
117  const ::com::sun::star::uno::Type & rType1,
118  const ::com::sun::star::uno::Type & rType2,
119  const ::com::sun::star::uno::Type & rType3,
120  const ::com::sun::star::uno::Type & rType4,
121  const ::com::sun::star::uno::Type & rType5,
122  const ::com::sun::star::uno::Type & rType6,
123  const ::com::sun::star::uno::Type & rType7,
124  const ::com::sun::star::uno::Type & rType8,
125  const ::com::sun::star::uno::Type & rType9,
126  const ::com::sun::star::uno::Type & rType10,
127  const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() );
129  const ::com::sun::star::uno::Type & rType1,
130  const ::com::sun::star::uno::Type & rType2,
131  const ::com::sun::star::uno::Type & rType3,
132  const ::com::sun::star::uno::Type & rType4,
133  const ::com::sun::star::uno::Type & rType5,
134  const ::com::sun::star::uno::Type & rType6,
135  const ::com::sun::star::uno::Type & rType7,
136  const ::com::sun::star::uno::Type & rType8,
137  const ::com::sun::star::uno::Type & rType9,
138  const ::com::sun::star::uno::Type & rType10,
139  const ::com::sun::star::uno::Type & rType11,
140  const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() );
142  const ::com::sun::star::uno::Type & rType1,
143  const ::com::sun::star::uno::Type & rType2,
144  const ::com::sun::star::uno::Type & rType3,
145  const ::com::sun::star::uno::Type & rType4,
146  const ::com::sun::star::uno::Type & rType5,
147  const ::com::sun::star::uno::Type & rType6,
148  const ::com::sun::star::uno::Type & rType7,
149  const ::com::sun::star::uno::Type & rType8,
150  const ::com::sun::star::uno::Type & rType9,
151  const ::com::sun::star::uno::Type & rType10,
152  const ::com::sun::star::uno::Type & rType11,
153  const ::com::sun::star::uno::Type & rType12,
154  const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() );
155 
161  { return _aTypes; }
162 };
163 
168 {
169  mutable ::com::sun::star::uno::Sequence< sal_Int8 > * _pSeq;
170  sal_Bool _bUseEthernetAddress;
171 
172 public:
174 
175  // these are here to force memory de/allocation to sal lib.
176  inline static void * SAL_CALL operator new( size_t nSize )
177  { return ::rtl_allocateMemory( nSize ); }
178  inline static void SAL_CALL operator delete( void * pMem )
179  { ::rtl_freeMemory( pMem ); }
180  inline static void * SAL_CALL operator new( size_t, void * pMem )
181  { return pMem; }
182  inline static void SAL_CALL operator delete( void *, void * )
183  {}
184 
186 
188 
193  inline OImplementationId( bool bUseEthernetAddress = true )
194  : _pSeq( 0 )
195  , _bUseEthernetAddress( bUseEthernetAddress )
196  {}
201  inline OImplementationId( const ::com::sun::star::uno::Sequence< sal_Int8 > & rSeq )
202  : _pSeq( new ::com::sun::star::uno::Sequence< sal_Int8 >( rSeq ) )
203  , _bUseEthernetAddress( false )
204  {}
205  inline OImplementationId( const OImplementationId & rId )
206  : _pSeq( new ::com::sun::star::uno::Sequence< sal_Int8 >( rId.getImplementationId() ) )
207  , _bUseEthernetAddress( false )
208  {}
209 
214  ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() const;
215 };
216 
217 }
218 
219 #endif
220 
221 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > getTypes()
Called upon XTypeProvider::getTypes().
Definition: typeprovider.hxx:160
Definition: Enterable.hxx:26
OImplementationId(bool bUseEthernetAddress=true)
Constructor.
Definition: typeprovider.hxx:193
SAL_DLLPUBLIC void rtl_freeMemory(void *Ptr) SAL_THROW_EXTERN_C()
Free memory.
OImplementationId(const ::com::sun::star::uno::Sequence< sal_Int8 > &rSeq)
Constructor giving implementation id.
Definition: typeprovider.hxx:201
OImplementationId(const OImplementationId &rId)
Definition: typeprovider.hxx:205
Definition: types.h:385
unsigned char sal_Bool
Definition: types.h:48
signed char sal_Int8
Definition: types.h:53
OTypeCollection(const OTypeCollection &rCollection)
Definition: typeprovider.hxx:50
#define CPPUHELPER_DLLPUBLIC
Definition: cppuhelperdllapi.h:28
SAL_DLLPUBLIC void * rtl_allocateMemory(sal_Size Bytes) SAL_THROW_EXTERN_C()
Allocate memory.
Helper class to implement com::sun::star::lang::XTypeProvider.
Definition: typeprovider.hxx:33
Helper class to implement IDs for XUnoTunnel.
Definition: typeprovider.hxx:167