diff options
author | Daniel Boelzle <dbo@openoffice.org> | 2000-12-21 13:35:28 +0000 |
---|---|---|
committer | Daniel Boelzle <dbo@openoffice.org> | 2000-12-21 13:35:28 +0000 |
commit | 8c3c9f8b9121f0be8d18e40b1e1548d207e1c47f (patch) | |
tree | 04161fec6641c699b6716f67e3c4d1e2df1ce8d4 /cppu | |
parent | e91d5248ad4431a6199aab9a29e7b53aad262f6b (diff) |
added throw () clauses
Diffstat (limited to 'cppu')
-rw-r--r-- | cppu/inc/com/sun/star/uno/Any.h | 114 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/Any.hxx | 226 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/Reference.h | 70 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/Reference.hxx | 26 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/Sequence.h | 48 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/Sequence.hxx | 48 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/Type.h | 78 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/Type.hxx | 54 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/genfunc.h | 11 | ||||
-rw-r--r-- | cppu/inc/com/sun/star/uno/genfunc.hxx | 11 | ||||
-rw-r--r-- | cppu/inc/typelib/typeclass.h | 9 | ||||
-rw-r--r-- | cppu/inc/typelib/typedescription.h | 73 | ||||
-rw-r--r-- | cppu/inc/typelib/typedescription.hxx | 52 | ||||
-rw-r--r-- | cppu/inc/typelib/uik.h | 9 | ||||
-rw-r--r-- | cppu/inc/uno/any2.h | 49 | ||||
-rw-r--r-- | cppu/inc/uno/data.h | 50 | ||||
-rw-r--r-- | cppu/inc/uno/dispatcher.h | 15 | ||||
-rw-r--r-- | cppu/inc/uno/environment.h | 30 | ||||
-rw-r--r-- | cppu/inc/uno/environment.hxx | 34 | ||||
-rw-r--r-- | cppu/inc/uno/mapping.h | 33 | ||||
-rw-r--r-- | cppu/inc/uno/mapping.hxx | 61 | ||||
-rw-r--r-- | cppu/inc/uno/sequence2.h | 28 | ||||
-rw-r--r-- | cppu/inc/uno/threadpool.h | 31 |
23 files changed, 621 insertions, 539 deletions
diff --git a/cppu/inc/com/sun/star/uno/Any.h b/cppu/inc/com/sun/star/uno/Any.h index 788031178b4b..45de58e237a2 100644 --- a/cppu/inc/com/sun/star/uno/Any.h +++ b/cppu/inc/com/sun/star/uno/Any.h @@ -2,9 +2,9 @@ * * $RCSfile: Any.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:50 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -110,27 +110,27 @@ class Any : public uno_Any { public: // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) throw() + inline static void * SAL_CALL operator new( size_t nSize ) throw () { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) throw() + inline static void SAL_CALL operator delete( void * pMem ) throw () { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) throw() + inline static void * SAL_CALL operator new( size_t, void * pMem ) throw () { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) throw() + inline static void SAL_CALL operator delete( void *, void * ) throw () {} /** Default constructor: Any holds no value; its type is void. <br> */ - inline Any(); + inline Any() throw (); /** Copy constructor: Sets value of the given any. <br> @param rAny another any */ - inline Any( const Any & rAny ); + inline Any( const Any & rAny ) throw (); /** Constructor: Sets a copy of the given data. @@ -138,7 +138,7 @@ public: @param pData value @param rType type of value */ - inline Any( const void * pData, const Type & rType ); + inline Any( const void * pData, const Type & rType ) throw (); /** Constructor: Sets a copy of the given data. @@ -146,7 +146,7 @@ public: @param pData value @param pTypeDescr type of value */ - inline Any( const void * pData, typelib_TypeDescription * pTypeDescr ); + inline Any( const void * pData, typelib_TypeDescription * pTypeDescr ) throw (); /** Constructor: Sets a copy of the given data. @@ -154,13 +154,13 @@ public: @param pData value @param pType type of value */ - inline Any( const void * pData, typelib_TypeDescriptionReference * pType ); + inline Any( const void * pData, typelib_TypeDescriptionReference * pType ) throw (); /** Destructor: Destructs any content and frees memory. <br> */ - inline ~Any(); + inline ~Any() throw (); /** Assignment operator: Sets the value of the given any. @@ -168,19 +168,19 @@ public: @param rAny another any (right side) @return this any */ - inline Any & SAL_CALL operator = ( const Any & rAny ); + inline Any & SAL_CALL operator = ( const Any & rAny ) throw (); /** Gets the type of the set value. <br> @return a Type object of the set value */ - inline const Type & SAL_CALL getValueType() const + inline const Type & SAL_CALL getValueType() const throw () { return * reinterpret_cast< const Type * >( &pType ); } /** Gets the type of the set value. <br> @return the <b>un</b>acquired type description reference of the set value */ - inline typelib_TypeDescriptionReference * SAL_CALL getValueTypeRef() const + inline typelib_TypeDescriptionReference * SAL_CALL getValueTypeRef() const throw () { return pType; } /** Gets the type description of the set value.<br> @@ -189,35 +189,35 @@ public: <br> @param a pointer to type description pointer */ - inline void SAL_CALL getValueTypeDescription( typelib_TypeDescription ** ppTypeDescr ) const + inline void SAL_CALL getValueTypeDescription( typelib_TypeDescription ** ppTypeDescr ) const throw () { ::typelib_typedescriptionreference_getDescription( ppTypeDescr, getValueTypeRef() ); } /** Gets the type class of the set value. <br> @return the type class of the set value */ - inline TypeClass SAL_CALL getValueTypeClass() const + inline TypeClass SAL_CALL getValueTypeClass() const throw () { return (TypeClass)pType->eTypeClass; } /** Gets the type name of the set value. <br> @return the type name of the set value */ - inline ::rtl::OUString SAL_CALL getValueTypeName() const + inline ::rtl::OUString SAL_CALL getValueTypeName() const throw () { return ::rtl::OUString( pType->pTypeName ); } /** Tests if any contains a value. <br> @return true if any has a value, false otherwise */ - inline sal_Bool SAL_CALL hasValue() const + inline sal_Bool SAL_CALL hasValue() const throw () { return (TypeClass_VOID != getValueTypeClass()); } /** Gets a pointer to the set value. <br> @return a pointer to the set value */ - inline const void * SAL_CALL getValue() const + inline const void * SAL_CALL getValue() const throw () { return pData; } /** Sets a value. If the any already contains a value, that value will be destructed @@ -225,28 +225,28 @@ public: <br> @param pData pointer to value @param rType type of value - */ - inline void SAL_CALL setValue( const void * pData, const Type & rType ); + */ + inline void SAL_CALL setValue( const void * pData, const Type & rType ) throw (); /** Sets a value. If the any already contains a value, that value will be destructed and its memory freed. <br> @param pData pointer to value @param pType type of value - */ - inline void SAL_CALL setValue( const void * pData, typelib_TypeDescriptionReference * pType ); + */ + inline void SAL_CALL setValue( const void * pData, typelib_TypeDescriptionReference * pType ) throw (); /** Sets a value. If the any already contains a value, that value will be destructed and its memory freed. <br> @param pData pointer to value @param pTypeDescr type description of value - */ - inline void SAL_CALL setValue( const void * pData, typelib_TypeDescription * pTypeDescr ); + */ + inline void SAL_CALL setValue( const void * pData, typelib_TypeDescription * pTypeDescr ) throw (); /** Clears this any. If the any already contains a value, that value will be destructed and its memory freed. After this has been called, the any does not contain a value. <br> */ - inline void SAL_CALL clear(); + inline void SAL_CALL clear() throw (); /** Equality operator: compares two anys.<br> The values need not be of equal type, e.g. a short integer is compared to @@ -254,16 +254,16 @@ public: <br> @param rAny another any (right side) @return true if both any contains equal values - */ - inline sal_Bool SAL_CALL operator == ( const Any & rAny ) const; + */ + inline sal_Bool SAL_CALL operator == ( const Any & rAny ) const throw (); /** Unequality operator: compares two anys.<br> The values need not be of equal type, e.g. a short integer is compared to a long integer. <br> @param rAny another any (right side) @return true if both any contains unequal values - */ - inline sal_Bool SAL_CALL operator != ( const Any & rAny ) const + */ + inline sal_Bool SAL_CALL operator != ( const Any & rAny ) const throw () { return (! operator == ( rAny )); } // test the binary compatibility @@ -274,9 +274,9 @@ public: <br> @param value a value @return an any - */ +*/ template< class C > -inline Any SAL_CALL makeAny( const C & value ); +inline Any SAL_CALL makeAny( const C & value ) throw (); class BaseReference; class Type; @@ -285,9 +285,9 @@ class Type; <br> @param rAny destination any (left side) @param value source value (right side) - */ +*/ template< class C > -inline void SAL_CALL operator <<= ( ::com::sun::star::uno::Any & rAny, const C & value ); +inline void SAL_CALL operator <<= ( ::com::sun::star::uno::Any & rAny, const C & value ) throw (); /** Template binary >>= operator to assign a value from an any.<br> If the any does not contain a value that can be assigned <b>without</b> data loss, this operation will fail returning false. @@ -295,9 +295,9 @@ inline void SAL_CALL operator <<= ( ::com::sun::star::uno::Any & rAny, const C & @param rAny source any (left side) @param value destination value (right side) @return true if assignment was possible without data loss - */ +*/ template< class C > -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, C & value ); +inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, C & value ) throw (); /** Template equality operator: compares set value of left side any to right side value.<br> The values need not be of equal type, e.g. a short integer is compared to @@ -310,7 +310,7 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, @return true if values are equal, false otherwise */ template< class C > -inline sal_Bool SAL_CALL operator == ( const ::com::sun::star::uno::Any & rAny, const C & value ); +inline sal_Bool SAL_CALL operator == ( const ::com::sun::star::uno::Any & rAny, const C & value ) throw (); /** Template unequality operator: compares set value of left side any to right side value.<br> The values need not be of equal type, e.g. a short integer is compared to a long integer.<br> @@ -322,40 +322,40 @@ inline sal_Bool SAL_CALL operator == ( const ::com::sun::star::uno::Any & rAny, @return true if values are unequal, false otherwise */ template< class C > -inline sal_Bool SAL_CALL operator != ( const ::com::sun::star::uno::Any & rAny, const C & value ) +inline sal_Bool SAL_CALL operator != ( const ::com::sun::star::uno::Any & rAny, const C & value ) throw () { return (! operator == ( rAny, value )); } // additional specialized >>= and == operators // bool -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Bool & value ); -inline sal_Bool SAL_CALL operator == ( const ::com::sun::star::uno::Any & rAny, const sal_Bool & value ); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Bool & value ) throw (); +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) throw (); // byte -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Int8 & value ); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int8 & value ) throw (); // short -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Int16 & value ); -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_uInt16 & value ); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) throw (); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) throw (); // long -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Int32 & value ); -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_uInt32 & value ); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) throw (); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) throw (); // hyper -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Int64 & value ); -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_uInt64 & value ); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) throw (); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) throw (); // float -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, float & value ); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, float & value ) throw (); // double -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, double & value ); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, double & value ) throw (); // string -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, ::rtl::OUString & value ); -inline sal_Bool SAL_CALL operator == ( const ::com::sun::star::uno::Any & rAny, const ::rtl::OUString & value ); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value ) throw (); +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value ) throw (); // type -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, ::com::sun::star::uno::Type & value ); -inline sal_Bool SAL_CALL operator == ( const ::com::sun::star::uno::Any & rAny, const ::com::sun::star::uno::Type & value ); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) throw (); +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const Type & value ) throw (); // any -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, ::com::sun::star::uno::Any & value ); +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Any & value ) throw (); // interface -inline sal_Bool SAL_CALL operator == ( const ::com::sun::star::uno::Any & rAny, const ::com::sun::star::uno::BaseReference & value ); +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value ) throw (); } } @@ -367,7 +367,7 @@ inline sal_Bool SAL_CALL operator == ( const ::com::sun::star::uno::Any & rAny, @param dummy typed pointer for function signature @return type of IDL type <b>any</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Any * ) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Any * ) throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_ANY ) ); diff --git a/cppu/inc/com/sun/star/uno/Any.hxx b/cppu/inc/com/sun/star/uno/Any.hxx index f73cfdf28b08..d2e4d88349d5 100644 --- a/cppu/inc/com/sun/star/uno/Any.hxx +++ b/cppu/inc/com/sun/star/uno/Any.hxx @@ -2,9 +2,9 @@ * * $RCSfile: Any.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:50 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -95,68 +95,72 @@ namespace uno { //__________________________________________________________________________________________________ -inline Any::Any() +inline Any::Any() throw () { ::uno_any_construct( this, 0, 0, cpp_acquire ); } //__________________________________________________________________________________________________ -inline Any::Any( const Any & rAny ) +inline Any::Any( const Any & rAny ) throw () { ::uno_type_any_construct( this, rAny.pData, rAny.getValueTypeRef(), cpp_acquire ); } //__________________________________________________________________________________________________ -inline Any::Any( const void * pData, const Type & rType ) +inline Any::Any( const void * pData, const Type & rType ) throw () { - ::uno_type_any_construct( this, const_cast< void * >( pData ), rType.getTypeLibType(), cpp_acquire ); + ::uno_type_any_construct( + this, const_cast< void * >( pData ), rType.getTypeLibType(), cpp_acquire ); } //__________________________________________________________________________________________________ -inline Any::Any( const void * pData, typelib_TypeDescription * pTypeDescr ) +inline Any::Any( const void * pData, typelib_TypeDescription * pTypeDescr ) throw () { - ::uno_any_construct( this, const_cast< void * >( pData ), pTypeDescr, cpp_acquire ); + ::uno_any_construct( + this, const_cast< void * >( pData ), pTypeDescr, cpp_acquire ); } //__________________________________________________________________________________________________ -inline Any::Any( const void * pData, typelib_TypeDescriptionReference * pType ) +inline Any::Any( const void * pData, typelib_TypeDescriptionReference * pType ) throw () { - ::uno_type_any_construct( this, const_cast< void * >( pData ), pType, cpp_acquire ); + ::uno_type_any_construct( + this, const_cast< void * >( pData ), pType, cpp_acquire ); } //__________________________________________________________________________________________________ -inline Any::~Any() +inline Any::~Any() throw () { - ::uno_any_destruct( this, cpp_release ); + ::uno_any_destruct( + this, cpp_release ); } //__________________________________________________________________________________________________ -inline Any & Any::operator = ( const Any & rAny ) +inline Any & Any::operator = ( const Any & rAny ) throw () { if (this != &rAny) setValue( rAny.getValue(), rAny.getValueTypeRef() ); return *this; } //__________________________________________________________________________________________________ -inline void Any::setValue( const void * pData, const Type & rType ) +inline void Any::setValue( const void * pData, const Type & rType ) throw () { - ::uno_any_destruct( this, cpp_release ); - ::uno_type_any_construct( this, const_cast< void * >( pData ), rType.getTypeLibType(), cpp_acquire ); + ::uno_type_any_assign( + this, const_cast< void * >( pData ), rType.getTypeLibType(), cpp_acquire, cpp_release ); } //__________________________________________________________________________________________________ -inline void Any::setValue( const void * pData, typelib_TypeDescriptionReference * pType ) +inline void Any::setValue( const void * pData, typelib_TypeDescriptionReference * pType ) throw () { - ::uno_any_destruct( this, cpp_release ); - ::uno_type_any_construct( this, const_cast< void * >( pData ), pType, cpp_acquire ); + ::uno_type_any_assign( + this, const_cast< void * >( pData ), pType, cpp_acquire, cpp_release ); } //__________________________________________________________________________________________________ -inline void Any::setValue( const void * pData, typelib_TypeDescription * pTypeDescr ) +inline void Any::setValue( const void * pData, typelib_TypeDescription * pTypeDescr ) throw () { - ::uno_any_destruct( this, cpp_release ); - ::uno_any_construct( this, const_cast< void * >( pData ), pTypeDescr, cpp_acquire ); + ::uno_any_assign( + this, const_cast< void * >( pData ), pTypeDescr, cpp_acquire, cpp_release ); } //__________________________________________________________________________________________________ -inline void Any::clear() +inline void Any::clear() throw () { - ::uno_any_destruct( this, cpp_release ); - ::uno_any_construct( this, 0, 0, cpp_acquire ); + ::uno_any_assign( + this, 0, 0, cpp_acquire, cpp_release ); } //__________________________________________________________________________________________________ -inline sal_Bool Any::operator == ( const Any & rAny ) const +inline sal_Bool Any::operator == ( const Any & rAny ) const throw () { const Type & rType = ::getCppuType( this ); return ::uno_type_equalData( @@ -167,36 +171,34 @@ inline sal_Bool Any::operator == ( const Any & rAny ) const //__________________________________________________________________________________________________ template< class C > -inline Any SAL_CALL makeAny( const C & value ) +inline Any SAL_CALL makeAny( const C & value ) throw () { return Any( &value, ::getCppuType( &value ) ); } //__________________________________________________________________________________________________ template< class C > -inline void SAL_CALL operator <<= ( ::com::sun::star::uno::Any & rAny, const C & value ) +inline void SAL_CALL operator <<= ( Any & rAny, const C & value ) throw () { rAny.setValue( &value, ::getCppuType( &value ) ); } //__________________________________________________________________________________________________ template< class C > -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, C & value ) +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, C & value ) throw () { - const ::com::sun::star::uno::Type & rType = ::getCppuType( &value ); + const Type & rType = ::getCppuType( &value ); return ::uno_type_assignData( &value, rType.getTypeLibType(), const_cast< void * >( rAny.getValue() ), rAny.getValueTypeRef(), - ::com::sun::star::uno::cpp_queryInterface, - ::com::sun::star::uno::cpp_acquire, - ::com::sun::star::uno::cpp_release ); + cpp_queryInterface, cpp_acquire, cpp_release ); } // bool //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Bool & value ) +inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Bool & value ) throw () { - if (::com::sun::star::uno::TypeClass_BOOLEAN == rAny.getValueTypeClass()) + if (TypeClass_BOOLEAN == rAny.getValueTypeClass()) { value = (* reinterpret_cast< const sal_Bool * >( rAny.getValue() ) != sal_False); return sal_True; @@ -204,16 +206,16 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, return sal_False; } //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator == ( const ::com::sun::star::uno::Any & rAny, const sal_Bool & value ) +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) throw () { - return (::com::sun::star::uno::TypeClass_BOOLEAN == rAny.getValueTypeClass() && + return (TypeClass_BOOLEAN == rAny.getValueTypeClass() && (value != sal_False) == (* reinterpret_cast< const sal_Bool * >( rAny.getValue() ) != sal_False)); } // byte //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Int8 & value ) +inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Int8 & value ) throw () { - if (::com::sun::star::uno::TypeClass_BYTE == rAny.getValueTypeClass()) + if (TypeClass_BYTE == rAny.getValueTypeClass()) { value = * reinterpret_cast< const sal_Int8 * >( rAny.getValue() ); return sal_True; @@ -222,30 +224,30 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, } // short //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Int16 & value ) +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) throw () { switch (rAny.getValueTypeClass()) { - case ::com::sun::star::uno::TypeClass_BYTE: + case TypeClass_BYTE: value = * reinterpret_cast< const sal_Int8 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_SHORT: - case ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT: + case TypeClass_SHORT: + case TypeClass_UNSIGNED_SHORT: value = * reinterpret_cast< const sal_Int16 * >( rAny.getValue() ); return sal_True; } return sal_False; } //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_uInt16 & value ) +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) throw () { switch (rAny.getValueTypeClass()) { - case ::com::sun::star::uno::TypeClass_BYTE: + case TypeClass_BYTE: value = * reinterpret_cast< const sal_Int8 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_SHORT: - case ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT: + case TypeClass_SHORT: + case TypeClass_UNSIGNED_SHORT: value = * reinterpret_cast< const sal_uInt16 * >( rAny.getValue() ); return sal_True; } @@ -253,42 +255,42 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, } // long //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Int32 & value ) +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) throw () { switch (rAny.getValueTypeClass()) { - case ::com::sun::star::uno::TypeClass_BYTE: + case TypeClass_BYTE: value = * reinterpret_cast< const sal_Int8 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_SHORT: + case TypeClass_SHORT: value = * reinterpret_cast< const sal_Int16 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT: + case TypeClass_UNSIGNED_SHORT: value = * reinterpret_cast< const sal_uInt16 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_LONG: - case ::com::sun::star::uno::TypeClass_UNSIGNED_LONG: + case TypeClass_LONG: + case TypeClass_UNSIGNED_LONG: value = * reinterpret_cast< const sal_Int32 * >( rAny.getValue() ); return sal_True; } return sal_False; } //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_uInt32 & value ) +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) throw () { switch (rAny.getValueTypeClass()) { - case ::com::sun::star::uno::TypeClass_BYTE: + case TypeClass_BYTE: value = * reinterpret_cast< const sal_Int8 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_SHORT: + case TypeClass_SHORT: value = * reinterpret_cast< const sal_Int16 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT: + case TypeClass_UNSIGNED_SHORT: value = * reinterpret_cast< const sal_uInt16 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_LONG: - case ::com::sun::star::uno::TypeClass_UNSIGNED_LONG: + case TypeClass_LONG: + case TypeClass_UNSIGNED_LONG: value = * reinterpret_cast< const sal_uInt32 * >( rAny.getValue() ); return sal_True; } @@ -296,54 +298,54 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, } // hyper //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Int64 & value ) +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) throw () { switch (rAny.getValueTypeClass()) { - case ::com::sun::star::uno::TypeClass_BYTE: + case TypeClass_BYTE: value = * reinterpret_cast< const sal_Int8 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_SHORT: + case TypeClass_SHORT: value = * reinterpret_cast< const sal_Int16 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT: + case TypeClass_UNSIGNED_SHORT: value = * reinterpret_cast< const sal_uInt16 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_LONG: + case TypeClass_LONG: value = * reinterpret_cast< const sal_Int32 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_UNSIGNED_LONG: + case TypeClass_UNSIGNED_LONG: value = * reinterpret_cast< const sal_uInt32 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_HYPER: - case ::com::sun::star::uno::TypeClass_UNSIGNED_HYPER: + case TypeClass_HYPER: + case TypeClass_UNSIGNED_HYPER: value = * reinterpret_cast< const sal_Int64 * >( rAny.getValue() ); return sal_True; } return sal_False; } //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_uInt64 & value ) +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) throw () { switch (rAny.getValueTypeClass()) { - case ::com::sun::star::uno::TypeClass_BYTE: + case TypeClass_BYTE: value = * reinterpret_cast< const sal_Int8 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_SHORT: + case TypeClass_SHORT: value = * reinterpret_cast< const sal_Int16 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT: + case TypeClass_UNSIGNED_SHORT: value = * reinterpret_cast< const sal_uInt16 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_LONG: + case TypeClass_LONG: value = * reinterpret_cast< const sal_Int32 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_UNSIGNED_LONG: + case TypeClass_UNSIGNED_LONG: value = * reinterpret_cast< const sal_uInt32 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_HYPER: - case ::com::sun::star::uno::TypeClass_UNSIGNED_HYPER: + case TypeClass_HYPER: + case TypeClass_UNSIGNED_HYPER: value = * reinterpret_cast< const sal_uInt64 * >( rAny.getValue() ); return sal_True; } @@ -351,20 +353,20 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, } // float //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, float & value ) +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, float & value ) throw () { switch (rAny.getValueTypeClass()) { - case ::com::sun::star::uno::TypeClass_BYTE: + case TypeClass_BYTE: value = * reinterpret_cast< const sal_Int8 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_SHORT: + case TypeClass_SHORT: value = * reinterpret_cast< const sal_Int16 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT: + case TypeClass_UNSIGNED_SHORT: value = * reinterpret_cast< const sal_uInt16 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_FLOAT: + case TypeClass_FLOAT: value = * reinterpret_cast< const float * >( rAny.getValue() ); return sal_True; } @@ -372,29 +374,29 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, } // double //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, double & value ) +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, double & value ) throw () { switch (rAny.getValueTypeClass()) { - case ::com::sun::star::uno::TypeClass_BYTE: + case TypeClass_BYTE: value = * reinterpret_cast< const sal_Int8 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_SHORT: + case TypeClass_SHORT: value = * reinterpret_cast< const sal_Int16 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT: + case TypeClass_UNSIGNED_SHORT: value = * reinterpret_cast< const sal_uInt16 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_LONG: + case TypeClass_LONG: value = * reinterpret_cast< const sal_Int32 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_UNSIGNED_LONG: + case TypeClass_UNSIGNED_LONG: value = * reinterpret_cast< const sal_uInt32 * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_FLOAT: + case TypeClass_FLOAT: value = * reinterpret_cast< const float * >( rAny.getValue() ); return sal_True; - case ::com::sun::star::uno::TypeClass_DOUBLE: + case TypeClass_DOUBLE: value = * reinterpret_cast< const double * >( rAny.getValue() ); return sal_True; } @@ -402,10 +404,9 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, } // string //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( - const ::com::sun::star::uno::Any & rAny, ::rtl::OUString & value ) +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value ) throw () { - if (::com::sun::star::uno::TypeClass_STRING == rAny.getValueTypeClass()) + if (TypeClass_STRING == rAny.getValueTypeClass()) { value = * reinterpret_cast< const ::rtl::OUString * >( rAny.getValue() ); return sal_True; @@ -413,54 +414,46 @@ inline sal_Bool SAL_CALL operator >>= ( return sal_False; } //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator == ( - const ::com::sun::star::uno::Any & rAny, const ::rtl::OUString & value ) +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value ) throw () { - return (::com::sun::star::uno::TypeClass_STRING == rAny.getValueTypeClass() && + return (TypeClass_STRING == rAny.getValueTypeClass() && value == * reinterpret_cast< const ::rtl::OUString * >( rAny.getValue() )); } // type //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( - const ::com::sun::star::uno::Any & rAny, ::com::sun::star::uno::Type & value ) +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) throw () { - if (::com::sun::star::uno::TypeClass_TYPE == rAny.getValueTypeClass()) + if (TypeClass_TYPE == rAny.getValueTypeClass()) { - value = * reinterpret_cast< const ::com::sun::star::uno::Type * >( rAny.getValue() ); + value = * reinterpret_cast< const Type * >( rAny.getValue() ); return sal_True; } return sal_False; } //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator == ( - const ::com::sun::star::uno::Any & rAny, const ::com::sun::star::uno::Type & value ) +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const Type & value ) throw () { - return (::com::sun::star::uno::TypeClass_TYPE == rAny.getValueTypeClass() && - value == * reinterpret_cast< const ::com::sun::star::uno::Type * >( rAny.getValue() )); + return (TypeClass_TYPE == rAny.getValueTypeClass() && + value == * reinterpret_cast< const Type * >( rAny.getValue() )); } // any //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator >>= ( - const ::com::sun::star::uno::Any & rAny, ::com::sun::star::uno::Any & value ) +inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Any & value ) throw () { value = rAny; return sal_True; } // interface //__________________________________________________________________________________________________ -inline sal_Bool SAL_CALL operator == ( - const ::com::sun::star::uno::Any & rAny, const ::com::sun::star::uno::BaseReference & value ) +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value ) throw () { - if (::com::sun::star::uno::TypeClass_INTERFACE == rAny.getValueTypeClass()) + if (TypeClass_INTERFACE == rAny.getValueTypeClass()) { - ::com::sun::star::uno::XInterface * p1 = - * reinterpret_cast< ::com::sun::star::uno::XInterface * const * >( rAny.getValue() ); + XInterface * p1 = * reinterpret_cast< XInterface * const * >( rAny.getValue() ); if (p1 && p1 == value.get()) return sal_True; - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xI1( - p1, ::com::sun::star::uno::UNO_QUERY ); - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xI2( - value.get(), ::com::sun::star::uno::UNO_QUERY ); + Reference< XInterface > xI1( p1, UNO_QUERY ); + Reference< XInterface > xI2( value.get(), UNO_QUERY ); return (xI1.is() && xI1.get() == xI2.get()); } return sal_False; @@ -469,14 +462,13 @@ inline sal_Bool SAL_CALL operator == ( // operator to compare to an any. //__________________________________________________________________________________________________ template< class C > -inline sal_Bool SAL_CALL operator == ( const ::com::sun::star::uno::Any & rAny, const C & value ) +inline sal_Bool SAL_CALL operator == ( const Any & rAny, const C & value ) throw () { - const ::com::sun::star::uno::Type & rType = ::getCppuType( &value ); + const Type & rType = ::getCppuType( &value ); return ::uno_type_equalData( const_cast< void * >( rAny.getValue() ), rAny.getValueTypeRef(), const_cast< C * >( &value ), rType.getTypeLibType(), - ::com::sun::star::uno::cpp_queryInterface, - ::com::sun::star::uno::cpp_release ); + cpp_queryInterface, cpp_release ); } } diff --git a/cppu/inc/com/sun/star/uno/Reference.h b/cppu/inc/com/sun/star/uno/Reference.h index 4db47ad47402..41577dbcaeea 100644 --- a/cppu/inc/com/sun/star/uno/Reference.h +++ b/cppu/inc/com/sun/star/uno/Reference.h @@ -2,9 +2,9 @@ * * $RCSfile: Reference.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:51 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -110,65 +110,65 @@ protected: Sets null reference. <br> */ - inline BaseReference(); + inline BaseReference() throw (); /** Constructor: Sets given interface pointer. <br> @param pInterface an interface pointer */ - inline BaseReference( XInterface * pInterface ); + inline BaseReference( XInterface * pInterface ) throw (); /** Constructor: Sets reference to given interface pointer without acquiring it. <br> @param pInterface interface pointer @param dummy UNO_REF_NO_ACQUIRE to force obvious distinction to other constructors */ - inline BaseReference( XInterface * pInterface, __UnoReference_NoAcquire ); + inline BaseReference( XInterface * pInterface, __UnoReference_NoAcquire ) throw (); /** Copy constructor: Copies interface reference. <br> @param rRef another reference */ - inline BaseReference( const BaseReference & rRef ); + inline BaseReference( const BaseReference & rRef ) throw (); /** Destructor: Releases interface reference. <br> */ - inline ~BaseReference(); + inline ~BaseReference() throw (); public: // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) throw() + inline static void * SAL_CALL operator new( size_t nSize ) throw () { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) throw() + inline static void SAL_CALL operator delete( void * pMem ) throw () { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) throw() + inline static void * SAL_CALL operator new( size_t, void * pMem ) throw () { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) throw() + inline static void SAL_CALL operator delete( void *, void * ) throw () {} /** Sets interface pointer. An interface already set will be released. <br> @param pInterface an interface pointer */ - inline void SAL_CALL set( XInterface * pInterface ); + inline void SAL_CALL set( XInterface * pInterface ) throw (); /** Clears reference, i.e. releases interface. Reference is null after clear() call. <br> */ - inline void SAL_CALL clear(); + inline void SAL_CALL clear() throw (); /** Gets interface pointer. This call does <b>not</b> acquire the interface. <br> @return <b>un</b>acquired interface pointer */ - inline XInterface * SAL_CALL get() const + inline XInterface * SAL_CALL get() const throw () { return _pInterface; } /** Checks if reference is null. <br> @return true if reference acquires an interface, i.e. is not null */ - inline sal_Bool SAL_CALL is() const + inline sal_Bool SAL_CALL is() const throw () { return (_pInterface != 0); } /** Equality operator: compares two interfaces<br> Checks if both references are null or refer to the same object. @@ -176,18 +176,18 @@ public: @param rRef another reference @return true if both references are null or refer to the same object, false otherwise */ - inline sal_Bool SAL_CALL operator == ( const BaseReference & rRef ) const; + inline sal_Bool SAL_CALL operator == ( const BaseReference & rRef ) const throw (); /** Unequality operator: compares two interfaces<br> Checks if both references are null or refer to the same object. <br> @param rRef another reference @return false if both references are null or refer to the same object, true otherwise */ - inline sal_Bool SAL_CALL operator != ( const BaseReference & rRef ) const + inline sal_Bool SAL_CALL operator != ( const BaseReference & rRef ) const throw () { return (! operator == ( rRef )); } // needed for stl container operations, though this makes no sense on pointers - inline sal_Bool SAL_CALL operator < ( const BaseReference& rRef ) const + inline sal_Bool SAL_CALL operator < ( const BaseReference& rRef ) const throw () { return (_pInterface < rRef._pInterface); } }; @@ -214,20 +214,20 @@ class Reference : public BaseReference { public: // these are here to force memory de/allocation to sal lib. - static void * SAL_CALL operator new( size_t nSize ) throw() + static void * SAL_CALL operator new( size_t nSize ) throw () { return ::rtl_allocateMemory( nSize ); } - static void SAL_CALL operator delete( void * pMem ) throw() + static void SAL_CALL operator delete( void * pMem ) throw () { ::rtl_freeMemory( pMem ); } - static void * SAL_CALL operator new( size_t, void * pMem ) throw() + static void * SAL_CALL operator new( size_t, void * pMem ) throw () { return pMem; } - static void SAL_CALL operator delete( void *, void * ) throw() + static void SAL_CALL operator delete( void *, void * ) throw () {} /** Default Constructor: Sets null reference. <br> */ - inline Reference() + inline Reference() throw () : BaseReference() {} /** Copy constructor: @@ -235,7 +235,7 @@ public: <br> @param rRef another reference */ - inline Reference( const Reference< interface_type > & rRef ) + inline Reference( const Reference< interface_type > & rRef ) throw () : BaseReference( rRef ) {} /** Constructor: @@ -243,7 +243,7 @@ public: <br> @param pInterface an interface pointer */ - inline Reference( interface_type * pInterface ) + inline Reference( interface_type * pInterface ) throw () : BaseReference( pInterface ) {} @@ -253,7 +253,7 @@ public: @param pInterface another reference @param dummy UNO_REF_NO_ACQUIRE to force obvious distinction to other constructors */ - inline Reference( XInterface * pInterface, __UnoReference_NoAcquire ) + inline Reference( XInterface * pInterface, __UnoReference_NoAcquire ) throw () : BaseReference( pInterface, UNO_REF_NO_ACQUIRE ) {} @@ -263,7 +263,7 @@ public: @param rRef another reference @param dummy UNO_QUERY or UNO_REF_QUERY to force obvious distinction to other constructors */ - inline Reference( const BaseReference & rRef, __UnoReference_Query ) + inline Reference( const BaseReference & rRef, __UnoReference_Query ) throw () : BaseReference( query( rRef ) ) {} /** Constructor: @@ -272,7 +272,7 @@ public: @param pInterface an interface pointer @param dummy UNO_QUERY to force obvious distinction to other constructors */ - inline Reference( XInterface * pInterface, __UnoReference_Query ) + inline Reference( XInterface * pInterface, __UnoReference_Query ) throw () : BaseReference( query( pInterface ) ) {} @@ -283,7 +283,7 @@ public: @param pInterface an interface pointer @return this reference */ - inline Reference< interface_type > & SAL_CALL operator = ( interface_type * pInterface ); + inline Reference< interface_type > & SAL_CALL operator = ( interface_type * pInterface ) throw (); /** Assignment operator: Acquires given interface reference and sets reference. An interface already set will be released. @@ -291,7 +291,7 @@ public: @param rRef an interface reference @return this reference */ - inline Reference< interface_type > & SAL_CALL operator = ( const Reference< interface_type > & rRef ) + inline Reference< interface_type > & SAL_CALL operator = ( const Reference< interface_type > & rRef ) throw () { return operator = ( rRef.get() ); } /** Queries given interface for type <b>interface_type</b>. @@ -299,13 +299,13 @@ public: @param pInterface interface pointer @return interface reference of demanded type (may be null) */ - inline static Reference< interface_type > SAL_CALL query( XInterface * pInterface ); + inline static Reference< interface_type > SAL_CALL query( XInterface * pInterface ) throw (); /** Queries given interface reference for type <b>interface_type</b>. <br> @param rRef interface reference @return interface reference of demanded type (may be null) */ - inline static Reference< interface_type > SAL_CALL query( const BaseReference & rRef ) + inline static Reference< interface_type > SAL_CALL query( const BaseReference & rRef ) throw () { return query( rRef.get() ); } /** Cast operatory to Reference< XInterface >: @@ -314,7 +314,7 @@ public: This a useful direct cast possibility. <br> */ - inline SAL_CALL operator const Reference< XInterface > & () const + inline SAL_CALL operator const Reference< XInterface > & () const throw () { return * reinterpret_cast< const Reference< XInterface > * >( this ); } /** Dereference operator: @@ -322,7 +322,7 @@ public: <br> @return <b>un</b>acquired interface pointer */ - interface_type * SAL_CALL operator -> () const + interface_type * SAL_CALL operator -> () const throw () { return static_cast< interface_type * >( BaseReference::get() ); } /** Gets interface pointer. @@ -330,7 +330,7 @@ public: <br> @return <b>un</b>acquired interface pointer */ - interface_type * SAL_CALL get() const + interface_type * SAL_CALL get() const throw () { return static_cast< interface_type * >( BaseReference::get() ); } }; diff --git a/cppu/inc/com/sun/star/uno/Reference.hxx b/cppu/inc/com/sun/star/uno/Reference.hxx index adcc32fd493f..a7c4fcb452da 100644 --- a/cppu/inc/com/sun/star/uno/Reference.hxx +++ b/cppu/inc/com/sun/star/uno/Reference.hxx @@ -2,9 +2,9 @@ * * $RCSfile: Reference.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:51 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -85,37 +85,37 @@ namespace uno { //__________________________________________________________________________________________________ -inline BaseReference::BaseReference() +inline BaseReference::BaseReference() throw () : _pInterface( 0 ) { } //__________________________________________________________________________________________________ -inline BaseReference::BaseReference( XInterface * pInterface ) +inline BaseReference::BaseReference( XInterface * pInterface ) throw () : _pInterface( pInterface ) { if (_pInterface) _pInterface->acquire(); } //__________________________________________________________________________________________________ -inline BaseReference::BaseReference( XInterface * pInterface, __UnoReference_NoAcquire ) +inline BaseReference::BaseReference( XInterface * pInterface, __UnoReference_NoAcquire ) throw () : _pInterface( pInterface ) { } //__________________________________________________________________________________________________ -inline BaseReference::BaseReference( const BaseReference & rRef ) +inline BaseReference::BaseReference( const BaseReference & rRef ) throw () : _pInterface( rRef._pInterface ) { if (_pInterface) _pInterface->acquire(); } //__________________________________________________________________________________________________ -inline BaseReference::~BaseReference() +inline BaseReference::~BaseReference() throw () { if (_pInterface) _pInterface->release(); } //__________________________________________________________________________________________________ -inline sal_Bool BaseReference::operator == ( const BaseReference & rRef ) const +inline sal_Bool BaseReference::operator == ( const BaseReference & rRef ) const throw () { if (_pInterface == rRef._pInterface) return sal_True; @@ -125,7 +125,7 @@ inline sal_Bool BaseReference::operator == ( const BaseReference & rRef ) const return (x1.get() == x2.get()); } //__________________________________________________________________________________________________ -inline void BaseReference::set( XInterface * pInterface ) +inline void BaseReference::set( XInterface * pInterface ) throw () { if (pInterface != _pInterface) { @@ -137,7 +137,7 @@ inline void BaseReference::set( XInterface * pInterface ) } } //__________________________________________________________________________________________________ -inline void BaseReference::clear() +inline void BaseReference::clear() throw () { if (_pInterface) { @@ -148,14 +148,16 @@ inline void BaseReference::clear() //__________________________________________________________________________________________________ template< class interface_type > -inline Reference< interface_type > & Reference< interface_type >::operator = ( interface_type * pInterface ) +inline Reference< interface_type > & Reference< interface_type >::operator = ( + interface_type * pInterface ) throw () { BaseReference::set( pInterface ); return *this; } //__________________________________________________________________________________________________ template< class interface_type > -inline Reference< interface_type > Reference< interface_type >::query( XInterface * pInterface ) +inline Reference< interface_type > Reference< interface_type >::query( + XInterface * pInterface ) throw () { const Type & rType = ::getCppuType( (const Reference< interface_type > *)0 ); return Reference< interface_type >( reinterpret_cast< XInterface * >( diff --git a/cppu/inc/com/sun/star/uno/Sequence.h b/cppu/inc/com/sun/star/uno/Sequence.h index f6e62ffb9260..fd476d2bfa43 100644 --- a/cppu/inc/com/sun/star/uno/Sequence.h +++ b/cppu/inc/com/sun/star/uno/Sequence.h @@ -2,9 +2,9 @@ * * $RCSfile: Sequence.h,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: pluby $ $Date: 2000-10-10 17:39:11 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -115,13 +115,13 @@ class Sequence public: // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) throw() + inline static void * SAL_CALL operator new( size_t nSize ) throw () { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) throw() + inline static void SAL_CALL operator delete( void * pMem ) throw () { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) throw() + inline static void * SAL_CALL operator new( size_t, void * pMem ) throw () { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) throw() + inline static void SAL_CALL operator delete( void *, void * ) throw () {} // static pointer to typelib type @@ -136,31 +136,31 @@ public: Creates an empty sequence. <br> */ - inline Sequence< E >(); + inline Sequence< E >() throw (); /** Copy constructor: Creates a copy of given sequence. <br> @param rSeq another sequence of same type */ - inline Sequence< E >( const Sequence< E > & rSeq ); + inline Sequence< E >( const Sequence< E > & rSeq ) throw (); /** Constructor: Creates a copy of given elements. <br> @param pElement an array of elements @param len length of array */ - inline Sequence< E >( const E * pElements, sal_Int32 len ); + inline Sequence< E >( const E * pElements, sal_Int32 len ) throw (); /** Constructor: Creates a default constructed sequence of given length. <br> @param len initial sequence length */ - inline Sequence< E >( sal_Int32 len ); + inline Sequence< E >( sal_Int32 len ) throw (); /** Destructor: Releases sequence handle. Last handle will destruct elements and free memory. <br> */ - inline ~Sequence< E >(); + inline ~Sequence< E >() throw (); /** Assignment operator: Acquires given sequence handle and releases previously set handle. @@ -168,19 +168,19 @@ public: @param rSeq another sequence of same type @return this sequence */ - inline Sequence< E > & SAL_CALL operator = ( const Sequence< E > & rSeq ); + inline Sequence< E > & SAL_CALL operator = ( const Sequence< E > & rSeq ) throw (); /** Gets type of elements. <br> @return type of element */ - inline const Type & getElementType() const + inline const Type & getElementType() const throw () { return ::getCppuType( (const ElementType *)0 ); } /** Gets length of sequence. <br> @return length of sequence */ - inline sal_Int32 SAL_CALL getLength() const + inline sal_Int32 SAL_CALL getLength() const throw () { return _pSequence->nElements; } /** Gets a pointer to elements array for <b>reading</b>. @@ -188,7 +188,7 @@ public: <br> @return pointer to elements array */ - inline const E * SAL_CALL getConstArray() const + inline const E * SAL_CALL getConstArray() const throw () { return reinterpret_cast< const E * >( _pSequence->elements ); } /** Gets a pointer to elements array for <b>reading and writing</b>.<br> In general if the sequence has a handle acquired by other sequences @@ -198,7 +198,7 @@ public: <br> @return pointer to elements array */ - inline E * SAL_CALL getArray(); + inline E * SAL_CALL getArray() throw (); /** Non-const index operator: Obtains a reference to element indexed at given position.<br> @@ -210,7 +210,7 @@ public: @param nIndex index @return non-const C++ reference to element */ - inline E & SAL_CALL operator [] ( sal_Int32 nIndex ); + inline E & SAL_CALL operator [] ( sal_Int32 nIndex ) throw (); /** Const index operator: Obtains a reference to element indexed at given position.<br> The implementation does <b>not</b> check for array bounds!<br> @@ -218,7 +218,7 @@ public: @param nIndex index @return const C++ reference to element */ - inline const E & SAL_CALL operator [] ( sal_Int32 nIndex ) const; + inline const E & SAL_CALL operator [] ( sal_Int32 nIndex ) const throw (); /** Equality operator: Compares two sequences. @@ -226,14 +226,14 @@ public: @param rSeq another sequence of same type (right side) @return true if both sequences are equal, false otherwise */ - inline sal_Bool SAL_CALL operator == ( const Sequence< E > & rSeq ) const; + inline sal_Bool SAL_CALL operator == ( const Sequence< E > & rSeq ) const throw (); /** Unequality operator: Compares two sequences. <br> @param rSeq another sequence of same type (right side) @return false if both sequences are equal, true otherwise */ - inline sal_Bool SAL_CALL operator != ( const Sequence< E > & rSeq ) const + inline sal_Bool SAL_CALL operator != ( const Sequence< E > & rSeq ) const throw () { return (! operator == ( rSeq )); } /** Reallocates sequence to new length. @@ -247,7 +247,7 @@ public: <br> @param nSize new size of sequence */ - inline void SAL_CALL realloc( sal_Int32 nSize ); + inline void SAL_CALL realloc( sal_Int32 nSize ) throw (); }; /** Creates an UNO byte sequence from a SAL byte sequence. @@ -256,7 +256,7 @@ public: @return an UNO byte sequence */ inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence( - const ::rtl::ByteSequence & rByteSequence ); + const ::rtl::ByteSequence & rByteSequence ) throw (); } } @@ -270,7 +270,7 @@ inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence( */ template< class S > inline const ::com::sun::star::uno::Type & -SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * ); +SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * ) throw (); /** Gets the meta type of IDL <b>sequence< char ></b>. This function has been introduced due to ambiguities with unsigned short. @@ -279,6 +279,6 @@ SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * ); @return type of IDL <b>sequence< char ></b> */ inline const ::com::sun::star::uno::Type & -SAL_CALL getCharSequenceCppuType(); +SAL_CALL getCharSequenceCppuType() throw (); #endif diff --git a/cppu/inc/com/sun/star/uno/Sequence.hxx b/cppu/inc/com/sun/star/uno/Sequence.hxx index 9ad96f8459e6..6f514dabae3b 100644 --- a/cppu/inc/com/sun/star/uno/Sequence.hxx +++ b/cppu/inc/com/sun/star/uno/Sequence.hxx @@ -2,9 +2,9 @@ * * $RCSfile: Sequence.hxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: dbo $ $Date: 2000-11-15 12:28:26 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -103,21 +103,21 @@ typelib_TypeDescriptionReference * Sequence< E >::s_pType = 0; //__________________________________________________________________________________________________ template< class E > -inline Sequence< E >::Sequence() +inline Sequence< E >::Sequence() throw () { const Type & rType = ::getCppuType( this ); ::uno_type_sequence_construct( &_pSequence, rType.getTypeLibType(), 0, 0, cpp_acquire ); } //__________________________________________________________________________________________________ template< class E > -inline Sequence< E >::Sequence( const Sequence< E > & rSeq ) +inline Sequence< E >::Sequence( const Sequence< E > & rSeq ) throw () { ::osl_incrementInterlockedCount( &rSeq._pSequence->nRefCount ); _pSequence = rSeq._pSequence; } //__________________________________________________________________________________________________ template< class E > -inline Sequence< E >::Sequence( const E * pElements, sal_Int32 len ) +inline Sequence< E >::Sequence( const E * pElements, sal_Int32 len ) throw () { const Type & rType = ::getCppuType( this ); ::uno_type_sequence_construct( &_pSequence, rType.getTypeLibType(), @@ -125,70 +125,74 @@ inline Sequence< E >::Sequence( const E * pElements, sal_Int32 len ) } //__________________________________________________________________________________________________ template< class E > -inline Sequence< E >::Sequence( sal_Int32 len ) +inline Sequence< E >::Sequence( sal_Int32 len ) throw () { const Type & rType = ::getCppuType( this ); ::uno_type_sequence_construct( &_pSequence, rType.getTypeLibType(), 0, len, cpp_acquire ); } //__________________________________________________________________________________________________ template< class E > -inline Sequence< E >::~Sequence() +inline Sequence< E >::~Sequence() throw () { const Type & rType = ::getCppuType( this ); ::uno_type_destructData( this, rType.getTypeLibType(), cpp_release ); } //__________________________________________________________________________________________________ template< class E > -inline Sequence< E > & Sequence< E >::operator = ( const Sequence< E > & rSeq ) +inline Sequence< E > & Sequence< E >::operator = ( const Sequence< E > & rSeq ) throw () { const Type & rType = ::getCppuType( this ); - ::uno_type_sequence_assign( &_pSequence, rSeq._pSequence, rType.getTypeLibType(), cpp_release ); + ::uno_type_sequence_assign( + &_pSequence, rSeq._pSequence, rType.getTypeLibType(), cpp_release ); return *this; } //__________________________________________________________________________________________________ template< class E > -inline sal_Bool Sequence< E >::operator == ( const Sequence< E > & rSeq ) const +inline sal_Bool Sequence< E >::operator == ( const Sequence< E > & rSeq ) const throw () { if (_pSequence == rSeq._pSequence) return sal_True; const Type & rType = ::getCppuType( this ); - return ::uno_type_equalData( const_cast< Sequence< E > * >( this ), rType.getTypeLibType(), - const_cast< Sequence< E > * >( &rSeq ), rType.getTypeLibType(), - cpp_queryInterface, cpp_release ); + return ::uno_type_equalData( + const_cast< Sequence< E > * >( this ), rType.getTypeLibType(), + const_cast< Sequence< E > * >( &rSeq ), rType.getTypeLibType(), + cpp_queryInterface, cpp_release ); } //__________________________________________________________________________________________________ template< class E > -inline E * Sequence< E >::getArray() +inline E * Sequence< E >::getArray() throw () { const Type & rType = ::getCppuType( this ); - ::uno_type_sequence_reference2One( &_pSequence, rType.getTypeLibType(), cpp_acquire, cpp_release ); + ::uno_type_sequence_reference2One( + &_pSequence, rType.getTypeLibType(), cpp_acquire, cpp_release ); return reinterpret_cast< E * >( _pSequence->elements ); } //__________________________________________________________________________________________________ template< class E > -inline E & Sequence< E >::operator [] ( sal_Int32 nIndex ) +inline E & Sequence< E >::operator [] ( sal_Int32 nIndex ) throw () { OSL_ENSURE( nIndex >= 0 && nIndex < getLength(), "### illegal index of sequence!" ); return getArray()[ nIndex ]; } //__________________________________________________________________________________________________ template< class E > -inline const E & Sequence< E >::operator [] ( sal_Int32 nIndex ) const +inline const E & Sequence< E >::operator [] ( sal_Int32 nIndex ) const throw () { OSL_ENSURE( nIndex >= 0 && nIndex < getLength(), "### illegal index of sequence!" ); return getConstArray()[ nIndex ]; } //__________________________________________________________________________________________________ template< class E > -inline void Sequence< E >::realloc( sal_Int32 nSize ) +inline void Sequence< E >::realloc( sal_Int32 nSize ) throw () { const Type & rType = ::getCppuType( this ); - ::uno_type_sequence_realloc( &_pSequence, rType.getTypeLibType(), nSize, cpp_acquire, cpp_release ); + ::uno_type_sequence_realloc( + &_pSequence, rType.getTypeLibType(), nSize, cpp_acquire, cpp_release ); } //-------------------------------------------------------------------------------------------------- inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence( - const ::rtl::ByteSequence & rByteSequence ) + const ::rtl::ByteSequence & rByteSequence ) throw () { return ::com::sun::star::uno::Sequence< sal_Int8 >( * reinterpret_cast< const ::com::sun::star::uno::Sequence< sal_Int8 > * >( &rByteSequence ) ); @@ -202,7 +206,7 @@ inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence( // generic sequence template template< class S > inline const ::com::sun::star::uno::Type & -SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * ) +SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * ) throw () { if (! ::com::sun::star::uno::Sequence< S >::s_pType) { @@ -222,7 +226,7 @@ static typelib_TypeDescriptionReference * s_pType_com_sun_star_uno_Sequence_Char // char sequence inline const ::com::sun::star::uno::Type & -SAL_CALL getCharSequenceCppuType() +SAL_CALL getCharSequenceCppuType() throw () { #if !( (defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500)) || (defined(__GNUC__) && defined(__APPLE__)) ) static typelib_TypeDescriptionReference * s_pType_com_sun_star_uno_Sequence_Char = 0; diff --git a/cppu/inc/com/sun/star/uno/Type.h b/cppu/inc/com/sun/star/uno/Type.h index 7765d4e910ce..f487574c75ae 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.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:51 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -119,20 +119,20 @@ class Type public: // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) throw() + inline static void * SAL_CALL operator new( size_t nSize ) throw () { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) throw() + inline static void SAL_CALL operator delete( void * pMem ) throw () { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) throw() + inline static void * SAL_CALL operator new( size_t, void * pMem ) throw () { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) throw() + inline static void SAL_CALL operator delete( void *, void * ) throw () {} /** Default Constructor: Type is set to void. <br> */ - inline Type(); + inline Type() throw (); /** Constructor: Type is constructed by given name and type class. @@ -140,7 +140,7 @@ public: @param eTypeClass type class of type @param rTypeName name of type */ - inline Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ); + inline Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ) throw (); /** Constructor: Type is constructed by given name and type class. @@ -148,14 +148,14 @@ public: @param eTypeClass type class of type @param pTypeName name of type */ - inline Type( TypeClass eTypeClass, const sal_Char * pTypeName ); + inline Type( TypeClass eTypeClass, const sal_Char * pTypeName ) throw (); /** Constructor: Type is (copy) constructed by given C type description reference. <br> @param pType C type description reference */ - inline Type( typelib_TypeDescriptionReference * pType ); + inline Type( typelib_TypeDescriptionReference * pType ) throw (); /** Constructor: Type is (copy) constructed by given C type description reference without acquiring it. @@ -163,20 +163,20 @@ public: @param pType C type description reference @param dummy UNO_TYPE_NO_ACQUIRE to force obvious distinction to other constructors */ - inline Type( typelib_TypeDescriptionReference * pType, __UnoType_NoAcquire ); + inline Type( typelib_TypeDescriptionReference * pType, __UnoType_NoAcquire ) throw (); /** Copy constructor: Type is copy constructed by given type. <br> @param rType another type */ - inline Type( const Type & rType ); + inline Type( const Type & rType ) throw (); /** Destructor: Releases acquired C type description reference. <br> */ - inline ~Type() + inline ~Type() throw () { ::typelib_typedescriptionreference_release( _pType ); } /** Assignment operator: @@ -185,27 +185,27 @@ public: @param rType another type (right side) @return this type */ - inline Type & SAL_CALL operator = ( const Type & rType ); + inline Type & SAL_CALL operator = ( const Type & rType ) throw (); /** Gets the type class of set type. <br> @return type class of set type */ - inline TypeClass SAL_CALL getTypeClass() const + inline TypeClass SAL_CALL getTypeClass() const throw () { return (TypeClass)_pType->eTypeClass; } /** Gets the name of the set type. <br> @return name of the set type */ - inline ::rtl::OUString SAL_CALL getTypeName() const + inline ::rtl::OUString SAL_CALL getTypeName() const throw () { return ::rtl::OUString( _pType->pTypeName ); } /** Obtains a full type description of set type. <br> @param ppDescr [inout] type description */ - inline void SAL_CALL getDescription( typelib_TypeDescription ** ppDescr ) const + inline void SAL_CALL getDescription( typelib_TypeDescription ** ppDescr ) const throw () { ::typelib_typedescriptionreference_getDescription( ppDescr, _pType ); } /** Gets the C typelib type description reference pointer. @@ -213,7 +213,7 @@ public: <br> @return <b>un</b>acquired type description reference */ - inline typelib_TypeDescriptionReference * SAL_CALL getTypeLibType() const + inline typelib_TypeDescriptionReference * SAL_CALL getTypeLibType() const throw () { return _pType; } /** Compares two types. @@ -221,7 +221,7 @@ public: @param rType another type @return true if both types refer the same type, false otherwise */ - inline sal_Bool SAL_CALL equals( const Type & rType ) const + inline sal_Bool SAL_CALL equals( const Type & rType ) const throw () { return ::typelib_typedescriptionreference_equals( _pType, rType._pType ); } /** Equality operator: Compares two types. @@ -229,7 +229,7 @@ public: @param rType another type @return true if both types refer the same type, false otherwise */ - inline sal_Bool SAL_CALL operator == ( const Type & rType ) const + inline sal_Bool SAL_CALL operator == ( const Type & rType ) const throw () { return equals( rType ); } /** Unequality operator: Compares two types. @@ -237,7 +237,7 @@ public: @param rType another type @return false if both types refer the same type, true otherwise */ - inline sal_Bool SAL_CALL operator != ( const Type & rType ) const + inline sal_Bool SAL_CALL operator != ( const Type & rType ) const throw () { return (! equals( rType )); } }; @@ -251,114 +251,114 @@ public: @param dummy typed pointer for function signature @return type of IDL type <b>type</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * ); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * ) throw (); /** Gets the meta type of IDL type <b>void</b>. @return type of IDL type <b>void</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType(); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType() throw (); /** Gets the meta type of IDL type <b>void</b>. <br> @return type of IDL type <b>void</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType(); +inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType() throw (); /** Gets the meta type of IDL type <b>boolean</b>. <br> @return type of IDL type <b>boolean</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType(); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType() throw (); /** Gets the meta type of IDL type <b>boolean</b>. <br> @return type of IDL type <b>boolean</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType(); +inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() throw (); /** Gets the meta type of IDL type <b>boolean</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>boolean</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * ); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * ) throw (); /** Gets the meta type of IDL type <b>char</b>. <br> @return type of IDL type <b>char</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType(); +inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType() throw (); /** Gets the meta type of IDL type <b>char</b>. <br> @return type of IDL type <b>char</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType(); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() throw (); /** Gets the meta type of IDL type <b>byte</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>byte</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * ); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * ) throw (); /** Gets the meta type of IDL type <b>string</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>string</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * ); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * ) throw (); /** Gets the meta type of IDL type <b>short</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>short</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * ); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * ) throw (); /** Gets the meta type of IDL type <b>unsigned short</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>unsigned short</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * ); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * ) throw (); /** Gets the meta type of IDL type <b>long</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>long</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * ); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * ) throw (); /** Gets the meta type of IDL type <b>unsigned long</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>unsigned long</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * ); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * ) throw (); /** Gets the meta type of IDL type <b>hyper</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>hyper</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * ); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * ) throw (); /** Gets the meta type of IDL type <b>unsigned hyper</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>unsigned hyper</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * ); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * ) throw (); /** Gets the meta type of IDL type <b>float</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>float</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ) throw (); /** Gets the meta type of IDL type <b>double</b>. <br> @param dummy typed pointer for function signature @return type of IDL type <b>double</b> */ -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ); +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ) throw (); #endif diff --git a/cppu/inc/com/sun/star/uno/Type.hxx b/cppu/inc/com/sun/star/uno/Type.hxx index f40eb7fb602d..bdcaa408b3b4 100644 --- a/cppu/inc/com/sun/star/uno/Type.hxx +++ b/cppu/inc/com/sun/star/uno/Type.hxx @@ -2,9 +2,9 @@ * * $RCSfile: Type.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:51 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -84,43 +84,43 @@ namespace uno { //__________________________________________________________________________________________________ -inline Type::Type() +inline Type::Type() throw () { _pType = reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_VOID ) )->getTypeLibType(); ::typelib_typedescriptionreference_acquire( _pType ); } //__________________________________________________________________________________________________ -inline Type::Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ) +inline Type::Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ) throw () : _pType( 0 ) { ::typelib_typedescriptionreference_new( &_pType, (typelib_TypeClass)eTypeClass, rTypeName.pData ); } //__________________________________________________________________________________________________ -inline Type::Type( TypeClass eTypeClass, const sal_Char * pTypeName ) +inline Type::Type( TypeClass eTypeClass, const sal_Char * pTypeName ) throw () : _pType( 0 ) { ::typelib_typedescriptionreference_newByAsciiName( &_pType, (typelib_TypeClass)eTypeClass, pTypeName ); } //__________________________________________________________________________________________________ -inline Type::Type( typelib_TypeDescriptionReference * pType ) +inline Type::Type( typelib_TypeDescriptionReference * pType ) throw () : _pType( pType ) { ::typelib_typedescriptionreference_acquire( _pType ); } //__________________________________________________________________________________________________ -inline Type::Type( typelib_TypeDescriptionReference * pType, __UnoType_NoAcquire ) +inline Type::Type( typelib_TypeDescriptionReference * pType, __UnoType_NoAcquire ) throw () : _pType( pType ) { } //__________________________________________________________________________________________________ -inline Type::Type( const Type & rType ) +inline Type::Type( const Type & rType ) throw () : _pType( rType._pType ) { ::typelib_typedescriptionreference_acquire( _pType ); } //__________________________________________________________________________________________________ -inline Type & Type::operator = ( const Type & rType ) +inline Type & Type::operator = ( const Type & rType ) throw () { ::typelib_typedescriptionreference_assign( &_pType, rType._pType ); return *this; @@ -131,105 +131,105 @@ inline Type & Type::operator = ( const Type & rType ) } } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * ) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * ) throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_TYPE ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType() +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType() throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_VOID ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType() +inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType() throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_VOID ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType() +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType() throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_BOOLEAN ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() +inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_BOOLEAN ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * ) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * ) throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_BOOLEAN ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType() +inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType() throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_CHAR ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_CHAR ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * ) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * ) throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_BYTE ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * ) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * ) throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_STRING ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * ) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * ) throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_SHORT ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * ) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * ) throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_UNSIGNED_SHORT ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * ) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * ) throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_LONG ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * ) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * ) throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_UNSIGNED_LONG ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * ) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * ) throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_HYPER ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * ) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * ) throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_UNSIGNED_HYPER ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ) throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_FLOAT ) ); } -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ) +inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ) throw () { return * reinterpret_cast< const ::com::sun::star::uno::Type * >( ::typelib_static_type_getByTypeClass( typelib_TypeClass_DOUBLE ) ); diff --git a/cppu/inc/com/sun/star/uno/genfunc.h b/cppu/inc/com/sun/star/uno/genfunc.h index 853fb6828020..9741b6b722c5 100644 --- a/cppu/inc/com/sun/star/uno/genfunc.h +++ b/cppu/inc/com/sun/star/uno/genfunc.h @@ -2,9 +2,9 @@ * * $RCSfile: genfunc.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:51 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -82,19 +82,20 @@ extern "C" <br> @param pCppI C++ interface pointer */ -inline void SAL_CALL cpp_acquire( void * pCppI ); +inline void SAL_CALL cpp_acquire( void * pCppI ) throw (); /** C function to release a C++ interface. <br> @param pCppI C++ interface pointer */ -inline void SAL_CALL cpp_release( void * pCppI ); +inline void SAL_CALL cpp_release( void * pCppI ) throw (); /** C function to query for a C++ interface. <br> @param pCppI C++ interface pointer @param pType demanded interface type @return acquired C++ interface pointer or null */ -inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescriptionReference * pType ); +inline void * SAL_CALL cpp_queryInterface( + void * pCppI, typelib_TypeDescriptionReference * pType ) throw (); } } diff --git a/cppu/inc/com/sun/star/uno/genfunc.hxx b/cppu/inc/com/sun/star/uno/genfunc.hxx index e392126a76c9..32df26f63f45 100644 --- a/cppu/inc/com/sun/star/uno/genfunc.hxx +++ b/cppu/inc/com/sun/star/uno/genfunc.hxx @@ -2,9 +2,9 @@ * * $RCSfile: genfunc.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:51 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -85,17 +85,18 @@ namespace uno extern "C" { //================================================================================================== -inline void SAL_CALL cpp_acquire( void * pCppI ) +inline void SAL_CALL cpp_acquire( void * pCppI ) throw () { reinterpret_cast< XInterface * >( pCppI )->acquire(); } //================================================================================================== -inline void SAL_CALL cpp_release( void * pCppI ) +inline void SAL_CALL cpp_release( void * pCppI ) throw () { reinterpret_cast< XInterface * >( pCppI )->release(); } //================================================================================================== -inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescriptionReference * pType ) +inline void * SAL_CALL cpp_queryInterface( + void * pCppI, typelib_TypeDescriptionReference * pType ) throw () { if (pCppI) { diff --git a/cppu/inc/typelib/typeclass.h b/cppu/inc/typelib/typeclass.h index 7cace8fe0a6a..da775d115626 100644 --- a/cppu/inc/typelib/typeclass.h +++ b/cppu/inc/typelib/typeclass.h @@ -2,9 +2,9 @@ * * $RCSfile: typeclass.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:51 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -67,9 +67,8 @@ /** This type class enum is binary compatible with the IDL enum com.sun.star.uno.TypeClass. - <br> */ -enum typelib_TypeClass +typedef enum _typelib_TypeClass { /** type class of void<br> */ typelib_TypeClass_VOID = 0, @@ -128,6 +127,6 @@ enum typelib_TypeClass /** type class of unknown<br> */ typelib_TypeClass_UNKNOWN = 27, typelib_TypeClass_MAKE_FIXED_SIZE = SAL_MAX_ENUM -}; +} typelib_TypeClass; #endif diff --git a/cppu/inc/typelib/typedescription.h b/cppu/inc/typelib/typedescription.h index 81244f0d5158..d526200f5a38 100644 --- a/cppu/inc/typelib/typedescription.h +++ b/cppu/inc/typelib/typedescription.h @@ -2,9 +2,9 @@ * * $RCSfile: typedescription.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:51 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -74,13 +74,13 @@ #include <rtl/ustring.h> #endif -typedef struct _typelib_TypeDescription typelib_TypeDescription; - #ifdef __cplusplus extern "C" { #endif +typedef struct _typelib_TypeDescription typelib_TypeDescription; + #ifdef SAL_W32 #pragma pack(push, 8) #elif defined(SAL_OS2) @@ -489,7 +489,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newUnion( sal_Int64 nDefaultDiscriminant, typelib_TypeDescriptionReference * pDefaultTypeRef, sal_Int32 nMembers, - typelib_Union_Init * pMembers ); + typelib_Union_Init * pMembers ) SAL_THROW (); /** Creates an enum type description. <br> @@ -506,7 +506,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newEnum( sal_Int32 nDefaultValue, sal_Int32 nEnumValues, rtl_uString ** ppEnumNames, - sal_Int32 * pEnumValues ); + sal_Int32 * pEnumValues ) SAL_THROW (); /** Creates a new type description. <br> @@ -524,7 +524,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_new( rtl_uString * pTypeName, typelib_TypeDescriptionReference * pType, sal_Int32 nMembers, - typelib_CompoundMember_Init * pMembers ); + typelib_CompoundMember_Init * pMembers ) SAL_THROW (); /** Creates an interface type description. <br> @@ -545,7 +545,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newInterface( sal_uInt32 nUik1, sal_uInt16 nUik2, sal_uInt16 nUik3, sal_uInt32 nUik4, sal_uInt32 nUik5, typelib_TypeDescriptionReference * pBaseInterface, sal_Int32 nMembers, - typelib_TypeDescriptionReference ** ppMembers ); + typelib_TypeDescriptionReference ** ppMembers ) SAL_THROW (); /** Creates an interface method type description. <br> @@ -570,7 +570,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newInterfaceMethod( sal_Int32 nParams, typelib_Parameter_Init * pParams, sal_Int32 nExceptions, - rtl_uString ** ppExceptionNames ); + rtl_uString ** ppExceptionNames ) SAL_THROW (); /** Creates an interface attribute type description. <br> @@ -586,20 +586,22 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newInterfaceAttribute( rtl_uString * pAttributeName, typelib_TypeClass eAttributeTypeClass, rtl_uString * pAttributeTypeName, - sal_Bool bReadOnly ); + sal_Bool bReadOnly ) SAL_THROW (); /** Increments reference count of given type description. <br> @param pDesc type description */ -SAL_DLLEXPORT void SAL_CALL typelib_typedescription_acquire( typelib_TypeDescription * pDesc ); +SAL_DLLEXPORT void SAL_CALL typelib_typedescription_acquire( + typelib_TypeDescription * pDesc ) SAL_THROW (); /** Decrements reference count of given type.<br> If reference count reaches 0, the trype description is deleted. <br> @param pDesc type description */ -SAL_DLLEXPORT void SAL_CALL typelib_typedescription_release( typelib_TypeDescription * pDesc ); +SAL_DLLEXPORT void SAL_CALL typelib_typedescription_release( + typelib_TypeDescription * pDesc ) SAL_THROW (); /** Registers a type description and creates a type description reference.<br> Type descriptions will be registered automatically if they are provided @@ -607,7 +609,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_release( typelib_TypeDescrip @param ppNewDescription inout description to be registered; */ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_register( - typelib_TypeDescription ** ppNewDescription ); + typelib_TypeDescription ** ppNewDescription ) SAL_THROW (); /** Tests whether two types descriptions are equal, i.e. type class and names are equal. <br> @@ -616,7 +618,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_register( @return true, if type descriptions are equal */ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_equals( - const typelib_TypeDescription * p1, const typelib_TypeDescription * p2 ); + const typelib_TypeDescription * p1, const typelib_TypeDescription * p2 ) SAL_THROW (); /** Retrieves a type description via its fully qualified name. <br> @@ -624,13 +626,14 @@ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_equals( @param pName name demanded type description */ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_getByName( - typelib_TypeDescription ** ppRet, rtl_uString * pName ); + typelib_TypeDescription ** ppRet, rtl_uString * pName ) SAL_THROW (); /** Sets size of type description cache. <br> @param nNewSize new size of cache */ -SAL_DLLEXPORT void SAL_CALL typelib_setCacheSize( sal_Int32 nNewSize ); +SAL_DLLEXPORT void SAL_CALL typelib_setCacheSize( + sal_Int32 nNewSize ) SAL_THROW (); /** Function pointer declaration of callback function get additional descriptions. Callbacks <b>must</b> provide <b>complete</b> type descriptions! @@ -648,7 +651,7 @@ typedef void (SAL_CALL * typelib_typedescription_Callback)( @param pCallback callback function */ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_registerCallback( - void * pContext, typelib_typedescription_Callback pCallback ); + void * pContext, typelib_typedescription_Callback pCallback ) SAL_THROW (); /** Revokes a previously registered callback function. <br> @@ -656,7 +659,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_registerCallback( @param pCallback registered callback function */ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_revokeCallback( - void * pContext, typelib_typedescription_Callback pCallback ); + void * pContext, typelib_typedescription_Callback pCallback ) SAL_THROW (); /*----------------------------------------------------------------------------*/ @@ -716,7 +719,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_revokeCallback( SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_new( typelib_TypeDescriptionReference ** ppTDR, typelib_TypeClass eTypeClass, - rtl_uString * pTypeName ); + rtl_uString * pTypeName ) SAL_THROW (); /** Creates a type description reference.<br> This is a weak reference <b>not</b> holding the description. @@ -729,14 +732,14 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_new( SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_newByAsciiName( typelib_TypeDescriptionReference ** ppTDR, typelib_TypeClass eTypeClass, - const sal_Char * pTypeName ); + const sal_Char * pTypeName ) SAL_THROW (); /** Increments reference count of type description reference. <br> @param pRef type description reference */ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_acquire( - typelib_TypeDescriptionReference * pRef ); + typelib_TypeDescriptionReference * pRef ) SAL_THROW (); /** Increments reference count of type description reference. If the reference count reaches 0, the reference is deleted. @@ -744,7 +747,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_acquire( @param pRef type description reference */ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_release( - typelib_TypeDescriptionReference * pRef ); + typelib_TypeDescriptionReference * pRef ) SAL_THROW (); /** Retrieves the type description for a given reference.<br> If it is not possible to resolve the reference, null is returned. @@ -752,7 +755,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_release( @param ppRet inout type description */ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_getDescription( - typelib_TypeDescription ** ppRet, typelib_TypeDescriptionReference * pRef ); + typelib_TypeDescription ** ppRet, typelib_TypeDescriptionReference * pRef ) SAL_THROW (); /** Tests whether two types description references are equal, i.e. type class and names are equal. <br> @@ -761,7 +764,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_getDescription( @return true, if type description references are equal */ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_equals( - const typelib_TypeDescriptionReference * p1, const typelib_TypeDescriptionReference * p2 ); + const typelib_TypeDescriptionReference * p1, const typelib_TypeDescriptionReference * p2 ) SAL_THROW (); /** Assigns a type. <br> @@ -770,7 +773,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_equals( */ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_assign( typelib_TypeDescriptionReference ** ppDest, - typelib_TypeDescriptionReference * pSource ); + typelib_TypeDescriptionReference * pSource ) SAL_THROW (); /** Tests if values of type pAssignable can be assigned by values of type pFrom. This includes widening conversion (e.g., long assignable from short), as long @@ -781,7 +784,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_assign( */ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_isAssignableFrom( typelib_TypeDescription * pAssignable, - typelib_TypeDescription * pFrom ); + typelib_TypeDescription * pFrom ) SAL_THROW (); /** Tests if values of type pAssignable can be assigned by values of type pFrom. This includes widening conversion (e.g., long assignable from short), as long @@ -792,7 +795,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_isAssignableFrom( */ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_isAssignableFrom( typelib_TypeDescriptionReference * pAssignable, - typelib_TypeDescriptionReference * pFrom ); + typelib_TypeDescriptionReference * pFrom ) SAL_THROW (); /** Gets static type reference of standard types by type class. ==OPTIMIZATION HACK==: @@ -805,7 +808,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_isAssignableFro @return pointer to type reference pointer */ SAL_DLLEXPORT typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass( - typelib_TypeClass eTypeClass ); + typelib_TypeClass eTypeClass ) SAL_THROW (); /** Inits static type reference. Thread synchronizes on typelib init mutex. @@ -816,7 +819,7 @@ SAL_DLLEXPORT typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_g */ SAL_DLLEXPORT void SAL_CALL typelib_static_type_init( typelib_TypeDescriptionReference ** ppRef, - typelib_TypeClass eTypeClass, const sal_Char * pTypeName ); + typelib_TypeClass eTypeClass, const sal_Char * pTypeName ) SAL_THROW (); /** Inits static sequence type reference. Thread synchronizes on typelib init mutex. @@ -826,7 +829,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_type_init( */ SAL_DLLEXPORT void SAL_CALL typelib_static_sequence_type_init( typelib_TypeDescriptionReference ** ppRef, - typelib_TypeDescriptionReference * pElementType ); + typelib_TypeDescriptionReference * pElementType ) SAL_THROW (); /** Inits <b>in</b>complete static compound type reference. Thread synchronizes on typelib init mutex. @@ -842,7 +845,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_compound_type_init( typelib_TypeDescriptionReference ** ppRef, typelib_TypeClass eTypeClass, const sal_Char * pTypeName, typelib_TypeDescriptionReference * pBaseType, - sal_Int32 nMembers, typelib_TypeDescriptionReference ** ppMembers ); + sal_Int32 nMembers, typelib_TypeDescriptionReference ** ppMembers ) SAL_THROW (); /** Inits <b>in</b>complete static interface type reference. Thread synchronizes on typelib init mutex. @@ -854,7 +857,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_compound_type_init( SAL_DLLEXPORT void SAL_CALL typelib_static_interface_type_init( typelib_TypeDescriptionReference ** ppRef, const sal_Char * pTypeName, - typelib_TypeDescriptionReference * pBaseType ); + typelib_TypeDescriptionReference * pBaseType ) SAL_THROW (); /** Inits <b>in</b>complete static enum type reference. Thread synchronizes on typelib init mutex. @@ -866,7 +869,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_interface_type_init( SAL_DLLEXPORT void SAL_CALL typelib_static_enum_type_init( typelib_TypeDescriptionReference ** ppRef, const sal_Char * pTypeName, - sal_Int32 nDefaultValue ); + sal_Int32 nDefaultValue ) SAL_THROW (); /** Inits <b>in</b>complete static compound type reference. Thread synchronizes on typelib init mutex. @@ -890,7 +893,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_union_type_init( typelib_TypeDescriptionReference * pDefaultType, sal_Int32 nMembers, sal_Int64 * pDiscriminants, - typelib_TypeDescriptionReference ** pMemberTypes ); + typelib_TypeDescriptionReference ** pMemberTypes ) SAL_THROW (); /** Completes a typedescription to be used for, e.g., marshalling values. COMPOUND, UNION, INTERFACE and ENUM type descriptions may be partly @@ -901,7 +904,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_union_type_init( @return true, if type description is complete */ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_complete( - typelib_TypeDescription ** ppTypeDescr ); + typelib_TypeDescription ** ppTypeDescr ) SAL_THROW (); #ifdef __cplusplus } diff --git a/cppu/inc/typelib/typedescription.hxx b/cppu/inc/typelib/typedescription.hxx index 305e54b59acc..2f7d75123178 100644 --- a/cppu/inc/typelib/typedescription.hxx +++ b/cppu/inc/typelib/typedescription.hxx @@ -2,9 +2,9 @@ * * $RCSfile: typedescription.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:51 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -100,37 +100,37 @@ public: <br> @param pTypeDescr a type description */ - inline TypeDescription( typelib_TypeDescription * pTypeDescr = 0 ); + inline TypeDescription( typelib_TypeDescription * pTypeDescr = 0 ) throw (); /** Constructor: <br> @param pTypeDescrRef a type description reference */ - inline TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ); + inline TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ) throw (); /** Constructor: <br> @param rType a type */ - inline TypeDescription( const ::com::sun::star::uno::Type & rType ); + inline TypeDescription( const ::com::sun::star::uno::Type & rType ) throw (); /** Copy constructor: <br> @param rDescr another TypeDescription */ - inline TypeDescription( const TypeDescription & rDescr ); + inline TypeDescription( const TypeDescription & rDescr ) throw (); /** Constructor: <br> @param pTypeName a type name */ - inline TypeDescription( rtl_uString * pTypeName ); + inline TypeDescription( rtl_uString * pTypeName ) throw (); /** Constructor: <br> @param rTypeName a type name */ - inline TypeDescription( const ::rtl::OUString & rTypeName ); + inline TypeDescription( const ::rtl::OUString & rTypeName ) throw (); /** Destructor: <br> releases type description */ - inline ~TypeDescription(); + inline ~TypeDescription() throw (); /** Assignment operator: acquires given type description and releases a set one. @@ -138,14 +138,14 @@ public: @param pTypeDescr another type description @return this TypeDescription */ - inline TypeDescription & operator = ( typelib_TypeDescription * pTypeDescr ); + inline TypeDescription & operator = ( typelib_TypeDescription * pTypeDescr ) throw (); /** Assignment operator: acquires given type description and releases a set one. <br> @param rTypeDescr another type description @return this TypeDescription */ - inline TypeDescription & operator =( const TypeDescription & rTypeDescr ) + inline TypeDescription & operator =( const TypeDescription & rTypeDescr ) throw () { return this->operator =( rTypeDescr.get() ); } /** Tests if two type descriptions are equal. @@ -153,81 +153,81 @@ public: @param pTypeDescr another type description @return true, if both type descriptions are equal, false otherwise */ - inline sal_Bool equals( const typelib_TypeDescription * pTypeDescr ) const; + inline sal_Bool equals( const typelib_TypeDescription * pTypeDescr ) const throw (); /** Tests if two type descriptions are equal. <br> @param rTypeDescr another type description @return true, if both type descriptions are equal, false otherwise */ - inline sal_Bool equals( const TypeDescription & rTypeDescr ) const + inline sal_Bool equals( const TypeDescription & rTypeDescr ) const throw () { return equals( rTypeDescr._pTypeDescr ); } /** Makes stored type description complete. <br> */ - inline void makeComplete() const; + inline void makeComplete() const throw (); /** Gets the <b>un</b>acquired type description pointer. <br> @return stored pointer of type description */ - inline typelib_TypeDescription * get() const + inline typelib_TypeDescription * get() const throw () { return _pTypeDescr; } /** Tests if a type description is set. <br> @return true, if a type description is set, false otherwise */ - inline sal_Bool is() const + inline sal_Bool is() const throw () { return (_pTypeDescr != 0); } }; //__________________________________________________________________________________________________ -inline TypeDescription::TypeDescription( typelib_TypeDescription * pTypeDescr ) +inline TypeDescription::TypeDescription( typelib_TypeDescription * pTypeDescr ) throw () : _pTypeDescr( pTypeDescr ) { if (_pTypeDescr) typelib_typedescription_acquire( _pTypeDescr ); } //__________________________________________________________________________________________________ -inline TypeDescription::TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ) +inline TypeDescription::TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ) throw () : _pTypeDescr( 0 ) { if (pTypeDescrRef) typelib_typedescriptionreference_getDescription( &_pTypeDescr, pTypeDescrRef ); } //__________________________________________________________________________________________________ -inline TypeDescription::TypeDescription( const ::com::sun::star::uno::Type & rType ) +inline TypeDescription::TypeDescription( const ::com::sun::star::uno::Type & rType ) throw () : _pTypeDescr( 0 ) { if (rType.getTypeLibType()) typelib_typedescriptionreference_getDescription( &_pTypeDescr, rType.getTypeLibType() ); } //__________________________________________________________________________________________________ -inline TypeDescription::TypeDescription( const TypeDescription & rTypeDescr ) +inline TypeDescription::TypeDescription( const TypeDescription & rTypeDescr ) throw () : _pTypeDescr( rTypeDescr._pTypeDescr ) { if (_pTypeDescr) typelib_typedescription_acquire( _pTypeDescr ); } //__________________________________________________________________________________________________ -inline TypeDescription::TypeDescription( rtl_uString * pTypeName ) +inline TypeDescription::TypeDescription( rtl_uString * pTypeName ) throw () : _pTypeDescr( 0 ) { typelib_typedescription_getByName( &_pTypeDescr , pTypeName ); } //__________________________________________________________________________________________________ -inline TypeDescription::TypeDescription( const ::rtl::OUString & rTypeName ) +inline TypeDescription::TypeDescription( const ::rtl::OUString & rTypeName ) throw () : _pTypeDescr( 0 ) { typelib_typedescription_getByName( &_pTypeDescr , rTypeName.pData ); } //__________________________________________________________________________________________________ -inline TypeDescription::~TypeDescription() +inline TypeDescription::~TypeDescription() throw () { if (_pTypeDescr) typelib_typedescription_release( _pTypeDescr ); } //__________________________________________________________________________________________________ -inline TypeDescription & TypeDescription::operator =( typelib_TypeDescription * pTypeDescr ) +inline TypeDescription & TypeDescription::operator = ( typelib_TypeDescription * pTypeDescr ) throw () { if (_pTypeDescr) typelib_typedescription_release( _pTypeDescr ); @@ -236,13 +236,13 @@ inline TypeDescription & TypeDescription::operator =( typelib_TypeDescription * return *this; } //__________________________________________________________________________________________________ -inline sal_Bool TypeDescription::equals( const typelib_TypeDescription * pTypeDescr ) const +inline sal_Bool TypeDescription::equals( const typelib_TypeDescription * pTypeDescr ) const throw () { return (_pTypeDescr && pTypeDescr && typelib_typedescription_equals( _pTypeDescr, pTypeDescr )); } //__________________________________________________________________________________________________ -inline void TypeDescription::makeComplete() const +inline void TypeDescription::makeComplete() const throw () { if (_pTypeDescr && !_pTypeDescr->bComplete) ::typelib_typedescription_complete( &_pTypeDescr ); diff --git a/cppu/inc/typelib/uik.h b/cppu/inc/typelib/uik.h index 7012817625f9..71945744444e 100644 --- a/cppu/inc/typelib/uik.h +++ b/cppu/inc/typelib/uik.h @@ -2,9 +2,9 @@ * * $RCSfile: uik.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:51 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -72,16 +72,15 @@ #endif /** Binary typelib uik struct. - <br> */ -struct typelib_Uik +typedef struct _typelib_Uik { sal_uInt32 m_Data1; sal_uInt16 m_Data2; sal_uInt16 m_Data3; sal_uInt32 m_Data4; sal_uInt32 m_Data5; -}; +} typelib_Uik; #ifdef SAL_W32 # pragma pack(pop) diff --git a/cppu/inc/uno/any2.h b/cppu/inc/uno/any2.h index 2cab2d06a446..ec5dcdadc29b 100644 --- a/cppu/inc/uno/any2.h +++ b/cppu/inc/uno/any2.h @@ -2,9 +2,9 @@ * * $RCSfile: any2.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:51 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -72,6 +72,7 @@ extern "C" { #endif + #ifdef SAL_W32 #pragma pack(push, 8) #elif defined(SAL_OS2) @@ -99,6 +100,35 @@ typedef struct _uno_Any #pragma pack() #endif +/** Assign an any with a given value. + Interfaces are acquired or released by the given callback functions. + <br> + @param pDest pointer memory of destination any + @param pSource pointer to source value; defaults (0) to default constructed value + @param pTypeDescr type description of value; defaults (0) to void + @param acquire function called each time an interface needs to be acquired; defaults (0) to uno + @param release function called each time an interface needs to be released; defaults (0) to uno +*/ +SAL_DLLEXPORT void SAL_CALL uno_any_assign( + uno_Any * pDest, void * pSource, + typelib_TypeDescription * pTypeDescr, + uno_AcquireFunc acquire, uno_ReleaseFunc release ) + SAL_THROW (); +/** Assign an any with a given value. + Interfaces are acquired or released by the given callback functions. + <br> + @param pDest pointer memory of destination any + @param pSource pointer to source value; defaults (0) to default constructed value + @param pTypeDescr type description of value; defaults (0) to void + @param acquire function called each time an interface needs to be acquired; defaults (0) to uno + @param release function called each time an interface needs to be released; defaults (0) to uno +*/ +SAL_DLLEXPORT void SAL_CALL uno_type_any_assign( + uno_Any * pDest, void * pSource, + typelib_TypeDescriptionReference * pType, + uno_AcquireFunc acquire, uno_ReleaseFunc release ) + SAL_THROW (); + /** Constructs an any with a given value. Interfaces are acquired by the given callback function. <br> @@ -110,7 +140,8 @@ typedef struct _uno_Any SAL_DLLEXPORT void SAL_CALL uno_any_construct( uno_Any * pDest, void * pSource, typelib_TypeDescription * pTypeDescr, - uno_AcquireFunc acquire ); + uno_AcquireFunc acquire ) + SAL_THROW (); /** Constructs an any with a given value. Interfaces are acquired by the given callback function. <br> @@ -122,7 +153,8 @@ SAL_DLLEXPORT void SAL_CALL uno_any_construct( SAL_DLLEXPORT void SAL_CALL uno_type_any_construct( uno_Any * pDest, void * pSource, typelib_TypeDescriptionReference * pType, - uno_AcquireFunc acquire ); + uno_AcquireFunc acquire ) + SAL_THROW (); /** Constructs an any with a given value and converts/ maps interfaces. <br> @@ -134,7 +166,8 @@ SAL_DLLEXPORT void SAL_CALL uno_type_any_construct( SAL_DLLEXPORT void SAL_CALL uno_any_constructAndConvert( uno_Any * pDest, void * pSource, typelib_TypeDescription * pTypeDescr, - uno_Mapping * mapping ); + uno_Mapping * mapping ) + SAL_THROW (); /** Constructs an any with a given value and converts/ maps interfaces. <br> @param pDest pointer memory of destination any @@ -145,7 +178,8 @@ SAL_DLLEXPORT void SAL_CALL uno_any_constructAndConvert( SAL_DLLEXPORT void SAL_CALL uno_type_any_constructAndConvert( uno_Any * pDest, void * pSource, typelib_TypeDescriptionReference * pType, - uno_Mapping * mapping ); + uno_Mapping * mapping ) + SAL_THROW (); /** Destructs an any. <br> @@ -153,7 +187,8 @@ SAL_DLLEXPORT void SAL_CALL uno_type_any_constructAndConvert( @param release function called each time an interface needs to be released. defaults (0) to uno */ SAL_DLLEXPORT void SAL_CALL uno_any_destruct( - uno_Any * pValue, uno_ReleaseFunc release ); + uno_Any * pValue, uno_ReleaseFunc release ) + SAL_THROW (); #ifdef __cplusplus } diff --git a/cppu/inc/uno/data.h b/cppu/inc/uno/data.h index 83fd327fa9a1..0cc94b1ed962 100644 --- a/cppu/inc/uno/data.h +++ b/cppu/inc/uno/data.h @@ -2,9 +2,9 @@ * * $RCSfile: data.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:51 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -87,12 +87,14 @@ typedef void * (SAL_CALL * uno_QueryInterfaceFunc)( <br> @param pInterface interface to be acquired */ -typedef void (SAL_CALL * uno_AcquireFunc)( void * pInterface ); +typedef void (SAL_CALL * uno_AcquireFunc)( + void * pInterface ); /** Generic function pointer declaration to release an interface. <br> @param pInterface interface to be release */ -typedef void (SAL_CALL * uno_ReleaseFunc)( void * pInterface ); +typedef void (SAL_CALL * uno_ReleaseFunc)( + void * pInterface ); /** Tests if two values are equal. May compare different types (e.g., short to long). <br> @@ -108,7 +110,8 @@ typedef void (SAL_CALL * uno_ReleaseFunc)( void * pInterface ); SAL_DLLEXPORT sal_Bool SAL_CALL uno_equalData( void * pVal1, typelib_TypeDescription * pVal1TypeDescr, void * pVal2, typelib_TypeDescription * pVal2TypeDescr, - uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ); + uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) + SAL_THROW (); /** Tests if two values are equal. May compare different types (e.g., short to long). <br> @param pVal1 pointer to a value @@ -123,7 +126,8 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_equalData( SAL_DLLEXPORT sal_Bool SAL_CALL uno_type_equalData( void * pVal1, typelib_TypeDescriptionReference * pVal1Type, void * pVal2, typelib_TypeDescriptionReference * pVal2Type, - uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ); + uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) + SAL_THROW (); /** Copy construct memory with given value. The size of the destination value must be larger or equal to the size of the source value. @@ -134,7 +138,9 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_type_equalData( @param acquire function called each time an interface needs to be acquired; defaults (0) to uno */ SAL_DLLEXPORT void SAL_CALL uno_copyData( - void * pDest, void * pSource, typelib_TypeDescription * pTypeDescr, uno_AcquireFunc acquire ); + void * pDest, void * pSource, + typelib_TypeDescription * pTypeDescr, uno_AcquireFunc acquire ) + SAL_THROW (); /** Copy construct memory with given value. The size of the destination value must be larger or equal to the size of the source value. <br> @@ -144,7 +150,9 @@ SAL_DLLEXPORT void SAL_CALL uno_copyData( @param acquire function called each time an interface needs to be acquired; defaults (0) to uno */ SAL_DLLEXPORT void SAL_CALL uno_type_copyData( - void * pDest, void * pSource, typelib_TypeDescriptionReference * pType, uno_AcquireFunc acquire ); + void * pDest, void * pSource, + typelib_TypeDescriptionReference * pType, uno_AcquireFunc acquire ) + SAL_THROW (); /** Copy construct memory with given value. The size of the destination value must be larger or equal to the size of the source value.<br> @@ -156,7 +164,9 @@ SAL_DLLEXPORT void SAL_CALL uno_type_copyData( @param mapping mapping to convert/ map interfaces */ SAL_DLLEXPORT void SAL_CALL uno_copyAndConvertData( - void * pDest, void * pSource, typelib_TypeDescription * pTypeDescr, uno_Mapping * mapping ); + void * pDest, void * pSource, + typelib_TypeDescription * pTypeDescr, uno_Mapping * mapping ) + SAL_THROW (); /** Copy construct memory with given value. The size of the destination value must be larger or equal to the size of the source value.<br> Interfaces are converted/ mapped by mapping parameter. @@ -167,7 +177,9 @@ SAL_DLLEXPORT void SAL_CALL uno_copyAndConvertData( @param mapping mapping to convert/ map interfaces */ SAL_DLLEXPORT void SAL_CALL uno_type_copyAndConvertData( - void * pDest, void * pSource, typelib_TypeDescriptionReference * pType, uno_Mapping * mapping ); + void * pDest, void * pSource, + typelib_TypeDescriptionReference * pType, uno_Mapping * mapping ) + SAL_THROW (); /** Destructs a given value; does <b>not</b> free its memory! <br> @@ -176,7 +188,8 @@ SAL_DLLEXPORT void SAL_CALL uno_type_copyAndConvertData( @param release function called each time an interface pointer needs to be released; defaults (0) to uno */ SAL_DLLEXPORT void SAL_CALL uno_destructData( - void * pValue, typelib_TypeDescription * pTypeDescr, uno_ReleaseFunc release ); + void * pValue, typelib_TypeDescription * pTypeDescr, uno_ReleaseFunc release ) + SAL_THROW (); /** Destructs a given value; does <b>not</b> free its memory! <br> @param pValue value to be destructed @@ -184,7 +197,8 @@ SAL_DLLEXPORT void SAL_CALL uno_destructData( @param release function called each time an interface pointer needs to be released; defaults (0) to uno */ SAL_DLLEXPORT void SAL_CALL uno_type_destructData( - void * pValue, typelib_TypeDescriptionReference * pType, uno_ReleaseFunc release ); + void * pValue, typelib_TypeDescriptionReference * pType, uno_ReleaseFunc release ) + SAL_THROW (); /** Default constructs a value. All simple types are set to 0, enums are set to their default value. @@ -193,7 +207,8 @@ SAL_DLLEXPORT void SAL_CALL uno_type_destructData( @param pTypeDescr type description of value to be constructed */ SAL_DLLEXPORT void SAL_CALL uno_constructData( - void * pMem, typelib_TypeDescription * pTypeDescr ); + void * pMem, typelib_TypeDescription * pTypeDescr ) + SAL_THROW (); /** Default constructs a value. All simple types are set to 0, enums are set to their default value. <br> @@ -201,7 +216,8 @@ SAL_DLLEXPORT void SAL_CALL uno_constructData( @param pType type of value to be constructed */ SAL_DLLEXPORT void SAL_CALL uno_type_constructData( - void * pMem, typelib_TypeDescriptionReference * pType ); + void * pMem, typelib_TypeDescriptionReference * pType ) + SAL_THROW (); /** Assigns a destination value with a source value. Widening conversion <b>without</b> data loss is allowed (e.g., assigning a long with a short). @@ -219,7 +235,8 @@ SAL_DLLEXPORT void SAL_CALL uno_type_constructData( SAL_DLLEXPORT sal_Bool SAL_CALL uno_assignData( void * pDest, typelib_TypeDescription * pDestTypeDescr, void * pSource, typelib_TypeDescription * pSourceTypeDescr, - uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release ); + uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release ) + SAL_THROW (); /** Assigns a destination value with a source value. Widening conversion <b>without</b> data loss is allowed (e.g., assigning a long with a short). Assignment from any value to a value of type Any and vice versa is allowed. @@ -236,7 +253,8 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_assignData( SAL_DLLEXPORT sal_Bool SAL_CALL uno_type_assignData( void * pDest, typelib_TypeDescriptionReference * pDestType, void * pSource, typelib_TypeDescriptionReference * pSourceType, - uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release ); + uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release ) + SAL_THROW (); #ifdef __cplusplus } diff --git a/cppu/inc/uno/dispatcher.h b/cppu/inc/uno/dispatcher.h index bfdf1ad4bfb7..8142b2423ff4 100644 --- a/cppu/inc/uno/dispatcher.h +++ b/cppu/inc/uno/dispatcher.h @@ -2,9 +2,9 @@ * * $RCSfile: dispatcher.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:51 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -72,6 +72,11 @@ #include <uno/any2.h> #endif +#ifdef __cplusplus +extern "C" +{ +#endif + typedef struct _typelib_TypeDescription typelib_TypeDescription; typedef struct _typelib_InterfaceTypeDescription typelib_InterfaceTypeDescription; typedef struct _uno_Interface uno_Interface; @@ -120,7 +125,7 @@ typedef struct _uno_Interface @param pInterface uno interface */ void (SAL_CALL * release)( uno_Interface * pInterface ); - /** dispatch function<br> + /** dispatch function */ uno_DispatchMethod pDispatcher; } uno_Interface; @@ -131,4 +136,8 @@ typedef struct _uno_Interface #pragma pack() #endif +#ifdef __cplusplus +} +#endif + #endif diff --git a/cppu/inc/uno/environment.h b/cppu/inc/uno/environment.h index 552b1bb919b9..0e62e217d59f 100644 --- a/cppu/inc/uno/environment.h +++ b/cppu/inc/uno/environment.h @@ -2,9 +2,9 @@ * * $RCSfile: environment.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:51 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -68,6 +68,11 @@ #include <rtl/ustring.h> #endif +#ifdef __cplusplus +extern "C" +{ +#endif + typedef struct _uno_Environment uno_Environment; typedef struct _uno_ExtEnvironment uno_ExtEnvironment; typedef struct _typelib_InterfaceTypeDescription typelib_InterfaceTypeDescription; @@ -238,7 +243,6 @@ typedef struct _uno_ExtEnvironment sal_Int32 * pnLen, uno_memAlloc memAlloc ); - /* ===== the following part will be late initialized by a matching bridge ===== * * ===== and is NOT for public use. ===== */ @@ -274,11 +278,6 @@ typedef struct _uno_ExtEnvironment #pragma pack() #endif -#ifdef __cplusplus -extern "C" -{ -#endif - /** Function exported by some bridge library providing acquireInterface(), releaseInterface(); may set a disposing callback. <br> @@ -296,7 +295,8 @@ typedef void (SAL_CALL * uno_initEnvironmentFunc)( uno_Environment * pEnv ); @param pContext some context pointer (e.g., to distinguish java vm; set 0 if not needed) */ SAL_DLLEXPORT void SAL_CALL uno_getEnvironment( - uno_Environment ** ppEnv, rtl_uString * pEnvTypeName, void * pContext ); + uno_Environment ** ppEnv, rtl_uString * pEnvTypeName, void * pContext ) + SAL_THROW (); /** Gets all specified environments. Caller has to release returned environments and free allocated memory. @@ -308,7 +308,8 @@ SAL_DLLEXPORT void SAL_CALL uno_getEnvironment( */ SAL_DLLEXPORT void SAL_CALL uno_getRegisteredEnvironments( uno_Environment *** pppEnvs, sal_Int32 * pnLen, uno_memAlloc memAlloc, - rtl_uString * pEnvTypeName ); + rtl_uString * pEnvTypeName ) + SAL_THROW (); /** Creates an environment. The new environment is anonymous (<b>NOT</b> publicly registered/ accessible). @@ -318,7 +319,8 @@ SAL_DLLEXPORT void SAL_CALL uno_getRegisteredEnvironments( @param pContext context pointer (e.g., to distinguish java vm); set 0 if not needed */ SAL_DLLEXPORT void SAL_CALL uno_createEnvironment( - uno_Environment ** ppEnv, rtl_uString * pEnvTypeName, void * pContext ); + uno_Environment ** ppEnv, rtl_uString * pEnvTypeName, void * pContext ) + SAL_THROW (); /** Dumps out environment information, i.e. registered interfaces. <br> @@ -327,7 +329,8 @@ SAL_DLLEXPORT void SAL_CALL uno_createEnvironment( @param pFilter if not null, filters output */ SAL_DLLEXPORT void SAL_CALL uno_dumpEnvironment( - void * stream, uno_Environment * pEnv, const sal_Char * pFilter ); + void * stream, uno_Environment * pEnv, const sal_Char * pFilter ) + SAL_THROW (); /** Dumps out environment information, i.e. registered interfaces. <br> @param stream output stream (FILE *) @@ -335,7 +338,8 @@ SAL_DLLEXPORT void SAL_CALL uno_dumpEnvironment( @param pFilter if not null, filters output */ SAL_DLLEXPORT void SAL_CALL uno_dumpEnvironmentByName( - void * stream, rtl_uString * pEnvTypeName, const sal_Char * pFilter ); + void * stream, rtl_uString * pEnvTypeName, const sal_Char * pFilter ) + SAL_THROW (); #ifdef __cplusplus } diff --git a/cppu/inc/uno/environment.hxx b/cppu/inc/uno/environment.hxx index f8aa6ae3f6d7..cdd00dcb9c94 100644 --- a/cppu/inc/uno/environment.hxx +++ b/cppu/inc/uno/environment.hxx @@ -2,9 +2,9 @@ * * $RCSfile: environment.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:51 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -96,89 +96,89 @@ public: <br> @param pEnv environment */ - inline Environment( uno_Environment * pEnv = 0 ); + inline Environment( uno_Environment * pEnv = 0 ) throw (); /** Copy constructor: acquires given environment <br> @param rEnv another environment */ - inline Environment( const Environment & rEnv ); + inline Environment( const Environment & rEnv ) throw (); /** Destructor: <br> Releases a set environment. */ - inline ~Environment(); + inline ~Environment() throw (); /** Sets a given environment, i.e. acquires given one and releases a set one. <br> @param pEnv another environment @return this environment */ - inline Environment & SAL_CALL operator = ( uno_Environment * pEnv ); + inline Environment & SAL_CALL operator = ( uno_Environment * pEnv ) throw (); /** Sets a given environment, i.e. acquires given one and releases a set one. <br> @param rEnv another environment @return this environment */ - inline Environment & SAL_CALL operator = ( const Environment & rEnv ) + inline Environment & SAL_CALL operator = ( const Environment & rEnv ) throw () { return operator = ( rEnv._pEnv ); } /** Provides <b>un</b>acquired pointer to the set C environment. <br> @return <b>un</b>acquired pointer to the C environment struct */ - inline uno_Environment * SAL_CALL get() const + inline uno_Environment * SAL_CALL get() const throw () { return _pEnv; } /** Gets type name of set environment. <br> @return type name of set environment */ - inline ::rtl::OUString SAL_CALL getTypeName() const + inline ::rtl::OUString SAL_CALL getTypeName() const throw () { return _pEnv->pTypeName; } /** Gets free context pointer of set environment. <br> @return free context pointer of set environment */ - inline void * SAL_CALL getContext() const + inline void * SAL_CALL getContext() const throw () { return _pEnv->pContext; } /** Tests if a environment is set. <br> @return true, if a environment is set, false otherwise */ - inline sal_Bool SAL_CALL is() const + inline sal_Bool SAL_CALL is() const throw () { return (_pEnv != 0); } /** Releases a set environment. <br> */ - inline void SAL_CALL clear(); + inline void SAL_CALL clear() throw (); }; //__________________________________________________________________________________________________ -inline Environment::Environment( uno_Environment * pEnv ) +inline Environment::Environment( uno_Environment * pEnv ) throw () : _pEnv( pEnv ) { if (_pEnv) (*_pEnv->acquire)( _pEnv ); } //__________________________________________________________________________________________________ -inline Environment::Environment( const Environment & rEnv ) +inline Environment::Environment( const Environment & rEnv ) throw () : _pEnv( rEnv._pEnv ) { if (_pEnv) (*_pEnv->acquire)( _pEnv ); } //__________________________________________________________________________________________________ -inline Environment::~Environment() +inline Environment::~Environment() throw () { if (_pEnv) (*_pEnv->release)( _pEnv ); } //__________________________________________________________________________________________________ -inline void Environment::clear() +inline void Environment::clear() throw () { if (_pEnv) { @@ -187,7 +187,7 @@ inline void Environment::clear() } } //__________________________________________________________________________________________________ -inline Environment & Environment::operator = ( uno_Environment * pEnv ) +inline Environment & Environment::operator = ( uno_Environment * pEnv ) throw () { if (pEnv) (*pEnv->acquire)( pEnv ); diff --git a/cppu/inc/uno/mapping.h b/cppu/inc/uno/mapping.h index 68937cfcdff6..0f10c5fbfb21 100644 --- a/cppu/inc/uno/mapping.h +++ b/cppu/inc/uno/mapping.h @@ -2,9 +2,9 @@ * * $RCSfile: mapping.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:52 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -68,6 +68,12 @@ #include <rtl/ustring.h> #endif + +#ifdef __cplusplus +extern "C" +{ +#endif + typedef struct _typelib_InterfaceTypeDescription typelib_InterfaceTypeDescription; typedef struct _uno_Mapping uno_Mapping; typedef struct _uno_Environment uno_Environment; @@ -119,11 +125,6 @@ typedef struct _uno_Mapping #pragma pack() #endif -#ifdef __cplusplus -extern "C" -{ -#endif - /** Gets an interface mapping from one environment to another. <br> @param ppMapping [inout] mapping; existing mapping will be released @@ -137,7 +138,8 @@ SAL_DLLEXPORT void SAL_CALL uno_getMapping( uno_Mapping ** ppMapping, uno_Environment * pFrom, uno_Environment * pTo, - rtl_uString * pAddPurpose ); + rtl_uString * pAddPurpose ) + SAL_THROW (); /** Callback function pointer declaration to get a mapping. <br> @@ -157,14 +159,16 @@ typedef void (SAL_CALL * uno_getMappingFunc)( @param pCallback callback function */ SAL_DLLEXPORT void SAL_CALL uno_registerMappingCallback( - uno_getMappingFunc pCallback ); + uno_getMappingFunc pCallback ) + SAL_THROW (); /** Revokes a mapping callback registration. <br> @param pCallback callback function */ SAL_DLLEXPORT void SAL_CALL uno_revokeMappingCallback( - uno_getMappingFunc pCallback ); + uno_getMappingFunc pCallback ) + SAL_THROW (); /** Function pointer declaration to free a mapping. <br> @@ -185,7 +189,8 @@ typedef void (SAL_CALL * uno_freeMappingFunc)( uno_Mapping * pMapping ); */ SAL_DLLEXPORT void SAL_CALL uno_registerMapping( uno_Mapping ** ppMapping, uno_freeMappingFunc freeMapping, - uno_Environment * pFrom, uno_Environment * pTo, rtl_uString * pAddPurpose ); + uno_Environment * pFrom, uno_Environment * pTo, rtl_uString * pAddPurpose ) + SAL_THROW (); /** Revokes a mapping.<br> A mapping registers itself on first acquire and revokes itself on last release. @@ -193,7 +198,8 @@ SAL_DLLEXPORT void SAL_CALL uno_registerMapping( @param pMapping mapping to be revoked */ SAL_DLLEXPORT void SAL_CALL uno_revokeMapping( - uno_Mapping * pMapping ); + uno_Mapping * pMapping ) + SAL_THROW (); /** Gets an interface mapping from one language environment to another by corresponding environment type names. @@ -209,7 +215,8 @@ SAL_DLLEXPORT void SAL_CALL uno_getMappingByName( uno_Mapping ** ppMapping, rtl_uString * pFrom, rtl_uString * pTo, - rtl_uString * pAddPurpose ); + rtl_uString * pAddPurpose ) + SAL_THROW (); /* symbol exported by each language binding library */ #define UNO_EXT_GETMAPPING "uno_ext_getMapping" diff --git a/cppu/inc/uno/mapping.hxx b/cppu/inc/uno/mapping.hxx index 1b784cbb595d..88a17f3c3748 100644 --- a/cppu/inc/uno/mapping.hxx +++ b/cppu/inc/uno/mapping.hxx @@ -2,9 +2,9 @@ * * $RCSfile: mapping.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:52 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -110,7 +110,7 @@ public: @param rAddPurpose additional purpose */ inline Mapping( const ::rtl::OUString & rFrom, const ::rtl::OUString & rTo, - const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ); + const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ) throw (); /** Holds a mapping from the specified source to the specified destination. <br> @@ -119,57 +119,57 @@ public: @param rAddPurpose additional purpose */ inline Mapping( uno_Environment * pFrom, uno_Environment * pTo, - const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ); + const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ) throw (); /** Constructor. <br> @param pMapping another mapping */ - inline Mapping( uno_Mapping * pMapping = 0 ); + inline Mapping( uno_Mapping * pMapping = 0 ) throw (); /** Copy constructor. <br> @param rMapping another mapping */ - inline Mapping( const Mapping & rMapping ); + inline Mapping( const Mapping & rMapping ) throw (); /** Destructor. <br> */ - inline ~Mapping(); + inline ~Mapping() throw (); /** Sets a given mapping. <br> @param pMapping another mapping @return this mapping */ - inline Mapping & SAL_CALL operator = ( uno_Mapping * pMapping ); + inline Mapping & SAL_CALL operator = ( uno_Mapping * pMapping ) throw (); /** Sets a given mapping. <br> @param rMapping another mapping @return this mapping */ - inline Mapping & SAL_CALL operator = ( const Mapping & rMapping ) + inline Mapping & SAL_CALL operator = ( const Mapping & rMapping ) throw () { return operator = ( rMapping._pMapping ); } /** Provides a pointer to the C mapping. The returned mapping is <b>not</b> acquired! <br> @return <b>un</b>acquired C mapping */ - inline uno_Mapping * SAL_CALL get() const + inline uno_Mapping * SAL_CALL get() const throw () { return _pMapping; } /** Tests if a mapping is set. <br> @return true if a mapping is set */ - inline sal_Bool SAL_CALL is() const + inline sal_Bool SAL_CALL is() const throw () { return (_pMapping != 0); } /** Releases a set mapping. <br> */ - inline void SAL_CALL clear(); + inline void SAL_CALL clear() throw (); /** Maps an interface from one environment to another. <br> @@ -177,14 +177,14 @@ public: @param pTypeDescr type description of interface @return mapped interface */ - inline void * SAL_CALL mapInterface( void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const; + inline void * SAL_CALL mapInterface( void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const throw (); /** Maps an interface from one environment to another. <br> @param pInterface source interface @param pTypeDescr type description of interface @return mapped interface */ - inline void * SAL_CALL mapInterface( void * pInterface, typelib_TypeDescription * pTypeDescr ) const + inline void * SAL_CALL mapInterface( void * pInterface, typelib_TypeDescription * pTypeDescr ) const throw () { return mapInterface( pInterface, (typelib_InterfaceTypeDescription *)pTypeDescr ); } /** Maps an interface from one environment to another. @@ -193,7 +193,8 @@ public: @param rType type of interface @return mapped interface */ - inline void * SAL_CALL mapInterface( void * pInterface, const ::com::sun::star::uno::Type & rType ) const; + inline void * SAL_CALL mapInterface( + void * pInterface, const ::com::sun::star::uno::Type & rType ) const throw (); /** Maps an interface from one environment to another. <br> @@ -201,7 +202,7 @@ public: @param pInterface source interface @param pTypeDescr type description of interface */ - inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const + inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const throw () { (*_pMapping->mapInterface)( _pMapping, ppOut, pInterface, pTypeDescr ); } /** Maps an interface from one environment to another. <br> @@ -209,7 +210,7 @@ public: @param pInterface source interface @param pTypeDescr type description of interface */ - inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, typelib_TypeDescription * pTypeDescr ) const + inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, typelib_TypeDescription * pTypeDescr ) const throw () { (*_pMapping->mapInterface)( _pMapping, ppOut, pInterface, (typelib_InterfaceTypeDescription *)pTypeDescr ); } /** Maps an interface from one environment to another. @@ -218,44 +219,44 @@ public: @param pInterface source interface @param rType type of interface to be mapped */ - inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, const ::com::sun::star::uno::Type & rType ) const; + inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, const ::com::sun::star::uno::Type & rType ) const throw (); }; //__________________________________________________________________________________________________ inline Mapping::Mapping( const ::rtl::OUString & rFrom, const ::rtl::OUString & rTo, - const ::rtl::OUString & rAddPurpose ) + const ::rtl::OUString & rAddPurpose ) throw () : _pMapping( 0 ) { uno_getMappingByName( &_pMapping, rFrom.pData, rTo.pData, rAddPurpose.pData ); } //__________________________________________________________________________________________________ inline Mapping::Mapping( uno_Environment * pFrom, uno_Environment * pTo, - const ::rtl::OUString & rAddPurpose ) + const ::rtl::OUString & rAddPurpose ) throw () : _pMapping( 0 ) { uno_getMapping( &_pMapping, pFrom, pTo, rAddPurpose.pData ); } //__________________________________________________________________________________________________ -inline Mapping::Mapping( uno_Mapping * pMapping ) +inline Mapping::Mapping( uno_Mapping * pMapping ) throw () : _pMapping( pMapping ) { if (_pMapping) (*_pMapping->acquire)( _pMapping ); } //__________________________________________________________________________________________________ -inline Mapping::Mapping( const Mapping & rMapping ) +inline Mapping::Mapping( const Mapping & rMapping ) throw () : _pMapping( rMapping._pMapping ) { if (_pMapping) (*_pMapping->acquire)( _pMapping ); } //__________________________________________________________________________________________________ -inline Mapping::~Mapping() +inline Mapping::~Mapping() throw () { if (_pMapping) (*_pMapping->release)( _pMapping ); } //__________________________________________________________________________________________________ -inline void Mapping::clear() +inline void Mapping::clear() throw () { if (_pMapping) { @@ -264,7 +265,7 @@ inline void Mapping::clear() } } //__________________________________________________________________________________________________ -inline Mapping & Mapping::operator = ( uno_Mapping * pMapping ) +inline Mapping & Mapping::operator = ( uno_Mapping * pMapping ) throw () { if (pMapping) (*pMapping->acquire)( pMapping ); @@ -275,7 +276,7 @@ inline Mapping & Mapping::operator = ( uno_Mapping * pMapping ) } //__________________________________________________________________________________________________ inline void Mapping::mapInterface( void ** ppOut, void * pInterface, - const ::com::sun::star::uno::Type & rType ) const + const ::com::sun::star::uno::Type & rType ) const throw () { typelib_TypeDescription * pTD = 0; TYPELIB_DANGER_GET( &pTD, rType.getTypeLibType() ); @@ -287,7 +288,7 @@ inline void Mapping::mapInterface( void ** ppOut, void * pInterface, } //__________________________________________________________________________________________________ inline void * Mapping::mapInterface( void * pInterface, - typelib_InterfaceTypeDescription * pTypeDescr ) const + typelib_InterfaceTypeDescription * pTypeDescr ) const throw () { void * pOut = 0; (*_pMapping->mapInterface)( _pMapping, &pOut, pInterface, pTypeDescr ); @@ -295,7 +296,7 @@ inline void * Mapping::mapInterface( void * pInterface, } //__________________________________________________________________________________________________ inline void * Mapping::mapInterface( void * pInterface, - const ::com::sun::star::uno::Type & rType ) const + const ::com::sun::star::uno::Type & rType ) const throw () { void * pOut = 0; mapInterface( &pOut, pInterface, rType ); @@ -304,7 +305,7 @@ inline void * Mapping::mapInterface( void * pInterface, //-------------------------------------------------------------------------------------------------- template< class C > -inline sal_Bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI ) +inline sal_Bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI ) throw () { Mapping aMapping( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO) ), @@ -315,7 +316,7 @@ inline sal_Bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI ) } //-------------------------------------------------------------------------------------------------- template< class C > -inline sal_Bool mapToUno( uno_Interface ** ppRet, const Reference< C > & x ) +inline sal_Bool mapToUno( uno_Interface ** ppRet, const Reference< C > & x ) throw () { Mapping aMapping( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) ), diff --git a/cppu/inc/uno/sequence2.h b/cppu/inc/uno/sequence2.h index 828db39c9106..eeec2cca7037 100644 --- a/cppu/inc/uno/sequence2.h +++ b/cppu/inc/uno/sequence2.h @@ -2,9 +2,9 @@ * * $RCSfile: sequence2.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:52 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,7 +86,8 @@ SAL_DLLEXPORT void SAL_CALL uno_sequence_assign( uno_Sequence ** ppDest, uno_Sequence * pSource, typelib_TypeDescription * pTypeDescr, - uno_ReleaseFunc release ); + uno_ReleaseFunc release ) + SAL_THROW (); /** Assign a sequence. <br> @param ppDest destinstaion sequence @@ -98,7 +99,8 @@ SAL_DLLEXPORT void SAL_CALL uno_type_sequence_assign( uno_Sequence ** ppDest, uno_Sequence * pSource, typelib_TypeDescriptionReference * pType, - uno_ReleaseFunc release ); + uno_ReleaseFunc release ) + SAL_THROW (); /** Constructs a new sequence with given elements. <br> @@ -112,7 +114,8 @@ SAL_DLLEXPORT void SAL_CALL uno_sequence_construct( uno_Sequence ** ppSequence, typelib_TypeDescription * pTypeDescr, void * pElements, sal_Int32 len, - uno_AcquireFunc acquire ); + uno_AcquireFunc acquire ) + SAL_THROW (); /** Constructs a new sequence with given elements. <br> @param ppSequence <b>out</b> parameter sequence @@ -125,7 +128,8 @@ SAL_DLLEXPORT void SAL_CALL uno_type_sequence_construct( uno_Sequence ** ppSequence, typelib_TypeDescriptionReference * pType, void * pElements, sal_Int32 len, - uno_AcquireFunc acquire ); + uno_AcquireFunc acquire ) + SAL_THROW (); /** Assures that the reference count of the given sequence is one. Otherwise a new copy of the sequence is created with a reference count of one. @@ -139,7 +143,8 @@ SAL_DLLEXPORT void SAL_CALL uno_sequence_reference2One( uno_Sequence ** ppSequence, typelib_TypeDescription * pTypeDescr, uno_AcquireFunc acquire, - uno_ReleaseFunc release ); + uno_ReleaseFunc release ) + SAL_THROW (); /** Assures that the reference count of the given sequence is one. Otherwise a new copy of the sequence is created with a reference count of one. <br> @@ -152,7 +157,8 @@ SAL_DLLEXPORT void SAL_CALL uno_type_sequence_reference2One( uno_Sequence ** ppSequence, typelib_TypeDescriptionReference * pType, uno_AcquireFunc acquire, - uno_ReleaseFunc release ); + uno_ReleaseFunc release ) + SAL_THROW (); /** Reallocates length of a sequence. This truncates a sequence or enlarges it default constructing appended elements. @@ -168,7 +174,8 @@ SAL_DLLEXPORT void SAL_CALL uno_sequence_realloc( typelib_TypeDescription * pTypeDescr, sal_Int32 nSize, uno_AcquireFunc acquire, - uno_ReleaseFunc release ); + uno_ReleaseFunc release ) + SAL_THROW (); /** Reallocates length of a sequence. This truncates a sequence or enlarges it default constructing appended elements. <br> @@ -183,7 +190,8 @@ SAL_DLLEXPORT void SAL_CALL uno_type_sequence_realloc( typelib_TypeDescriptionReference * pType, sal_Int32 nSize, uno_AcquireFunc acquire, - uno_ReleaseFunc release ); + uno_ReleaseFunc release ) + SAL_THROW (); #ifdef __cplusplus } diff --git a/cppu/inc/uno/threadpool.h b/cppu/inc/uno/threadpool.h index f27564607287..853d8ba9367a 100644 --- a/cppu/inc/uno/threadpool.h +++ b/cppu/inc/uno/threadpool.h @@ -2,9 +2,9 @@ * * $RCSfile: threadpool.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:25:52 $ + * last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -81,7 +81,8 @@ extern "C" { * false, when the thread has already an identifier. The identifier was not * altered. ( This is in general a bug ). <br> **/ -SAL_DLLEXPORT sal_Bool SAL_CALL uno_bindIdToCurrentThread( sal_Sequence *pThreadId ); +SAL_DLLEXPORT sal_Bool SAL_CALL uno_bindIdToCurrentThread( sal_Sequence *pThreadId ) + SAL_THROW (); /** @@ -93,19 +94,16 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_bindIdToCurrentThread( sal_Sequence *pThread * * @param ppThreadId [out] Contains the (acquired) ThreadId. **/ -SAL_DLLEXPORT void SAL_CALL uno_getIdOfCurrentThread( sal_Sequence **ppThreadId ); +SAL_DLLEXPORT void SAL_CALL uno_getIdOfCurrentThread( sal_Sequence **ppThreadId ) + SAL_THROW (); /** * If the internal refcount drops to zero, the association betwen threadId and * thread is broken. **/ -SAL_DLLEXPORT void SAL_CALL uno_releaseIdFromCurrentThread(); - - - - - +SAL_DLLEXPORT void SAL_CALL uno_releaseIdFromCurrentThread() + SAL_THROW (); /** @@ -123,7 +121,7 @@ struct uno_threadpool_Handle; * @see uno_threadpool_disposeThreads ***/ SAL_DLLEXPORT struct uno_threadpool_Handle * SAL_CALL -uno_threadpool_createHandle( sal_Int64 nDisposeId ); +uno_threadpool_createHandle( sal_Int64 nDisposeId ) SAL_THROW (); /** * This method is called to wait for a reply of a previously sent request. This is a @@ -135,7 +133,8 @@ uno_threadpool_createHandle( sal_Int64 nDisposeId ); * *ppThreadSpecificData is null. **/ SAL_DLLEXPORT void SAL_CALL -uno_threadpool_enter( struct uno_threadpool_Handle * pHandle , void **ppThreadSpecificData ); +uno_threadpool_enter( struct uno_threadpool_Handle * pHandle , void **ppThreadSpecificData ) + SAL_THROW (); /** @@ -164,7 +163,7 @@ SAL_DLLEXPORT void SAL_CALL uno_threadpool_putRequest( sal_Sequence *pThreadId, void *pThreadSpecificData, void ( SAL_CALL * doRequest ) ( void *pThreadSpecificData ), - sal_Bool bIsOneway ); + sal_Bool bIsOneway ) SAL_THROW (); /** @@ -174,7 +173,7 @@ uno_threadpool_putRequest( sal_Sequence *pThreadId, * @param pThreadSpecificData The pointer, that is returned by uno_threadpool_enter. **/ SAL_DLLEXPORT void SAL_CALL -uno_threadpool_putReply( sal_Sequence *pThreadId, void *pThreadSpecificData ); +uno_threadpool_putReply( sal_Sequence *pThreadId, void *pThreadSpecificData ) SAL_THROW (); /** @@ -192,7 +191,7 @@ uno_threadpool_putReply( sal_Sequence *pThreadId, void *pThreadSpecificData ); * uno_threadpool_stopDisposeThreads. **/ SAL_DLLEXPORT void SAL_CALL -uno_threadpool_disposeThreads( sal_Int64 nDisposeId ); +uno_threadpool_disposeThreads( sal_Int64 nDisposeId ) SAL_THROW (); /** @@ -205,7 +204,7 @@ uno_threadpool_disposeThreads( sal_Int64 nDisposeId ); * @see uno_threadpool_disposeThreads **/ SAL_DLLEXPORT void SAL_CALL -uno_threadpool_stopDisposeThreads( sal_Int64 nDisposeId ); +uno_threadpool_stopDisposeThreads( sal_Int64 nDisposeId ) SAL_THROW (); #ifdef __cplusplus } |