My Project
UDK 3.2.7 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  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * Copyright 2000, 2010 Oracle and/or its affiliates.
7  *
8  * OpenOffice.org - a multi-platform office productivity suite
9  *
10  * This file is part of OpenOffice.org.
11  *
12  * OpenOffice.org is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License version 3
14  * only, as published by the Free Software Foundation.
15  *
16  * OpenOffice.org is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Lesser General Public License version 3 for more details
20  * (a copy is included in the LICENSE file that accompanied this code).
21  *
22  * You should have received a copy of the GNU Lesser General Public License
23  * version 3 along with OpenOffice.org. If not, see
24  * <http://www.openoffice.org/license.html>
25  * for a copy of the LGPLv3 License.
26  *
27  ************************************************************************/
28 #ifndef _COM_SUN_STAR_UNO_TYPE_H_
29 #define _COM_SUN_STAR_UNO_TYPE_H_
30 
32 #ifndef _COM_SUN_STAR_UNO_TYPECLASS_HDL_
33 #include <com/sun/star/uno/TypeClass.hdl>
34 #endif
35 #include <cppu/macros.hxx>
36 #include <rtl/ustring.hxx>
37 #include <rtl/alloc.h>
38 
39 
40 namespace com
41 {
42 namespace sun
43 {
44 namespace star
45 {
46 namespace uno
47 {
48 
52 {
57 };
58 
66 class Type
67 {
71 
72 public:
74  // these are here to force memory de/allocation to sal lib.
75  inline static void * SAL_CALL operator new ( size_t nSize ) SAL_THROW(())
76  { return ::rtl_allocateMemory( nSize ); }
77  inline static void SAL_CALL operator delete ( void * pMem ) SAL_THROW(())
78  { ::rtl_freeMemory( pMem ); }
79  inline static void * SAL_CALL operator new ( size_t, void * pMem ) SAL_THROW(())
80  { return pMem; }
81  inline static void SAL_CALL operator delete ( void *, void * ) SAL_THROW(())
82  {}
84 
87  inline Type() SAL_THROW(());
88 
94  inline Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ) SAL_THROW(());
95 
101  inline Type( TypeClass eTypeClass, const sal_Char * pTypeName ) SAL_THROW(());
102 
107  inline Type( typelib_TypeDescriptionReference * pType ) SAL_THROW(());
108 
122  inline Type( typelib_TypeDescriptionReference * pType, __sal_NoAcquire dummy ) SAL_THROW(());
123 
128  inline Type( const Type & rType ) SAL_THROW(());
129 
132  inline ~Type() SAL_THROW(())
134 
140  inline Type & SAL_CALL operator = ( const Type & rType ) SAL_THROW(());
141 
146  inline TypeClass SAL_CALL getTypeClass() const SAL_THROW(())
147  { return (TypeClass)_pType->eTypeClass; }
148 
153  inline ::rtl::OUString SAL_CALL getTypeName() const SAL_THROW(());
154 
159  inline void SAL_CALL getDescription( typelib_TypeDescription ** ppDescr ) const SAL_THROW(())
161 
167  { return _pType; }
168 
177  inline sal_Bool SAL_CALL isAssignableFrom( const Type & rType ) const SAL_THROW(())
179 
185  inline sal_Bool SAL_CALL equals( const Type & rType ) const SAL_THROW(())
186  { return ::typelib_typedescriptionreference_equals( _pType, rType._pType ); }
192  inline sal_Bool SAL_CALL operator == ( const Type & rType ) const SAL_THROW(())
193  { return ::typelib_typedescriptionreference_equals( _pType, rType._pType ); }
199  inline sal_Bool SAL_CALL operator != ( const Type & rType ) const SAL_THROW(())
200  { return (! ::typelib_typedescriptionreference_equals( _pType, rType._pType )); }
201 };
202 
205 template< class T >
206 class Array
207 {
208 public:
210 };
211 
212 }
213 }
214 }
215 }
216 
226 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * ) SAL_THROW(());
227 
231 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType() SAL_THROW(());
236 inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType() SAL_THROW(());
237 
242 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType() SAL_THROW(());
247 inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() SAL_THROW(());
257 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * ) SAL_THROW(());
267 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType(
268  bool const * ) SAL_THROW(());
269 
274 inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType() SAL_THROW(());
279 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() SAL_THROW(());
280 
290 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * ) SAL_THROW(());
291 
301 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * ) SAL_THROW(());
302 
312 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * ) SAL_THROW(());
313 
323 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * ) SAL_THROW(());
324 
334 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * ) SAL_THROW(());
335 
345 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * ) SAL_THROW(());
346 
356 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * ) SAL_THROW(());
357 
367 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * ) SAL_THROW(());
368 
378 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ) SAL_THROW(());
379 
389 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ) SAL_THROW(());
390 
396 template< class T >
397 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType1( T * pT ) SAL_THROW(());
403 template< class T >
404 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType2( T * pT ) SAL_THROW(());
410 template< class T >
411 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType3( T * pT ) SAL_THROW(());
417 template< class T >
418 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType4( T * pT ) SAL_THROW(());
424 template< class T >
425 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType5( T * pT ) SAL_THROW(());
431 template< class T >
432 inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType6( T * pT ) SAL_THROW(());
433 
452 template< typename T > inline const ::com::sun::star::uno::Type & SAL_CALL
453 getCppuType() SAL_THROW(());
454 
466 template<> inline const ::com::sun::star::uno::Type & SAL_CALL
467 getCppuType< sal_Unicode >() SAL_THROW(());
468 
469 #endif
470 
471 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */