LibreOffice
LibreOffice 5.0 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Type.h
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_COM_SUN_STAR_UNO_TYPE_H
20 #define INCLUDED_COM_SUN_STAR_UNO_TYPE_H
21 
23 #include <com/sun/star/uno/TypeClass.hdl>
24 #include <rtl/ustring.hxx>
25 #include <rtl/alloc.h>
26 
27 
28 namespace com
29 {
30 namespace sun
31 {
32 namespace star
33 {
34 namespace uno
35 {
36 
40 {
45 };
46 
54 class SAL_WARN_UNUSED SAL_DLLPUBLIC_RTTI Type
55 {
59 
60 public:
62  // these are here to force memory de/allocation to sal lib.
63  inline static void * SAL_CALL operator new ( size_t nSize )
64  { return ::rtl_allocateMemory( nSize ); }
65  inline static void SAL_CALL operator delete ( void * pMem )
66  { ::rtl_freeMemory( pMem ); }
67  inline static void * SAL_CALL operator new ( size_t, void * pMem )
68  { return pMem; }
69  inline static void SAL_CALL operator delete ( void *, void * )
70  {}
72 
75  inline Type();
76 
82  inline Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName );
83 
89  inline Type( TypeClass eTypeClass, const sal_Char * pTypeName );
90 
95  inline Type( typelib_TypeDescriptionReference * pType );
96 
110  inline Type( typelib_TypeDescriptionReference * pType, __sal_NoAcquire dummy );
111 
116  inline Type( const Type & rType );
117 
120  inline ~Type()
122 
128  inline Type & SAL_CALL operator = ( const Type & rType );
129 
134  inline TypeClass SAL_CALL getTypeClass() const
135  { return (TypeClass)_pType->eTypeClass; }
136 
141  inline ::rtl::OUString SAL_CALL getTypeName() const;
142 
147  inline void SAL_CALL getDescription( typelib_TypeDescription ** ppDescr ) const
149 
155  { return _pType; }
156 
165  inline bool SAL_CALL isAssignableFrom( const Type & rType ) const
167 
173  inline bool SAL_CALL equals( const Type & rType ) const
174  { return ::typelib_typedescriptionreference_equals( _pType, rType._pType ); }
180  inline bool SAL_CALL operator == ( const Type & rType ) const
181  { return ::typelib_typedescriptionreference_equals( _pType, rType._pType ); }
187  inline bool SAL_CALL operator != ( const Type & rType ) const
188  { return (! ::typelib_typedescriptionreference_equals( _pType, rType._pType )); }
189 };
190 
193 template< class T >
194 class Array
195 {
196 public:
198 };
199 
200 }
201 }
202 }
203 }
204 
217 SAL_DEPRECATED("use cppu::UnoType")
218 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * );
219 
226 SAL_DEPRECATED("use cppu::UnoType")
227 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType();
235 SAL_DEPRECATED("use cppu::UnoType")
236 inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType();
237 
245 SAL_DEPRECATED("use cppu::UnoType")
246 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType();
254 SAL_DEPRECATED("use cppu::UnoType")
255 inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType();
268 SAL_DEPRECATED("use cppu::UnoType")
269 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * );
282 SAL_DEPRECATED("use cppu::UnoType")
283 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType(
284  bool const * );
285 
293 SAL_DEPRECATED("use cppu::UnoType")
294 inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType();
302 SAL_DEPRECATED("use cppu::UnoType")
303 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType();
304 
317 SAL_DEPRECATED("use cppu::UnoType")
318 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * );
319 
332 SAL_DEPRECATED("use cppu::UnoType")
333 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * );
334 
347 SAL_DEPRECATED("use cppu::UnoType")
348 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * );
349 
362 SAL_DEPRECATED("use cppu::UnoType")
363 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * );
364 
377 SAL_DEPRECATED("use cppu::UnoType")
378 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * );
379 
392 SAL_DEPRECATED("use cppu::UnoType")
393 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * );
394 
407 SAL_DEPRECATED("use cppu::UnoType")
408 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * );
409 
422 SAL_DEPRECATED("use cppu::UnoType")
423 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * );
424 
437 SAL_DEPRECATED("use cppu::UnoType")
438 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * );
439 
452 SAL_DEPRECATED("use cppu::UnoType")
453 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * );
454 
473 template< typename T > SAL_DEPRECATED("use cppu::UnoType")
474 inline const ::com::sun::star::uno::Type & SAL_CALL
475 getCppuType();
476 
488 template<> SAL_DEPRECATED("use cppu::UnoType")
489 inline const ::com::sun::star::uno::Type & SAL_CALL
490 getCppuType< sal_Unicode >();
491 
492 #endif
493 
494 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */