UDK 3.2.7 C/C++ API Reference
|
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 00002 /************************************************************************* 00003 * 00004 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 00005 * 00006 * Copyright 2000, 2010 Oracle and/or its affiliates. 00007 * 00008 * OpenOffice.org - a multi-platform office productivity suite 00009 * 00010 * This file is part of OpenOffice.org. 00011 * 00012 * OpenOffice.org is free software: you can redistribute it and/or modify 00013 * it under the terms of the GNU Lesser General Public License version 3 00014 * only, as published by the Free Software Foundation. 00015 * 00016 * OpenOffice.org is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Lesser General Public License version 3 for more details 00020 * (a copy is included in the LICENSE file that accompanied this code). 00021 * 00022 * You should have received a copy of the GNU Lesser General Public License 00023 * version 3 along with OpenOffice.org. If not, see 00024 * <http://www.openoffice.org/license.html> 00025 * for a copy of the LGPLv3 License. 00026 * 00027 ************************************************************************/ 00028 #ifndef _CPPUHELPER_TYPEPROVIDER_HXX_ 00029 #define _CPPUHELPER_TYPEPROVIDER_HXX_ 00030 00031 #include <rtl/alloc.h> 00032 #include <rtl/uuid.h> 00033 #include <com/sun/star/uno/Sequence.hxx> 00034 #include "cppuhelperdllapi.h" 00035 00036 00037 namespace cppu 00038 { 00039 00043 class CPPUHELPER_DLLPUBLIC OTypeCollection 00044 { 00045 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > _aTypes; 00046 00047 public: 00049 // these are here to force memory de/allocation to sal lib. 00050 inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(()) 00051 { return ::rtl_allocateMemory( nSize ); } 00052 inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW(()) 00053 { ::rtl_freeMemory( pMem ); } 00054 inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW(()) 00055 { return pMem; } 00056 inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW(()) 00057 {} 00059 00060 inline OTypeCollection( const OTypeCollection & rCollection ) 00061 SAL_THROW(()) 00062 : _aTypes( rCollection._aTypes ) 00063 {} 00064 OTypeCollection( 00065 const ::com::sun::star::uno::Type & rType1, 00066 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) 00067 SAL_THROW(()); 00068 OTypeCollection( 00069 const ::com::sun::star::uno::Type & rType1, 00070 const ::com::sun::star::uno::Type & rType2, 00071 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) 00072 SAL_THROW(()); 00073 OTypeCollection( 00074 const ::com::sun::star::uno::Type & rType1, 00075 const ::com::sun::star::uno::Type & rType2, 00076 const ::com::sun::star::uno::Type & rType3, 00077 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) 00078 SAL_THROW(()); 00079 OTypeCollection( 00080 const ::com::sun::star::uno::Type & rType1, 00081 const ::com::sun::star::uno::Type & rType2, 00082 const ::com::sun::star::uno::Type & rType3, 00083 const ::com::sun::star::uno::Type & rType4, 00084 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) 00085 SAL_THROW(()); 00086 OTypeCollection( 00087 const ::com::sun::star::uno::Type & rType1, 00088 const ::com::sun::star::uno::Type & rType2, 00089 const ::com::sun::star::uno::Type & rType3, 00090 const ::com::sun::star::uno::Type & rType4, 00091 const ::com::sun::star::uno::Type & rType5, 00092 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) 00093 SAL_THROW(()); 00094 OTypeCollection( 00095 const ::com::sun::star::uno::Type & rType1, 00096 const ::com::sun::star::uno::Type & rType2, 00097 const ::com::sun::star::uno::Type & rType3, 00098 const ::com::sun::star::uno::Type & rType4, 00099 const ::com::sun::star::uno::Type & rType5, 00100 const ::com::sun::star::uno::Type & rType6, 00101 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) 00102 SAL_THROW(()); 00103 OTypeCollection( 00104 const ::com::sun::star::uno::Type & rType1, 00105 const ::com::sun::star::uno::Type & rType2, 00106 const ::com::sun::star::uno::Type & rType3, 00107 const ::com::sun::star::uno::Type & rType4, 00108 const ::com::sun::star::uno::Type & rType5, 00109 const ::com::sun::star::uno::Type & rType6, 00110 const ::com::sun::star::uno::Type & rType7, 00111 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) 00112 SAL_THROW(()); 00113 OTypeCollection( 00114 const ::com::sun::star::uno::Type & rType1, 00115 const ::com::sun::star::uno::Type & rType2, 00116 const ::com::sun::star::uno::Type & rType3, 00117 const ::com::sun::star::uno::Type & rType4, 00118 const ::com::sun::star::uno::Type & rType5, 00119 const ::com::sun::star::uno::Type & rType6, 00120 const ::com::sun::star::uno::Type & rType7, 00121 const ::com::sun::star::uno::Type & rType8, 00122 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) 00123 SAL_THROW(()); 00124 OTypeCollection( 00125 const ::com::sun::star::uno::Type & rType1, 00126 const ::com::sun::star::uno::Type & rType2, 00127 const ::com::sun::star::uno::Type & rType3, 00128 const ::com::sun::star::uno::Type & rType4, 00129 const ::com::sun::star::uno::Type & rType5, 00130 const ::com::sun::star::uno::Type & rType6, 00131 const ::com::sun::star::uno::Type & rType7, 00132 const ::com::sun::star::uno::Type & rType8, 00133 const ::com::sun::star::uno::Type & rType9, 00134 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) 00135 SAL_THROW(()); 00136 OTypeCollection( 00137 const ::com::sun::star::uno::Type & rType1, 00138 const ::com::sun::star::uno::Type & rType2, 00139 const ::com::sun::star::uno::Type & rType3, 00140 const ::com::sun::star::uno::Type & rType4, 00141 const ::com::sun::star::uno::Type & rType5, 00142 const ::com::sun::star::uno::Type & rType6, 00143 const ::com::sun::star::uno::Type & rType7, 00144 const ::com::sun::star::uno::Type & rType8, 00145 const ::com::sun::star::uno::Type & rType9, 00146 const ::com::sun::star::uno::Type & rType10, 00147 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) 00148 SAL_THROW(()); 00149 OTypeCollection( 00150 const ::com::sun::star::uno::Type & rType1, 00151 const ::com::sun::star::uno::Type & rType2, 00152 const ::com::sun::star::uno::Type & rType3, 00153 const ::com::sun::star::uno::Type & rType4, 00154 const ::com::sun::star::uno::Type & rType5, 00155 const ::com::sun::star::uno::Type & rType6, 00156 const ::com::sun::star::uno::Type & rType7, 00157 const ::com::sun::star::uno::Type & rType8, 00158 const ::com::sun::star::uno::Type & rType9, 00159 const ::com::sun::star::uno::Type & rType10, 00160 const ::com::sun::star::uno::Type & rType11, 00161 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) 00162 SAL_THROW(()); 00163 OTypeCollection( 00164 const ::com::sun::star::uno::Type & rType1, 00165 const ::com::sun::star::uno::Type & rType2, 00166 const ::com::sun::star::uno::Type & rType3, 00167 const ::com::sun::star::uno::Type & rType4, 00168 const ::com::sun::star::uno::Type & rType5, 00169 const ::com::sun::star::uno::Type & rType6, 00170 const ::com::sun::star::uno::Type & rType7, 00171 const ::com::sun::star::uno::Type & rType8, 00172 const ::com::sun::star::uno::Type & rType9, 00173 const ::com::sun::star::uno::Type & rType10, 00174 const ::com::sun::star::uno::Type & rType11, 00175 const ::com::sun::star::uno::Type & rType12, 00176 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) 00177 SAL_THROW(()); 00178 00183 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() SAL_THROW(()) 00184 { return _aTypes; } 00185 }; 00186 00190 class CPPUHELPER_DLLPUBLIC OImplementationId 00191 { 00192 mutable ::com::sun::star::uno::Sequence< sal_Int8 > * _pSeq; 00193 sal_Bool _bUseEthernetAddress; 00194 00195 public: 00197 00198 // these are here to force memory de/allocation to sal lib. 00199 inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW(()) 00200 { return ::rtl_allocateMemory( nSize ); } 00201 inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW(()) 00202 { ::rtl_freeMemory( pMem ); } 00203 inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW(()) 00204 { return pMem; } 00205 inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW(()) 00206 {} 00207 00208 ~OImplementationId() SAL_THROW(()); 00209 00211 00216 inline OImplementationId( sal_Bool bUseEthernetAddress = sal_True ) SAL_THROW(()) 00217 : _pSeq( 0 ) 00218 , _bUseEthernetAddress( bUseEthernetAddress ) 00219 {} 00224 inline OImplementationId( const ::com::sun::star::uno::Sequence< sal_Int8 > & rSeq ) SAL_THROW(()) 00225 : _pSeq( new ::com::sun::star::uno::Sequence< sal_Int8 >( rSeq ) ) 00226 {} 00227 inline OImplementationId( const OImplementationId & rId ) SAL_THROW(()) 00228 : _pSeq( new ::com::sun::star::uno::Sequence< sal_Int8 >( rId.getImplementationId() ) ) 00229 {} 00230 00235 ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() const SAL_THROW(()); 00236 }; 00237 00238 } 00239 00240 #endif 00241 00242 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */