summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2004-07-23 13:39:27 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2004-07-23 13:39:27 +0000
commit690ac5296bd3c44b0f9f3989865e50aa29563979 (patch)
tree06f0b7ff4d064a81131b321bcb794ba8bb82630b /cppu
parentc0c85c1771e3bc7f5bd36714d8662f6b4a77bd2e (diff)
INTEGRATION: CWS sb20 (1.10.56); FILE MERGED
2004/07/06 12:58:03 sb 1.10.56.1: #i31129# New getCppuType template that favors UNO type CHAR (sal_Unicode) over UNO type UNSIGNED SHORT (sal_uInt16), in case both have the same underlying C++ type.
Diffstat (limited to 'cppu')
-rw-r--r--cppu/inc/com/sun/star/uno/Type.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/cppu/inc/com/sun/star/uno/Type.h b/cppu/inc/com/sun/star/uno/Type.h
index 4c6d6b73b..587503de9 100644
--- a/cppu/inc/com/sun/star/uno/Type.h
+++ b/cppu/inc/com/sun/star/uno/Type.h
@@ -2,9 +2,9 @@
*
* $RCSfile: Type.h,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: obo $ $Date: 2003-09-04 10:51:55 $
+ * last change: $Author: rt $ $Date: 2004-07-23 14:39:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -424,4 +424,29 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType5( T * pT )
template< class T >
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType6( T * pT ) SAL_THROW( () );
+/** Gets the meta type of an IDL type.
+
+ The difference between this function template (with a type parameter) and
+ the overloaded getCppuType function with a single (dummy) parameter of a
+ specific type is that this function template may not work for the UNO type
+ "unsigned short" (sal_uInt16 in C++), while the overloaded one-parameter
+ function may not work for the UNO type "char" (sal_Unicode in C++, which may
+ have the same underlying C++ type as sal_uInt16 on certain platforms).
+
+ @return type of the given IDL type
+
+ @since #i31129#
+*/
+template< typename T > inline const ::com::sun::star::uno::Type & SAL_CALL
+getCppuType() SAL_THROW(());
+
+/** Gets the meta type of IDL type char.
+
+ @return type of IDL type char
+
+ @since #i31129#
+*/
+template<> inline const ::com::sun::star::uno::Type & SAL_CALL
+getCppuType< sal_Unicode >() SAL_THROW(());
+
#endif