revised function throw () clauses

This commit is contained in:
Daniel Boelzle
2001-03-09 11:10:57 +00:00
parent 6014186320
commit fee2a34fc7
40 changed files with 942 additions and 760 deletions

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: Any.h,v $ * $RCSfile: Any.h,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -79,7 +79,6 @@
#include <rtl/alloc.h> #include <rtl/alloc.h>
#endif #endif
class BinaryCompatible_Impl;
/** */ //for docpp /** */ //for docpp
namespace com namespace com
@@ -110,27 +109,27 @@ class Any : public uno_Any
{ {
public: public:
// these are here to force memory de/allocation to sal lib. // 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 ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); } { return ::rtl_allocateMemory( nSize ); }
inline static void SAL_CALL operator delete( void * pMem ) throw () inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); } { ::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 ) SAL_THROW( () )
{ return pMem; } { return pMem; }
inline static void SAL_CALL operator delete( void *, void * ) throw () inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () )
{} {}
/** Default constructor: /** Default constructor:
Any holds no value; its type is void. Any holds no value; its type is void.
<br> <br>
*/ */
inline Any() throw (); inline Any() SAL_THROW( () );
/** Copy constructor: /** Copy constructor:
Sets value of the given any. Sets value of the given any.
<br> <br>
@param rAny another any @param rAny another any
*/ */
inline Any( const Any & rAny ) throw (); inline Any( const Any & rAny ) SAL_THROW( () );
/** Constructor: /** Constructor:
Sets a copy of the given data. Sets a copy of the given data.
@@ -138,7 +137,7 @@ public:
@param pData value @param pData value
@param rType type of value @param rType type of value
*/ */
inline Any( const void * pData, const Type & rType ) throw (); inline Any( const void * pData, const Type & rType ) SAL_THROW( () );
/** Constructor: /** Constructor:
Sets a copy of the given data. Sets a copy of the given data.
@@ -146,7 +145,7 @@ public:
@param pData value @param pData value
@param pTypeDescr type of value @param pTypeDescr type of value
*/ */
inline Any( const void * pData, typelib_TypeDescription * pTypeDescr ) throw (); inline Any( const void * pData, typelib_TypeDescription * pTypeDescr ) SAL_THROW( () );
/** Constructor: /** Constructor:
Sets a copy of the given data. Sets a copy of the given data.
@@ -154,13 +153,13 @@ public:
@param pData value @param pData value
@param pType type of value @param pType type of value
*/ */
inline Any( const void * pData, typelib_TypeDescriptionReference * pType ) throw (); inline Any( const void * pData, typelib_TypeDescriptionReference * pType ) SAL_THROW( () );
/** Destructor: /** Destructor:
Destructs any content and frees memory. Destructs any content and frees memory.
<br> <br>
*/ */
inline ~Any() throw (); inline ~Any() SAL_THROW( () );
/** Assignment operator: /** Assignment operator:
Sets the value of the given any. Sets the value of the given any.
@@ -168,19 +167,19 @@ public:
@param rAny another any (right side) @param rAny another any (right side)
@return this any @return this any
*/ */
inline Any & SAL_CALL operator = ( const Any & rAny ) throw (); inline Any & SAL_CALL operator = ( const Any & rAny ) SAL_THROW( () );
/** Gets the type of the set value. /** Gets the type of the set value.
<br> <br>
@return a Type object of the set value @return a Type object of the set value
*/ */
inline const Type & SAL_CALL getValueType() const throw () inline const Type & SAL_CALL getValueType() const SAL_THROW( () )
{ return * reinterpret_cast< const Type * >( &pType ); } { return * reinterpret_cast< const Type * >( &pType ); }
/** Gets the type of the set value. /** Gets the type of the set value.
<br> <br>
@return the <b>un</b>acquired type description reference of the set value @return the <b>un</b>acquired type description reference of the set value
*/ */
inline typelib_TypeDescriptionReference * SAL_CALL getValueTypeRef() const throw () inline typelib_TypeDescriptionReference * SAL_CALL getValueTypeRef() const SAL_THROW( () )
{ return pType; } { return pType; }
/** Gets the type description of the set value.<br> /** Gets the type description of the set value.<br>
@@ -189,35 +188,35 @@ public:
<br> <br>
@param a pointer to type description pointer @param a pointer to type description pointer
*/ */
inline void SAL_CALL getValueTypeDescription( typelib_TypeDescription ** ppTypeDescr ) const throw () inline void SAL_CALL getValueTypeDescription( typelib_TypeDescription ** ppTypeDescr ) const SAL_THROW( () )
{ ::typelib_typedescriptionreference_getDescription( ppTypeDescr, getValueTypeRef() ); } { ::typelib_typedescriptionreference_getDescription( ppTypeDescr, getValueTypeRef() ); }
/** Gets the type class of the set value. /** Gets the type class of the set value.
<br> <br>
@return the type class of the set value @return the type class of the set value
*/ */
inline TypeClass SAL_CALL getValueTypeClass() const throw () inline TypeClass SAL_CALL getValueTypeClass() const SAL_THROW( () )
{ return (TypeClass)pType->eTypeClass; } { return (TypeClass)pType->eTypeClass; }
/** Gets the type name of the set value. /** Gets the type name of the set value.
<br> <br>
@return the type name of the set value @return the type name of the set value
*/ */
inline ::rtl::OUString SAL_CALL getValueTypeName() const throw () inline ::rtl::OUString SAL_CALL getValueTypeName() const SAL_THROW( () )
{ return ::rtl::OUString( pType->pTypeName ); } { return ::rtl::OUString( pType->pTypeName ); }
/** Tests if any contains a value. /** Tests if any contains a value.
<br> <br>
@return true if any has a value, false otherwise @return true if any has a value, false otherwise
*/ */
inline sal_Bool SAL_CALL hasValue() const throw () inline sal_Bool SAL_CALL hasValue() const SAL_THROW( () )
{ return (TypeClass_VOID != getValueTypeClass()); } { return (TypeClass_VOID != getValueTypeClass()); }
/** Gets a pointer to the set value. /** Gets a pointer to the set value.
<br> <br>
@return a pointer to the set value @return a pointer to the set value
*/ */
inline const void * SAL_CALL getValue() const throw () inline const void * SAL_CALL getValue() const SAL_THROW( () )
{ return pData; } { return pData; }
/** Sets a value. If the any already contains a value, that value will be destructed /** Sets a value. If the any already contains a value, that value will be destructed
@@ -226,27 +225,27 @@ public:
@param pData pointer to value @param pData pointer to value
@param rType type of value @param rType type of value
*/ */
inline void SAL_CALL setValue( const void * pData, const Type & rType ) throw (); inline void SAL_CALL setValue( const void * pData, const Type & rType ) SAL_THROW( () );
/** Sets a value. If the any already contains a value, that value will be destructed /** Sets a value. If the any already contains a value, that value will be destructed
and its memory freed. and its memory freed.
<br> <br>
@param pData pointer to value @param pData pointer to value
@param pType type of value @param pType type of value
*/ */
inline void SAL_CALL setValue( const void * pData, typelib_TypeDescriptionReference * pType ) throw (); inline void SAL_CALL setValue( const void * pData, typelib_TypeDescriptionReference * pType ) SAL_THROW( () );
/** Sets a value. If the any already contains a value, that value will be destructed /** Sets a value. If the any already contains a value, that value will be destructed
and its memory freed. and its memory freed.
<br> <br>
@param pData pointer to value @param pData pointer to value
@param pTypeDescr type description of value @param pTypeDescr type description of value
*/ */
inline void SAL_CALL setValue( const void * pData, typelib_TypeDescription * pTypeDescr ) throw (); inline void SAL_CALL setValue( const void * pData, typelib_TypeDescription * pTypeDescr ) SAL_THROW( () );
/** Clears this any. If the any already contains a value, that value will be destructed /** 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. and its memory freed. After this has been called, the any does not contain a value.
<br> <br>
*/ */
inline void SAL_CALL clear() throw (); inline void SAL_CALL clear() SAL_THROW( () );
/** Equality operator: compares two anys.<br> /** Equality operator: compares two anys.<br>
The values need not be of equal type, e.g. a short integer is compared to The values need not be of equal type, e.g. a short integer is compared to
@@ -255,7 +254,7 @@ public:
@param rAny another any (right side) @param rAny another any (right side)
@return true if both any contains equal values @return true if both any contains equal values
*/ */
inline sal_Bool SAL_CALL operator == ( const Any & rAny ) const throw (); inline sal_Bool SAL_CALL operator == ( const Any & rAny ) const SAL_THROW( () );
/** Unequality operator: compares two anys.<br> /** Unequality operator: compares two anys.<br>
The values need not be of equal type, e.g. a short integer is compared to The values need not be of equal type, e.g. a short integer is compared to
a long integer. a long integer.
@@ -263,11 +262,8 @@ public:
@param rAny another any (right side) @param rAny another any (right side)
@return true if both any contains unequal values @return true if both any contains unequal values
*/ */
inline sal_Bool SAL_CALL operator != ( const Any & rAny ) const throw () inline sal_Bool SAL_CALL operator != ( const Any & rAny ) const SAL_THROW( () )
{ return (! operator == ( rAny )); } { return (! operator == ( rAny )); }
// test the binary compatibility
friend class BinaryCompatible_Impl;
}; };
/** Template function to generically construct an any from a C++ value. /** Template function to generically construct an any from a C++ value.
@@ -276,7 +272,7 @@ public:
@return an any @return an any
*/ */
template< class C > template< class C >
inline Any SAL_CALL makeAny( const C & value ) throw (); inline Any SAL_CALL makeAny( const C & value ) SAL_THROW( () );
class BaseReference; class BaseReference;
class Type; class Type;
@@ -287,7 +283,7 @@ class Type;
@param value source value (right side) @param value source value (right side)
*/ */
template< class C > template< class C >
inline void SAL_CALL operator <<= ( ::com::sun::star::uno::Any & rAny, const C & value ) throw (); inline void SAL_CALL operator <<= ( ::com::sun::star::uno::Any & rAny, const C & value ) SAL_THROW( () );
/** Template binary >>= operator to assign a value from an any.<br> /** 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> If the any does not contain a value that can be assigned <b>without</b>
data loss, this operation will fail returning false. data loss, this operation will fail returning false.
@@ -297,7 +293,7 @@ inline void SAL_CALL operator <<= ( ::com::sun::star::uno::Any & rAny, const C &
@return true if assignment was possible without data loss @return true if assignment was possible without data loss
*/ */
template< class C > template< class C >
inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, C & value ) throw (); inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, C & value ) SAL_THROW( () );
/** Template equality operator: compares set value of left side any to right side value.<br> /** 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 The values need not be of equal type, e.g. a short integer is compared to
@@ -310,7 +306,7 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny,
@return true if values are equal, false otherwise @return true if values are equal, false otherwise
*/ */
template< class C > template< class C >
inline sal_Bool SAL_CALL operator == ( const ::com::sun::star::uno::Any & rAny, const C & value ) throw (); inline sal_Bool SAL_CALL operator == ( const ::com::sun::star::uno::Any & rAny, const C & value ) SAL_THROW( () );
/** Template unequality operator: compares set value of left side any to right side value.<br> /** 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 The values need not be of equal type, e.g. a short integer is compared to
a long integer.<br> a long integer.<br>
@@ -322,40 +318,40 @@ inline sal_Bool SAL_CALL operator == ( const ::com::sun::star::uno::Any & rAny,
@return true if values are unequal, false otherwise @return true if values are unequal, false otherwise
*/ */
template< class C > template< class C >
inline sal_Bool SAL_CALL operator != ( const ::com::sun::star::uno::Any & rAny, const C & value ) throw () inline sal_Bool SAL_CALL operator != ( const ::com::sun::star::uno::Any & rAny, const C & value ) SAL_THROW( () )
{ {
return (! operator == ( rAny, value )); return (! operator == ( rAny, value ));
} }
// additional specialized >>= and == operators // additional specialized >>= and == operators
// bool // bool
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Bool & value ) throw (); inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Bool & value ) SAL_THROW( () );
inline sal_Bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) throw (); inline sal_Bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) SAL_THROW( () );
// byte // byte
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int8 & value ) throw (); inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int8 & value ) SAL_THROW( () );
// short // short
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) throw (); inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) SAL_THROW( () );
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) throw (); inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) SAL_THROW( () );
// long // long
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) throw (); inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) SAL_THROW( () );
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) throw (); inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) SAL_THROW( () );
// hyper // hyper
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) throw (); inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) SAL_THROW( () );
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) throw (); inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) SAL_THROW( () );
// float // float
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, float & value ) throw (); inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, float & value ) SAL_THROW( () );
// double // double
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, double & value ) throw (); inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, double & value ) SAL_THROW( () );
// string // string
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value ) throw (); inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value ) SAL_THROW( () );
inline sal_Bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value ) throw (); inline sal_Bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value ) SAL_THROW( () );
// type // type
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) throw (); inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) SAL_THROW( () );
inline sal_Bool SAL_CALL operator == ( const Any & rAny, const Type & value ) throw (); inline sal_Bool SAL_CALL operator == ( const Any & rAny, const Type & value ) SAL_THROW( () );
// any // any
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Any & value ) throw (); inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Any & value ) SAL_THROW( () );
// interface // interface
inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value ) throw (); inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value ) SAL_THROW( () );
} }
} }
@@ -367,7 +363,7 @@ inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & v
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>any</b> @return type of IDL type <b>any</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Any * ) throw () inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Any * ) SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_ANY ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_ANY ) );

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: Any.hxx,v $ * $RCSfile: Any.hxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -95,72 +95,72 @@ namespace uno
{ {
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Any::Any() throw () inline Any::Any() SAL_THROW( () )
{ {
::uno_any_construct( this, 0, 0, cpp_acquire ); ::uno_any_construct( this, 0, 0, cpp_acquire );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Any::Any( const Any & rAny ) throw () inline Any::Any( const Any & rAny ) SAL_THROW( () )
{ {
::uno_type_any_construct( this, rAny.pData, rAny.getValueTypeRef(), cpp_acquire ); ::uno_type_any_construct( this, rAny.pData, rAny.getValueTypeRef(), cpp_acquire );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Any::Any( const void * pData, const Type & rType ) throw () inline Any::Any( const void * pData, const Type & rType ) SAL_THROW( () )
{ {
::uno_type_any_construct( ::uno_type_any_construct(
this, const_cast< void * >( pData ), rType.getTypeLibType(), cpp_acquire ); this, const_cast< void * >( pData ), rType.getTypeLibType(), cpp_acquire );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Any::Any( const void * pData, typelib_TypeDescription * pTypeDescr ) throw () inline Any::Any( const void * pData, typelib_TypeDescription * pTypeDescr ) SAL_THROW( () )
{ {
::uno_any_construct( ::uno_any_construct(
this, const_cast< void * >( pData ), pTypeDescr, cpp_acquire ); this, const_cast< void * >( pData ), pTypeDescr, cpp_acquire );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Any::Any( const void * pData, typelib_TypeDescriptionReference * pType ) throw () inline Any::Any( const void * pData, typelib_TypeDescriptionReference * pType ) SAL_THROW( () )
{ {
::uno_type_any_construct( ::uno_type_any_construct(
this, const_cast< void * >( pData ), pType, cpp_acquire ); this, const_cast< void * >( pData ), pType, cpp_acquire );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Any::~Any() throw () inline Any::~Any() SAL_THROW( () )
{ {
::uno_any_destruct( ::uno_any_destruct(
this, cpp_release ); this, cpp_release );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Any & Any::operator = ( const Any & rAny ) throw () inline Any & Any::operator = ( const Any & rAny ) SAL_THROW( () )
{ {
if (this != &rAny) if (this != &rAny)
setValue( rAny.getValue(), rAny.getValueTypeRef() ); setValue( rAny.getValue(), rAny.getValueTypeRef() );
return *this; return *this;
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline void Any::setValue( const void * pData, const Type & rType ) throw () inline void Any::setValue( const void * pData, const Type & rType ) SAL_THROW( () )
{ {
::uno_type_any_assign( ::uno_type_any_assign(
this, const_cast< void * >( pData ), rType.getTypeLibType(), cpp_acquire, cpp_release ); this, const_cast< void * >( pData ), rType.getTypeLibType(), cpp_acquire, cpp_release );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline void Any::setValue( const void * pData, typelib_TypeDescriptionReference * pType ) throw () inline void Any::setValue( const void * pData, typelib_TypeDescriptionReference * pType ) SAL_THROW( () )
{ {
::uno_type_any_assign( ::uno_type_any_assign(
this, const_cast< void * >( pData ), pType, cpp_acquire, cpp_release ); this, const_cast< void * >( pData ), pType, cpp_acquire, cpp_release );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline void Any::setValue( const void * pData, typelib_TypeDescription * pTypeDescr ) throw () inline void Any::setValue( const void * pData, typelib_TypeDescription * pTypeDescr ) SAL_THROW( () )
{ {
::uno_any_assign( ::uno_any_assign(
this, const_cast< void * >( pData ), pTypeDescr, cpp_acquire, cpp_release ); this, const_cast< void * >( pData ), pTypeDescr, cpp_acquire, cpp_release );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline void Any::clear() throw () inline void Any::clear() SAL_THROW( () )
{ {
::uno_any_assign( ::uno_any_assign(
this, 0, 0, cpp_acquire, cpp_release ); this, 0, 0, cpp_acquire, cpp_release );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool Any::operator == ( const Any & rAny ) const throw () inline sal_Bool Any::operator == ( const Any & rAny ) const SAL_THROW( () )
{ {
const Type & rType = ::getCppuType( this ); const Type & rType = ::getCppuType( this );
return ::uno_type_equalData( return ::uno_type_equalData(
@@ -171,21 +171,21 @@ inline sal_Bool Any::operator == ( const Any & rAny ) const throw ()
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
template< class C > template< class C >
inline Any SAL_CALL makeAny( const C & value ) throw () inline Any SAL_CALL makeAny( const C & value ) SAL_THROW( () )
{ {
return Any( &value, ::getCppuType( &value ) ); return Any( &value, ::getCppuType( &value ) );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
template< class C > template< class C >
inline void SAL_CALL operator <<= ( Any & rAny, const C & value ) throw () inline void SAL_CALL operator <<= ( Any & rAny, const C & value ) SAL_THROW( () )
{ {
rAny.setValue( &value, ::getCppuType( &value ) ); rAny.setValue( &value, ::getCppuType( &value ) );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
template< class C > template< class C >
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, C & value ) throw () inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, C & value ) SAL_THROW( () )
{ {
const Type & rType = ::getCppuType( &value ); const Type & rType = ::getCppuType( &value );
return ::uno_type_assignData( return ::uno_type_assignData(
@@ -196,7 +196,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, C & value ) throw ()
// bool // bool
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Bool & value ) throw () inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Bool & value ) SAL_THROW( () )
{ {
if (TypeClass_BOOLEAN == rAny.getValueTypeClass()) if (TypeClass_BOOLEAN == rAny.getValueTypeClass())
{ {
@@ -206,14 +206,14 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny,
return sal_False; return sal_False;
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) throw () inline sal_Bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) SAL_THROW( () )
{ {
return (TypeClass_BOOLEAN == rAny.getValueTypeClass() && return (TypeClass_BOOLEAN == rAny.getValueTypeClass() &&
(value != sal_False) == (* reinterpret_cast< const sal_Bool * >( rAny.getValue() ) != sal_False)); (value != sal_False) == (* reinterpret_cast< const sal_Bool * >( rAny.getValue() ) != sal_False));
} }
// byte // byte
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Int8 & value ) throw () inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Int8 & value ) SAL_THROW( () )
{ {
if (TypeClass_BYTE == rAny.getValueTypeClass()) if (TypeClass_BYTE == rAny.getValueTypeClass())
{ {
@@ -224,7 +224,7 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny,
} }
// short // short
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) throw () inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) SAL_THROW( () )
{ {
switch (rAny.getValueTypeClass()) switch (rAny.getValueTypeClass())
{ {
@@ -239,7 +239,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) th
return sal_False; return sal_False;
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) throw () inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) SAL_THROW( () )
{ {
switch (rAny.getValueTypeClass()) switch (rAny.getValueTypeClass())
{ {
@@ -255,7 +255,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) t
} }
// long // long
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) throw () inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) SAL_THROW( () )
{ {
switch (rAny.getValueTypeClass()) switch (rAny.getValueTypeClass())
{ {
@@ -276,7 +276,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) th
return sal_False; return sal_False;
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) throw () inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) SAL_THROW( () )
{ {
switch (rAny.getValueTypeClass()) switch (rAny.getValueTypeClass())
{ {
@@ -298,7 +298,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) t
} }
// hyper // hyper
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) throw () inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) SAL_THROW( () )
{ {
switch (rAny.getValueTypeClass()) switch (rAny.getValueTypeClass())
{ {
@@ -325,7 +325,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) th
return sal_False; return sal_False;
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) throw () inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) SAL_THROW( () )
{ {
switch (rAny.getValueTypeClass()) switch (rAny.getValueTypeClass())
{ {
@@ -353,7 +353,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) t
} }
// float // float
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, float & value ) throw () inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, float & value ) SAL_THROW( () )
{ {
switch (rAny.getValueTypeClass()) switch (rAny.getValueTypeClass())
{ {
@@ -374,7 +374,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, float & value ) throw
} }
// double // double
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, double & value ) throw () inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, double & value ) SAL_THROW( () )
{ {
switch (rAny.getValueTypeClass()) switch (rAny.getValueTypeClass())
{ {
@@ -404,7 +404,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, double & value ) throw
} }
// string // string
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value ) throw () inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value ) SAL_THROW( () )
{ {
if (TypeClass_STRING == rAny.getValueTypeClass()) if (TypeClass_STRING == rAny.getValueTypeClass())
{ {
@@ -414,14 +414,14 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & valu
return sal_False; return sal_False;
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value ) throw () inline sal_Bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value ) SAL_THROW( () )
{ {
return (TypeClass_STRING == rAny.getValueTypeClass() && return (TypeClass_STRING == rAny.getValueTypeClass() &&
value == * reinterpret_cast< const ::rtl::OUString * >( rAny.getValue() )); value == * reinterpret_cast< const ::rtl::OUString * >( rAny.getValue() ));
} }
// type // type
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) throw () inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) SAL_THROW( () )
{ {
if (TypeClass_TYPE == rAny.getValueTypeClass()) if (TypeClass_TYPE == rAny.getValueTypeClass())
{ {
@@ -431,21 +431,21 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) throw (
return sal_False; return sal_False;
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool SAL_CALL operator == ( const Any & rAny, const Type & value ) throw () inline sal_Bool SAL_CALL operator == ( const Any & rAny, const Type & value ) SAL_THROW( () )
{ {
return (TypeClass_TYPE == rAny.getValueTypeClass() && return (TypeClass_TYPE == rAny.getValueTypeClass() &&
value == * reinterpret_cast< const Type * >( rAny.getValue() )); value == * reinterpret_cast< const Type * >( rAny.getValue() ));
} }
// any // any
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Any & value ) throw () inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Any & value ) SAL_THROW( () )
{ {
value = rAny; value = rAny;
return sal_True; return sal_True;
} }
// interface // interface
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value ) throw () inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value ) SAL_THROW( () )
{ {
if (TypeClass_INTERFACE == rAny.getValueTypeClass()) if (TypeClass_INTERFACE == rAny.getValueTypeClass())
{ {
@@ -462,7 +462,7 @@ inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & v
// operator to compare to an any. // operator to compare to an any.
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
template< class C > template< class C >
inline sal_Bool SAL_CALL operator == ( const Any & rAny, const C & value ) throw () inline sal_Bool SAL_CALL operator == ( const Any & rAny, const C & value ) SAL_THROW( () )
{ {
const Type & rType = ::getCppuType( &value ); const Type & rType = ::getCppuType( &value );
return ::uno_type_equalData( return ::uno_type_equalData(

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: Reference.h,v $ * $RCSfile: Reference.h,v $
* *
* $Revision: 1.5 $ * $Revision: 1.6 $
* *
* last change: $Author: dbo $ $Date: 2001-02-16 16:38:07 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -91,7 +91,7 @@ enum __UnoReference_NoAcquire
interface, i.e. transferring ownership to it. interface, i.e. transferring ownership to it.
<br> <br>
*/ */
UNO_REF_NO_ACQUIRE = 0xfeedbeef UNO_REF_NO_ACQUIRE
}; };
/** Base reference class holding/ acquiring an interface.<br> /** Base reference class holding/ acquiring an interface.<br>
@@ -111,73 +111,73 @@ protected:
Sets null reference. Sets null reference.
<br> <br>
*/ */
inline BaseReference() throw (); inline BaseReference() SAL_THROW( () );
/** Constructor: /** Constructor:
Sets given interface pointer. Sets given interface pointer.
<br> <br>
@param pInterface an interface pointer @param pInterface an interface pointer
*/ */
inline BaseReference( XInterface * pInterface ) throw (); inline BaseReference( XInterface * pInterface ) SAL_THROW( () );
/** Constructor: /** Constructor:
Sets reference to given interface pointer without acquiring it. Sets reference to given interface pointer without acquiring it.
<br> <br>
@param pInterface interface pointer @param pInterface interface pointer
@param dummy UNO_REF_NO_ACQUIRE to force obvious distinction to other constructors @param dummy SAL_NO_ACQUIRE to force obvious distinction to other constructors
*/ */
inline BaseReference( XInterface * pInterface, __UnoReference_NoAcquire ) throw (); inline BaseReference( XInterface * pInterface, __sal_NoAcquire ) SAL_THROW( () );
/** Copy constructor: /** Copy constructor:
Copies interface reference. Copies interface reference.
<br> <br>
@param rRef another reference @param rRef another reference
*/ */
inline BaseReference( const BaseReference & rRef ) throw (); inline BaseReference( const BaseReference & rRef ) SAL_THROW( () );
/** Destructor: /** Destructor:
Releases interface reference. Releases interface reference.
<br> <br>
*/ */
inline ~BaseReference() throw (); inline ~BaseReference() SAL_THROW( () );
/** Sets interface pointer. An interface already set will be released. /** Sets interface pointer. An interface already set will be released.
<br> <br>
@param pInterface an interface pointer @param pInterface an interface pointer
@return true, if non-null interface was set @return true, if non-null interface was set
*/ */
inline sal_Bool SAL_CALL set( XInterface * pInterface ) throw (); inline sal_Bool SAL_CALL set( XInterface * pInterface ) SAL_THROW( () );
/** Sets interface pointer without acquiring it. /** Sets interface pointer without acquiring it.
An interface already set will be released. An interface already set will be released.
<br> <br>
@param pInterface an interface pointer @param pInterface an interface pointer
*/ */
inline sal_Bool SAL_CALL set( XInterface * pInterface, __UnoReference_NoAcquire ) throw (); inline sal_Bool SAL_CALL set( XInterface * pInterface, __sal_NoAcquire ) SAL_THROW( () );
public: public:
// these are here to force memory de/allocation to sal lib. // 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 ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); } { return ::rtl_allocateMemory( nSize ); }
inline static void SAL_CALL operator delete( void * pMem ) throw () inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); } { ::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 ) SAL_THROW( () )
{ return pMem; } { return pMem; }
inline static void SAL_CALL operator delete( void *, void * ) throw () inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () )
{} {}
/** Clears reference, i.e. releases interface. /** Clears reference, i.e. releases interface.
Reference is null after clear() call. Reference is null after clear() call.
<br> <br>
*/ */
inline void SAL_CALL clear() throw (); inline void SAL_CALL clear() SAL_THROW( () );
/** Gets interface pointer. /** Gets interface pointer.
This call does <b>not</b> acquire the interface. This call does <b>not</b> acquire the interface.
<br> <br>
@return <b>un</b>acquired interface pointer @return <b>un</b>acquired interface pointer
*/ */
inline XInterface * SAL_CALL get() const throw () inline XInterface * SAL_CALL get() const SAL_THROW( () )
{ return _pInterface; } { return _pInterface; }
/** Checks if reference is null. /** Checks if reference is null.
<br> <br>
@return true if reference acquires an interface, i.e. is not null @return true if reference acquires an interface, i.e. is not null
*/ */
inline sal_Bool SAL_CALL is() const throw () inline sal_Bool SAL_CALL is() const SAL_THROW( () )
{ return (_pInterface != 0); } { return (_pInterface != 0); }
/** Equality operator: compares two interfaces<br> /** Equality operator: compares two interfaces<br>
Checks if both references are null or refer to the same object. Checks if both references are null or refer to the same object.
@@ -185,22 +185,22 @@ public:
@param rRef another reference @param rRef another reference
@return true if both references are null or refer to the same object, false otherwise @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 throw (); inline sal_Bool SAL_CALL operator == ( const BaseReference & rRef ) const SAL_THROW( () );
/** Unequality operator: compares two interfaces<br> /** Unequality operator: compares two interfaces<br>
Checks if both references are null or refer to the same object. Checks if both references are null or refer to the same object.
<br> <br>
@param rRef another reference @param rRef another reference
@return false if both references are null or refer to the same object, true otherwise @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 throw () inline sal_Bool SAL_CALL operator != ( const BaseReference & rRef ) const SAL_THROW( () )
{ return (! operator == ( rRef )); } { return (! operator == ( rRef )); }
// needed for stl container operations, though this makes no sense on pointers // needed for stl container operations, though this makes no sense on pointers
inline sal_Bool SAL_CALL operator < ( const BaseReference & rRef ) const throw () inline sal_Bool SAL_CALL operator < ( const BaseReference & rRef ) const SAL_THROW( () )
{ return (_pInterface < rRef._pInterface); } { return (_pInterface < rRef._pInterface); }
}; };
/** Enum defining UNO_QUERY and UNO_REF_NO_ACQUIRE for query interface constructor /** Enum defining UNO_QUERY and UNO_REF_QUERY for query interface constructor
of reference template. of reference template.
<br> <br>
*/ */
@@ -209,11 +209,11 @@ enum __UnoReference_Query
/** This enum value can be used for querying interface constructor of reference template. /** This enum value can be used for querying interface constructor of reference template.
<br> <br>
*/ */
UNO_REF_QUERY = 0xdb0e121e, UNO_QUERY,
/** This enum value can be used for querying interface constructor of reference template. /** This enum value can be used for querying interface constructor of reference template.
<br> <br>
*/ */
UNO_QUERY = 0xdb0 UNO_REF_QUERY
}; };
/** Template reference class for interface type derived from BaseReference. /** Template reference class for interface type derived from BaseReference.
@@ -229,23 +229,23 @@ class Reference : public BaseReference
@param pInterface interface pointer @param pInterface interface pointer
@return interface of demanded type (may be null) @return interface of demanded type (may be null)
*/ */
inline static XInterface * SAL_CALL __query( XInterface * pInterface ) throw (RuntimeException); inline static XInterface * SAL_CALL __query( XInterface * pInterface ) SAL_THROW( (RuntimeException) );
public: public:
// these are here to force memory de/allocation to sal lib. // 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 ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); } { return ::rtl_allocateMemory( nSize ); }
static void SAL_CALL operator delete( void * pMem ) throw () static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); } { ::rtl_freeMemory( pMem ); }
static void * SAL_CALL operator new( size_t, void * pMem ) throw () static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () )
{ return pMem; } { return pMem; }
static void SAL_CALL operator delete( void *, void * ) throw () static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () )
{} {}
/** Default Constructor: /** Default Constructor:
Sets null reference. Sets null reference.
<br> <br>
*/ */
inline Reference() throw () inline Reference() SAL_THROW( () )
: BaseReference() : BaseReference()
{} {}
/** Copy constructor: /** Copy constructor:
@@ -253,7 +253,7 @@ public:
<br> <br>
@param rRef another reference @param rRef another reference
*/ */
inline Reference( const Reference< interface_type > & rRef ) throw () inline Reference( const Reference< interface_type > & rRef ) SAL_THROW( () )
: BaseReference( rRef ) : BaseReference( rRef )
{} {}
/** Constructor: /** Constructor:
@@ -261,7 +261,7 @@ public:
<br> <br>
@param pInterface an interface pointer @param pInterface an interface pointer
*/ */
inline Reference( interface_type * pInterface ) throw () inline Reference( interface_type * pInterface ) SAL_THROW( () )
: BaseReference( pInterface ) : BaseReference( pInterface )
{} {}
@@ -271,8 +271,17 @@ public:
@param pInterface another reference @param pInterface another reference
@param dummy UNO_REF_NO_ACQUIRE to force obvious distinction to other constructors @param dummy UNO_REF_NO_ACQUIRE to force obvious distinction to other constructors
*/ */
inline Reference( XInterface * pInterface, __UnoReference_NoAcquire ) throw () inline Reference( XInterface * pInterface, __UnoReference_NoAcquire ) SAL_THROW( () )
: BaseReference( pInterface, UNO_REF_NO_ACQUIRE ) : BaseReference( pInterface, SAL_NO_ACQUIRE )
{}
/** Constructor:
Sets given interface pointer without acquiring it.
<br>
@param pInterface another reference
@param dummy SAL_NO_ACQUIRE to force obvious distinction to other constructors
*/
inline Reference( XInterface * pInterface, __sal_NoAcquire ) SAL_THROW( () )
: BaseReference( pInterface, SAL_NO_ACQUIRE )
{} {}
/** Constructor: /** Constructor:
@@ -281,8 +290,8 @@ public:
@param rRef another reference @param rRef another reference
@param dummy UNO_QUERY or UNO_REF_QUERY to force obvious distinction to other constructors @param dummy UNO_QUERY or UNO_REF_QUERY to force obvious distinction to other constructors
*/ */
inline Reference( const BaseReference & rRef, __UnoReference_Query ) throw (RuntimeException) inline Reference( const BaseReference & rRef, __UnoReference_Query ) SAL_THROW( (RuntimeException) )
: BaseReference( __query( rRef.get() ), UNO_REF_NO_ACQUIRE ) : BaseReference( __query( rRef.get() ), SAL_NO_ACQUIRE )
{} {}
/** Constructor: /** Constructor:
Queries given interface for reference interface type (<b>interface_type</b>). Queries given interface for reference interface type (<b>interface_type</b>).
@@ -290,8 +299,8 @@ public:
@param pInterface an interface pointer @param pInterface an interface pointer
@param dummy UNO_QUERY to force obvious distinction to other constructors @param dummy UNO_QUERY to force obvious distinction to other constructors
*/ */
inline Reference( XInterface * pInterface, __UnoReference_Query ) throw (RuntimeException) inline Reference( XInterface * pInterface, __UnoReference_Query ) SAL_THROW( (RuntimeException) )
: BaseReference( __query( pInterface ), UNO_REF_NO_ACQUIRE ) : BaseReference( __query( pInterface ), SAL_NO_ACQUIRE )
{} {}
/** Queries given interface for reference interface type (<b>interface_type</b>) /** Queries given interface for reference interface type (<b>interface_type</b>)
@@ -301,8 +310,8 @@ public:
@param pInterface an interface pointer @param pInterface an interface pointer
@return true, if non-null interface was set @return true, if non-null interface was set
*/ */
inline sal_Bool SAL_CALL set( XInterface * pInterface, __UnoReference_Query ) throw (RuntimeException) inline sal_Bool SAL_CALL set( XInterface * pInterface, __UnoReference_Query ) SAL_THROW( (RuntimeException) )
{ return BaseReference::set( __query( pInterface ), UNO_REF_NO_ACQUIRE ); } { return BaseReference::set( __query( pInterface ), SAL_NO_ACQUIRE ); }
/** Queries given interface for reference interface type (<b>interface_type</b>) /** Queries given interface for reference interface type (<b>interface_type</b>)
and sets it. and sets it.
An interface already set will be released. An interface already set will be released.
@@ -310,8 +319,8 @@ public:
@param rRef another reference @param rRef another reference
@return true, if non-null interface was set @return true, if non-null interface was set
*/ */
inline sal_Bool SAL_CALL set( const BaseReference & rRef, __UnoReference_Query ) throw (RuntimeException) inline sal_Bool SAL_CALL set( const BaseReference & rRef, __UnoReference_Query ) SAL_THROW( (RuntimeException) )
{ return BaseReference::set( __query( rRef.get() ), UNO_REF_NO_ACQUIRE ); } { return BaseReference::set( __query( rRef.get() ), SAL_NO_ACQUIRE ); }
/** Sets the given interface. /** Sets the given interface.
An interface already set will be released. An interface already set will be released.
@@ -319,7 +328,7 @@ public:
@param rRef another reference @param rRef another reference
@return true, if non-null interface was set @return true, if non-null interface was set
*/ */
inline sal_Bool SAL_CALL set( const Reference< interface_type > & rRef ) throw () inline sal_Bool SAL_CALL set( const Reference< interface_type > & rRef ) SAL_THROW( () )
{ return BaseReference::set( rRef.get() ); } { return BaseReference::set( rRef.get() ); }
/** Sets the given interface. /** Sets the given interface.
An interface already set will be released. An interface already set will be released.
@@ -327,7 +336,7 @@ public:
@param pInterface another interface @param pInterface another interface
@return true, if non-null interface was set @return true, if non-null interface was set
*/ */
inline sal_Bool SAL_CALL set( interface_type * pInterface ) throw () inline sal_Bool SAL_CALL set( interface_type * pInterface ) SAL_THROW( () )
{ return BaseReference::set( pInterface ); } { return BaseReference::set( pInterface ); }
/** Assignment operator: /** Assignment operator:
@@ -337,7 +346,7 @@ public:
@param pInterface an interface pointer @param pInterface an interface pointer
@return this reference @return this reference
*/ */
inline Reference< interface_type > & SAL_CALL operator = ( interface_type * pInterface ) throw (); inline Reference< interface_type > & SAL_CALL operator = ( interface_type * pInterface ) SAL_THROW( () );
/** Assignment operator: /** Assignment operator:
Acquires given interface reference and sets reference. Acquires given interface reference and sets reference.
An interface already set will be released. An interface already set will be released.
@@ -345,7 +354,7 @@ public:
@param rRef an interface reference @param rRef an interface reference
@return this reference @return this reference
*/ */
inline Reference< interface_type > & SAL_CALL operator = ( const Reference< interface_type > & rRef ) throw () inline Reference< interface_type > & SAL_CALL operator = ( const Reference< interface_type > & rRef ) SAL_THROW( () )
{ return operator = ( rRef.get() ); } { return operator = ( rRef.get() ); }
/** Queries given interface for type <b>interface_type</b>. /** Queries given interface for type <b>interface_type</b>.
@@ -353,15 +362,15 @@ public:
@param pInterface interface pointer @param pInterface interface pointer
@return interface reference of demanded type (may be null) @return interface reference of demanded type (may be null)
*/ */
inline static Reference< interface_type > SAL_CALL query( XInterface * pInterface ) throw (RuntimeException) inline static Reference< interface_type > SAL_CALL query( XInterface * pInterface ) SAL_THROW( (RuntimeException) )
{ return Reference< interface_type >( __query( pInterface ), UNO_REF_NO_ACQUIRE ); } { return Reference< interface_type >( __query( pInterface ), SAL_NO_ACQUIRE ); }
/** Queries given interface reference for type <b>interface_type</b>. /** Queries given interface reference for type <b>interface_type</b>.
<br> <br>
@param rRef interface reference @param rRef interface reference
@return interface reference of demanded type (may be null) @return interface reference of demanded type (may be null)
*/ */
inline static Reference< interface_type > SAL_CALL query( const BaseReference & rRef ) throw (RuntimeException) inline static Reference< interface_type > SAL_CALL query( const BaseReference & rRef ) SAL_THROW( (RuntimeException) )
{ return Reference< interface_type >( __query( rRef.get() ), UNO_REF_NO_ACQUIRE ); } { return Reference< interface_type >( __query( rRef.get() ), SAL_NO_ACQUIRE ); }
/** Cast operatory to Reference< XInterface >: /** Cast operatory to Reference< XInterface >:
Reference objects are binary compatible and any interface must be derived Reference objects are binary compatible and any interface must be derived
@@ -369,7 +378,7 @@ public:
This a useful direct cast possibility. This a useful direct cast possibility.
<br> <br>
*/ */
inline SAL_CALL operator const Reference< XInterface > & () const throw () inline SAL_CALL operator const Reference< XInterface > & () const SAL_THROW( () )
{ return * reinterpret_cast< const Reference< XInterface > * >( this ); } { return * reinterpret_cast< const Reference< XInterface > * >( this ); }
/** Dereference operator: /** Dereference operator:
@@ -377,7 +386,7 @@ public:
<br> <br>
@return <b>un</b>acquired interface pointer @return <b>un</b>acquired interface pointer
*/ */
inline interface_type * SAL_CALL operator -> () const throw () inline interface_type * SAL_CALL operator -> () const SAL_THROW( () )
{ return static_cast< interface_type * >( BaseReference::get() ); } { return static_cast< interface_type * >( BaseReference::get() ); }
/** Gets interface pointer. /** Gets interface pointer.
@@ -385,7 +394,7 @@ public:
<br> <br>
@return <b>un</b>acquired interface pointer @return <b>un</b>acquired interface pointer
*/ */
inline interface_type * SAL_CALL get() const throw () inline interface_type * SAL_CALL get() const SAL_THROW( () )
{ return static_cast< interface_type * >( BaseReference::get() ); } { return static_cast< interface_type * >( BaseReference::get() ); }
}; };

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: Reference.hxx,v $ * $RCSfile: Reference.hxx,v $
* *
* $Revision: 1.6 $ * $Revision: 1.7 $
* *
* last change: $Author: dbo $ $Date: 2001-02-28 15:34:05 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -85,37 +85,37 @@ namespace uno
{ {
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline BaseReference::BaseReference() throw () inline BaseReference::BaseReference() SAL_THROW( () )
: _pInterface( 0 ) : _pInterface( 0 )
{ {
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline BaseReference::BaseReference( XInterface * pInterface ) throw () inline BaseReference::BaseReference( XInterface * pInterface ) SAL_THROW( () )
: _pInterface( pInterface ) : _pInterface( pInterface )
{ {
if (_pInterface) if (_pInterface)
_pInterface->acquire(); _pInterface->acquire();
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline BaseReference::BaseReference( XInterface * pInterface, __UnoReference_NoAcquire ) throw () inline BaseReference::BaseReference( XInterface * pInterface, __sal_NoAcquire ) SAL_THROW( () )
: _pInterface( pInterface ) : _pInterface( pInterface )
{ {
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline BaseReference::BaseReference( const BaseReference & rRef ) throw () inline BaseReference::BaseReference( const BaseReference & rRef ) SAL_THROW( () )
: _pInterface( rRef._pInterface ) : _pInterface( rRef._pInterface )
{ {
if (_pInterface) if (_pInterface)
_pInterface->acquire(); _pInterface->acquire();
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline BaseReference::~BaseReference() throw () inline BaseReference::~BaseReference() SAL_THROW( () )
{ {
if (_pInterface) if (_pInterface)
_pInterface->release(); _pInterface->release();
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool BaseReference::operator == ( const BaseReference & rRef ) const throw () inline sal_Bool BaseReference::operator == ( const BaseReference & rRef ) const SAL_THROW( () )
{ {
if (_pInterface == rRef._pInterface) if (_pInterface == rRef._pInterface)
return sal_True; return sal_True;
@@ -125,7 +125,7 @@ inline sal_Bool BaseReference::operator == ( const BaseReference & rRef ) const
return (x1.get() == x2.get()); return (x1.get() == x2.get());
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool BaseReference::set( XInterface * pInterface ) throw () inline sal_Bool BaseReference::set( XInterface * pInterface ) SAL_THROW( () )
{ {
if (pInterface != _pInterface) if (pInterface != _pInterface)
{ {
@@ -138,7 +138,7 @@ inline sal_Bool BaseReference::set( XInterface * pInterface ) throw ()
return (pInterface != 0); return (pInterface != 0);
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool BaseReference::set( XInterface * pInterface, __UnoReference_NoAcquire ) throw () inline sal_Bool BaseReference::set( XInterface * pInterface, __sal_NoAcquire ) SAL_THROW( () )
{ {
if (_pInterface) if (_pInterface)
_pInterface->release(); _pInterface->release();
@@ -146,7 +146,7 @@ inline sal_Bool BaseReference::set( XInterface * pInterface, __UnoReference_NoAc
return (pInterface != 0); return (pInterface != 0);
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline void BaseReference::clear() throw () inline void BaseReference::clear() SAL_THROW( () )
{ {
if (_pInterface) if (_pInterface)
{ {
@@ -158,7 +158,7 @@ inline void BaseReference::clear() throw ()
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
template< class interface_type > template< class interface_type >
inline Reference< interface_type > & Reference< interface_type >::operator = ( inline Reference< interface_type > & Reference< interface_type >::operator = (
interface_type * pInterface ) throw () interface_type * pInterface ) SAL_THROW( () )
{ {
BaseReference::set( pInterface ); BaseReference::set( pInterface );
return *this; return *this;
@@ -166,7 +166,7 @@ inline Reference< interface_type > & Reference< interface_type >::operator = (
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
template< class interface_type > template< class interface_type >
inline XInterface * Reference< interface_type >::__query( inline XInterface * Reference< interface_type >::__query(
XInterface * pInterface ) throw (RuntimeException) XInterface * pInterface ) SAL_THROW( (RuntimeException) )
{ {
if (pInterface) if (pInterface)
{ {

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: Sequence.h,v $ * $RCSfile: Sequence.h,v $
* *
* $Revision: 1.7 $ * $Revision: 1.8 $
* *
* last change: $Author: dbo $ $Date: 2001-02-16 16:32:20 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -115,13 +115,13 @@ class Sequence
public: public:
// these are here to force memory de/allocation to sal lib. // 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 ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); } { return ::rtl_allocateMemory( nSize ); }
inline static void SAL_CALL operator delete( void * pMem ) throw () inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); } { ::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 ) SAL_THROW( () )
{ return pMem; } { return pMem; }
inline static void SAL_CALL operator delete( void *, void * ) throw () inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () )
{} {}
// static pointer to typelib type // static pointer to typelib type
@@ -136,31 +136,38 @@ public:
Creates an empty sequence. Creates an empty sequence.
<br> <br>
*/ */
inline Sequence< E >() throw (); inline Sequence< E >() SAL_THROW( () );
/** Copy constructor: /** Copy constructor:
Creates a copy of given sequence. Creates a copy of given sequence.
<br> <br>
@param rSeq another sequence of same type @param rSeq another sequence of same type
*/ */
inline Sequence< E >( const Sequence< E > & rSeq ) throw (); inline Sequence< E >( const Sequence< E > & rSeq ) SAL_THROW( () );
/** Constructor:
Takes over ownership of given sequence.
<br>
@param pSequence a sequence
@param dummy SAL_NO_ACQUIRE to force obvious distinction to other constructors
*/
inline Sequence< E >( uno_Sequence * pSequence, __sal_NoAcquire ) SAL_THROW( () );
/** Constructor: /** Constructor:
Creates a copy of given elements. Creates a copy of given elements.
<br> <br>
@param pElement an array of elements @param pElement an array of elements
@param len length of array @param len length of array
*/ */
inline Sequence< E >( const E * pElements, sal_Int32 len ) throw (); inline Sequence< E >( const E * pElements, sal_Int32 len ) SAL_THROW( () );
/** Constructor: /** Constructor:
Creates a default constructed sequence of given length. Creates a default constructed sequence of given length.
<br> <br>
@param len initial sequence length @param len initial sequence length
*/ */
inline Sequence< E >( sal_Int32 len ) throw (); inline Sequence< E >( sal_Int32 len ) SAL_THROW( () );
/** Destructor: /** Destructor:
Releases sequence handle. Last handle will destruct elements and free memory. Releases sequence handle. Last handle will destruct elements and free memory.
<br> <br>
*/ */
inline ~Sequence< E >() throw (); inline ~Sequence< E >() SAL_THROW( () );
/** Assignment operator: /** Assignment operator:
Acquires given sequence handle and releases previously set handle. Acquires given sequence handle and releases previously set handle.
@@ -168,26 +175,26 @@ public:
@param rSeq another sequence of same type @param rSeq another sequence of same type
@return this sequence @return this sequence
*/ */
inline Sequence< E > & SAL_CALL operator = ( const Sequence< E > & rSeq ) throw (); inline Sequence< E > & SAL_CALL operator = ( const Sequence< E > & rSeq ) SAL_THROW( () );
/** Gets type of elements. /** Gets type of elements.
<br> <br>
@return type of element @return type of element
*/ */
inline const Type & getElementType() const throw () inline const Type & getElementType() const SAL_THROW( () )
{ return ::getCppuType( (const ElementType *)0 ); } { return ::getCppuType( (const ElementType *)0 ); }
/** Gets length of sequence. /** Gets length of sequence.
<br> <br>
@return length of sequence @return length of sequence
*/ */
inline sal_Int32 SAL_CALL getLength() const throw () inline sal_Int32 SAL_CALL getLength() const SAL_THROW( () )
{ return _pSequence->nElements; } { return _pSequence->nElements; }
/** Tests whether the sequence has elements, i.e. elements count is greater than zero. /** Tests whether the sequence has elements, i.e. elements count is greater than zero.
<br> <br>
@return true, if elements count is greater than zero @return true, if elements count is greater than zero
*/ */
inline sal_Bool SAL_CALL hasElements() const throw () inline sal_Bool SAL_CALL hasElements() const SAL_THROW( () )
{ return (_pSequence->nElements > 0); } { return (_pSequence->nElements > 0); }
/** Gets a pointer to elements array for <b>reading</b>. /** Gets a pointer to elements array for <b>reading</b>.
@@ -195,7 +202,7 @@ public:
<br> <br>
@return pointer to elements array @return pointer to elements array
*/ */
inline const E * SAL_CALL getConstArray() const throw () inline const E * SAL_CALL getConstArray() const SAL_THROW( () )
{ return reinterpret_cast< const E * >( _pSequence->elements ); } { return reinterpret_cast< const E * >( _pSequence->elements ); }
/** Gets a pointer to elements array for <b>reading and writing</b>.<br> /** 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 In general if the sequence has a handle acquired by other sequences
@@ -205,7 +212,7 @@ public:
<br> <br>
@return pointer to elements array @return pointer to elements array
*/ */
inline E * SAL_CALL getArray() throw (); inline E * SAL_CALL getArray() SAL_THROW( () );
/** Non-const index operator: /** Non-const index operator:
Obtains a reference to element indexed at given position.<br> Obtains a reference to element indexed at given position.<br>
@@ -217,7 +224,7 @@ public:
@param nIndex index @param nIndex index
@return non-const C++ reference to element @return non-const C++ reference to element
*/ */
inline E & SAL_CALL operator [] ( sal_Int32 nIndex ) throw (); inline E & SAL_CALL operator [] ( sal_Int32 nIndex ) SAL_THROW( () );
/** Const index operator: /** Const index operator:
Obtains a reference to element indexed at given position.<br> Obtains a reference to element indexed at given position.<br>
The implementation does <b>not</b> check for array bounds!<br> The implementation does <b>not</b> check for array bounds!<br>
@@ -225,7 +232,7 @@ public:
@param nIndex index @param nIndex index
@return const C++ reference to element @return const C++ reference to element
*/ */
inline const E & SAL_CALL operator [] ( sal_Int32 nIndex ) const throw (); inline const E & SAL_CALL operator [] ( sal_Int32 nIndex ) const SAL_THROW( () );
/** Equality operator: /** Equality operator:
Compares two sequences. Compares two sequences.
@@ -233,14 +240,14 @@ public:
@param rSeq another sequence of same type (right side) @param rSeq another sequence of same type (right side)
@return true if both sequences are equal, false otherwise @return true if both sequences are equal, false otherwise
*/ */
inline sal_Bool SAL_CALL operator == ( const Sequence< E > & rSeq ) const throw (); inline sal_Bool SAL_CALL operator == ( const Sequence< E > & rSeq ) const SAL_THROW( () );
/** Unequality operator: /** Unequality operator:
Compares two sequences. Compares two sequences.
<br> <br>
@param rSeq another sequence of same type (right side) @param rSeq another sequence of same type (right side)
@return false if both sequences are equal, true otherwise @return false if both sequences are equal, true otherwise
*/ */
inline sal_Bool SAL_CALL operator != ( const Sequence< E > & rSeq ) const throw () inline sal_Bool SAL_CALL operator != ( const Sequence< E > & rSeq ) const SAL_THROW( () )
{ return (! operator == ( rSeq )); } { return (! operator == ( rSeq )); }
/** Reallocates sequence to new length. /** Reallocates sequence to new length.
@@ -254,7 +261,7 @@ public:
<br> <br>
@param nSize new size of sequence @param nSize new size of sequence
*/ */
inline void SAL_CALL realloc( sal_Int32 nSize ) throw (); inline void SAL_CALL realloc( sal_Int32 nSize ) SAL_THROW( () );
}; };
/** Creates a UNO byte sequence from a SAL byte sequence. /** Creates a UNO byte sequence from a SAL byte sequence.
@@ -263,7 +270,7 @@ public:
@return a UNO byte sequence @return a UNO byte sequence
*/ */
inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence( inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence(
const ::rtl::ByteSequence & rByteSequence ) throw (); const ::rtl::ByteSequence & rByteSequence ) SAL_THROW( () );
} }
} }
@@ -277,7 +284,7 @@ inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence(
*/ */
template< class S > template< class S >
inline const ::com::sun::star::uno::Type & inline const ::com::sun::star::uno::Type &
SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * ) throw (); SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * ) SAL_THROW( () );
/** Gets the meta type of IDL <b>sequence< char ></b>. /** Gets the meta type of IDL <b>sequence< char ></b>.
This function has been introduced due to ambiguities with unsigned short. This function has been introduced due to ambiguities with unsigned short.
@@ -286,6 +293,6 @@ SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * ) throw ();
@return type of IDL <b>sequence< char ></b> @return type of IDL <b>sequence< char ></b>
*/ */
inline const ::com::sun::star::uno::Type & inline const ::com::sun::star::uno::Type &
SAL_CALL getCharSequenceCppuType() throw (); SAL_CALL getCharSequenceCppuType() SAL_THROW( () );
#endif #endif

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: Sequence.hxx,v $ * $RCSfile: Sequence.hxx,v $
* *
* $Revision: 1.8 $ * $Revision: 1.9 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -103,43 +103,49 @@ typelib_TypeDescriptionReference * Sequence< E >::s_pType = 0;
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
template< class E > template< class E >
inline Sequence< E >::Sequence() throw () inline Sequence< E >::Sequence() SAL_THROW( () )
{ {
const Type & rType = ::getCppuType( this ); const Type & rType = ::getCppuType( this );
::uno_type_sequence_construct( &_pSequence, rType.getTypeLibType(), 0, 0, cpp_acquire ); ::uno_type_sequence_construct( &_pSequence, rType.getTypeLibType(), 0, 0, cpp_acquire );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
template< class E > template< class E >
inline Sequence< E >::Sequence( const Sequence< E > & rSeq ) throw () inline Sequence< E >::Sequence( const Sequence< E > & rSeq ) SAL_THROW( () )
{ {
::osl_incrementInterlockedCount( &rSeq._pSequence->nRefCount ); ::osl_incrementInterlockedCount( &rSeq._pSequence->nRefCount );
_pSequence = rSeq._pSequence; _pSequence = rSeq._pSequence;
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
template< class E > template< class E >
inline Sequence< E >::Sequence( const E * pElements, sal_Int32 len ) throw () inline Sequence< E >::Sequence( uno_Sequence * pSequence, __sal_NoAcquire ) SAL_THROW( () )
: _pSequence( pSequence )
{ {
const Type & rType = ::getCppuType( this );
::uno_type_sequence_construct( &_pSequence, rType.getTypeLibType(),
const_cast< E * >( pElements ), len, cpp_acquire );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
template< class E > template< class E >
inline Sequence< E >::Sequence( sal_Int32 len ) throw () inline Sequence< E >::Sequence( const E * pElements, sal_Int32 len ) SAL_THROW( () )
{
const Type & rType = ::getCppuType( this );
::uno_type_sequence_construct(
&_pSequence, rType.getTypeLibType(), const_cast< E * >( pElements ), len, cpp_acquire );
}
//__________________________________________________________________________________________________
template< class E >
inline Sequence< E >::Sequence( sal_Int32 len ) SAL_THROW( () )
{ {
const Type & rType = ::getCppuType( this ); const Type & rType = ::getCppuType( this );
::uno_type_sequence_construct( &_pSequence, rType.getTypeLibType(), 0, len, cpp_acquire ); ::uno_type_sequence_construct( &_pSequence, rType.getTypeLibType(), 0, len, cpp_acquire );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
template< class E > template< class E >
inline Sequence< E >::~Sequence() throw () inline Sequence< E >::~Sequence() SAL_THROW( () )
{ {
const Type & rType = ::getCppuType( this ); const Type & rType = ::getCppuType( this );
::uno_type_destructData( this, rType.getTypeLibType(), cpp_release ); ::uno_type_destructData( this, rType.getTypeLibType(), cpp_release );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
template< class E > template< class E >
inline Sequence< E > & Sequence< E >::operator = ( const Sequence< E > & rSeq ) throw () inline Sequence< E > & Sequence< E >::operator = ( const Sequence< E > & rSeq ) SAL_THROW( () )
{ {
const Type & rType = ::getCppuType( this ); const Type & rType = ::getCppuType( this );
::uno_type_sequence_assign( ::uno_type_sequence_assign(
@@ -148,7 +154,7 @@ inline Sequence< E > & Sequence< E >::operator = ( const Sequence< E > & rSeq )
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
template< class E > template< class E >
inline sal_Bool Sequence< E >::operator == ( const Sequence< E > & rSeq ) const throw () inline sal_Bool Sequence< E >::operator == ( const Sequence< E > & rSeq ) const SAL_THROW( () )
{ {
if (_pSequence == rSeq._pSequence) if (_pSequence == rSeq._pSequence)
return sal_True; return sal_True;
@@ -160,7 +166,7 @@ inline sal_Bool Sequence< E >::operator == ( const Sequence< E > & rSeq ) const
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
template< class E > template< class E >
inline E * Sequence< E >::getArray() throw () inline E * Sequence< E >::getArray() SAL_THROW( () )
{ {
const Type & rType = ::getCppuType( this ); const Type & rType = ::getCppuType( this );
::uno_type_sequence_reference2One( ::uno_type_sequence_reference2One(
@@ -169,21 +175,21 @@ inline E * Sequence< E >::getArray() throw ()
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
template< class E > template< class E >
inline E & Sequence< E >::operator [] ( sal_Int32 nIndex ) throw () inline E & Sequence< E >::operator [] ( sal_Int32 nIndex ) SAL_THROW( () )
{ {
OSL_ENSURE( nIndex >= 0 && nIndex < getLength(), "### illegal index of sequence!" ); OSL_ENSURE( nIndex >= 0 && nIndex < getLength(), "### illegal index of sequence!" );
return getArray()[ nIndex ]; return getArray()[ nIndex ];
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
template< class E > template< class E >
inline const E & Sequence< E >::operator [] ( sal_Int32 nIndex ) const throw () inline const E & Sequence< E >::operator [] ( sal_Int32 nIndex ) const SAL_THROW( () )
{ {
OSL_ENSURE( nIndex >= 0 && nIndex < getLength(), "### illegal index of sequence!" ); OSL_ENSURE( nIndex >= 0 && nIndex < getLength(), "### illegal index of sequence!" );
return getConstArray()[ nIndex ]; return getConstArray()[ nIndex ];
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
template< class E > template< class E >
inline void Sequence< E >::realloc( sal_Int32 nSize ) throw () inline void Sequence< E >::realloc( sal_Int32 nSize ) SAL_THROW( () )
{ {
const Type & rType = ::getCppuType( this ); const Type & rType = ::getCppuType( this );
::uno_type_sequence_realloc( ::uno_type_sequence_realloc(
@@ -192,7 +198,7 @@ inline void Sequence< E >::realloc( sal_Int32 nSize ) throw ()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence( inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence(
const ::rtl::ByteSequence & rByteSequence ) throw () const ::rtl::ByteSequence & rByteSequence ) SAL_THROW( () )
{ {
return ::com::sun::star::uno::Sequence< sal_Int8 >( return ::com::sun::star::uno::Sequence< sal_Int8 >(
* reinterpret_cast< const ::com::sun::star::uno::Sequence< sal_Int8 > * >( &rByteSequence ) ); * reinterpret_cast< const ::com::sun::star::uno::Sequence< sal_Int8 > * >( &rByteSequence ) );
@@ -206,7 +212,7 @@ inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence(
// generic sequence template // generic sequence template
template< class S > template< class S >
inline const ::com::sun::star::uno::Type & inline const ::com::sun::star::uno::Type &
SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * ) throw () SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * ) SAL_THROW( () )
{ {
if (! ::com::sun::star::uno::Sequence< S >::s_pType) if (! ::com::sun::star::uno::Sequence< S >::s_pType)
{ {
@@ -226,7 +232,7 @@ static typelib_TypeDescriptionReference * s_pType_com_sun_star_uno_Sequence_Char
// char sequence // char sequence
inline const ::com::sun::star::uno::Type & inline const ::com::sun::star::uno::Type &
SAL_CALL getCharSequenceCppuType() throw () SAL_CALL getCharSequenceCppuType() SAL_THROW( () )
{ {
#if !( (defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500)) || (defined(__GNUC__) && defined(__APPLE__)) ) #if !( (defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500)) || (defined(__GNUC__) && defined(__APPLE__)) )
static typelib_TypeDescriptionReference * s_pType_com_sun_star_uno_Sequence_Char = 0; static typelib_TypeDescriptionReference * s_pType_com_sun_star_uno_Sequence_Char = 0;

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: Type.h,v $ * $RCSfile: Type.h,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -101,7 +101,7 @@ enum __UnoType_NoAcquire
type description reference, i.e. transferring ownership to it. type description reference, i.e. transferring ownership to it.
<br> <br>
*/ */
UNO_TYPE_NO_ACQUIRE = 0xbebeef1e UNO_TYPE_NO_ACQUIRE
}; };
/** C++ class representing an IDL meta type. /** C++ class representing an IDL meta type.
@@ -119,20 +119,20 @@ class Type
public: public:
// these are here to force memory de/allocation to sal lib. // 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 ) SAL_THROW( () )
{ return ::rtl_allocateMemory( nSize ); } { return ::rtl_allocateMemory( nSize ); }
inline static void SAL_CALL operator delete( void * pMem ) throw () inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
{ ::rtl_freeMemory( pMem ); } { ::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 ) SAL_THROW( () )
{ return pMem; } { return pMem; }
inline static void SAL_CALL operator delete( void *, void * ) throw () inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () )
{} {}
/** Default Constructor: /** Default Constructor:
Type is set to void. Type is set to void.
<br> <br>
*/ */
inline Type() throw (); inline Type() SAL_THROW( () );
/** Constructor: /** Constructor:
Type is constructed by given name and type class. Type is constructed by given name and type class.
@@ -140,7 +140,7 @@ public:
@param eTypeClass type class of type @param eTypeClass type class of type
@param rTypeName name of type @param rTypeName name of type
*/ */
inline Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ) throw (); inline Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ) SAL_THROW( () );
/** Constructor: /** Constructor:
Type is constructed by given name and type class. Type is constructed by given name and type class.
@@ -148,14 +148,14 @@ public:
@param eTypeClass type class of type @param eTypeClass type class of type
@param pTypeName name of type @param pTypeName name of type
*/ */
inline Type( TypeClass eTypeClass, const sal_Char * pTypeName ) throw (); inline Type( TypeClass eTypeClass, const sal_Char * pTypeName ) SAL_THROW( () );
/** Constructor: /** Constructor:
Type is (copy) constructed by given C type description reference. Type is (copy) constructed by given C type description reference.
<br> <br>
@param pType C type description reference @param pType C type description reference
*/ */
inline Type( typelib_TypeDescriptionReference * pType ) throw (); inline Type( typelib_TypeDescriptionReference * pType ) SAL_THROW( () );
/** Constructor: /** Constructor:
Type is (copy) constructed by given C type description reference without acquiring it. Type is (copy) constructed by given C type description reference without acquiring it.
@@ -163,20 +163,27 @@ public:
@param pType C type description reference @param pType C type description reference
@param dummy UNO_TYPE_NO_ACQUIRE to force obvious distinction to other constructors @param dummy UNO_TYPE_NO_ACQUIRE to force obvious distinction to other constructors
*/ */
inline Type( typelib_TypeDescriptionReference * pType, __UnoType_NoAcquire ) throw (); inline Type( typelib_TypeDescriptionReference * pType, __UnoType_NoAcquire ) SAL_THROW( () );
/** Constructor:
Type is (copy) constructed by given C type description reference without acquiring it.
<br>
@param pType C type description reference
@param dummy SAL_NO_ACQUIRE to force obvious distinction to other constructors
*/
inline Type( typelib_TypeDescriptionReference * pType, __sal_NoAcquire ) SAL_THROW( () );
/** Copy constructor: /** Copy constructor:
Type is copy constructed by given type. Type is copy constructed by given type.
<br> <br>
@param rType another type @param rType another type
*/ */
inline Type( const Type & rType ) throw (); inline Type( const Type & rType ) SAL_THROW( () );
/** Destructor: /** Destructor:
Releases acquired C type description reference. Releases acquired C type description reference.
<br> <br>
*/ */
inline ~Type() throw () inline ~Type() SAL_THROW( () )
{ ::typelib_typedescriptionreference_release( _pType ); } { ::typelib_typedescriptionreference_release( _pType ); }
/** Assignment operator: /** Assignment operator:
@@ -185,27 +192,27 @@ public:
@param rType another type (right side) @param rType another type (right side)
@return this type @return this type
*/ */
inline Type & SAL_CALL operator = ( const Type & rType ) throw (); inline Type & SAL_CALL operator = ( const Type & rType ) SAL_THROW( () );
/** Gets the type class of set type. /** Gets the type class of set type.
<br> <br>
@return type class of set type @return type class of set type
*/ */
inline TypeClass SAL_CALL getTypeClass() const throw () inline TypeClass SAL_CALL getTypeClass() const SAL_THROW( () )
{ return (TypeClass)_pType->eTypeClass; } { return (TypeClass)_pType->eTypeClass; }
/** Gets the name of the set type. /** Gets the name of the set type.
<br> <br>
@return name of the set type @return name of the set type
*/ */
inline ::rtl::OUString SAL_CALL getTypeName() const throw () inline ::rtl::OUString SAL_CALL getTypeName() const SAL_THROW( () )
{ return ::rtl::OUString( _pType->pTypeName ); } { return ::rtl::OUString( _pType->pTypeName ); }
/** Obtains a full type description of set type. /** Obtains a full type description of set type.
<br> <br>
@param ppDescr [inout] type description @param ppDescr [inout] type description
*/ */
inline void SAL_CALL getDescription( typelib_TypeDescription ** ppDescr ) const throw () inline void SAL_CALL getDescription( typelib_TypeDescription ** ppDescr ) const SAL_THROW( () )
{ ::typelib_typedescriptionreference_getDescription( ppDescr, _pType ); } { ::typelib_typedescriptionreference_getDescription( ppDescr, _pType ); }
/** Gets the C typelib type description reference pointer. /** Gets the C typelib type description reference pointer.
@@ -213,7 +220,7 @@ public:
<br> <br>
@return <b>un</b>acquired type description reference @return <b>un</b>acquired type description reference
*/ */
inline typelib_TypeDescriptionReference * SAL_CALL getTypeLibType() const throw () inline typelib_TypeDescriptionReference * SAL_CALL getTypeLibType() const SAL_THROW( () )
{ return _pType; } { return _pType; }
/** Compares two types. /** Compares two types.
@@ -221,7 +228,7 @@ public:
@param rType another type @param rType another type
@return true if both types refer the same type, false otherwise @return true if both types refer the same type, false otherwise
*/ */
inline sal_Bool SAL_CALL equals( const Type & rType ) const throw () inline sal_Bool SAL_CALL equals( const Type & rType ) const SAL_THROW( () )
{ return ::typelib_typedescriptionreference_equals( _pType, rType._pType ); } { return ::typelib_typedescriptionreference_equals( _pType, rType._pType ); }
/** Equality operator: /** Equality operator:
Compares two types. Compares two types.
@@ -229,7 +236,7 @@ public:
@param rType another type @param rType another type
@return true if both types refer the same type, false otherwise @return true if both types refer the same type, false otherwise
*/ */
inline sal_Bool SAL_CALL operator == ( const Type & rType ) const throw () inline sal_Bool SAL_CALL operator == ( const Type & rType ) const SAL_THROW( () )
{ return equals( rType ); } { return equals( rType ); }
/** Unequality operator: /** Unequality operator:
Compares two types. Compares two types.
@@ -237,7 +244,7 @@ public:
@param rType another type @param rType another type
@return false if both types refer the same type, true otherwise @return false if both types refer the same type, true otherwise
*/ */
inline sal_Bool SAL_CALL operator != ( const Type & rType ) const throw () inline sal_Bool SAL_CALL operator != ( const Type & rType ) const SAL_THROW( () )
{ return (! equals( rType )); } { return (! equals( rType )); }
}; };
@@ -251,114 +258,114 @@ public:
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>type</b> @return type of IDL type <b>type</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * ) throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>void</b>. /** Gets the meta type of IDL type <b>void</b>.
@return 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() throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType() SAL_THROW( () );
/** Gets the meta type of IDL type <b>void</b>. /** Gets the meta type of IDL type <b>void</b>.
<br> <br>
@return type of IDL type <b>void</b> @return type of IDL type <b>void</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType() throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType() SAL_THROW( () );
/** Gets the meta type of IDL type <b>boolean</b>. /** Gets the meta type of IDL type <b>boolean</b>.
<br> <br>
@return type of IDL type <b>boolean</b> @return type of IDL type <b>boolean</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType() throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType() SAL_THROW( () );
/** Gets the meta type of IDL type <b>boolean</b>. /** Gets the meta type of IDL type <b>boolean</b>.
<br> <br>
@return type of IDL type <b>boolean</b> @return type of IDL type <b>boolean</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() SAL_THROW( () );
/** Gets the meta type of IDL type <b>boolean</b>. /** Gets the meta type of IDL type <b>boolean</b>.
<br> <br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>boolean</b> @return type of IDL type <b>boolean</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * ) throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>char</b>. /** Gets the meta type of IDL type <b>char</b>.
<br> <br>
@return type of IDL type <b>char</b> @return type of IDL type <b>char</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType() throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType() SAL_THROW( () );
/** Gets the meta type of IDL type <b>char</b>. /** Gets the meta type of IDL type <b>char</b>.
<br> <br>
@return type of IDL type <b>char</b> @return type of IDL type <b>char</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() SAL_THROW( () );
/** Gets the meta type of IDL type <b>byte</b>. /** Gets the meta type of IDL type <b>byte</b>.
<br> <br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>byte</b> @return type of IDL type <b>byte</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * ) throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>string</b>. /** Gets the meta type of IDL type <b>string</b>.
<br> <br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>string</b> @return type of IDL type <b>string</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * ) throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>short</b>. /** Gets the meta type of IDL type <b>short</b>.
<br> <br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>short</b> @return type of IDL type <b>short</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * ) throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>unsigned short</b>. /** Gets the meta type of IDL type <b>unsigned short</b>.
<br> <br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>unsigned short</b> @return type of IDL type <b>unsigned short</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * ) throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>long</b>. /** Gets the meta type of IDL type <b>long</b>.
<br> <br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>long</b> @return type of IDL type <b>long</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * ) throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>unsigned long</b>. /** Gets the meta type of IDL type <b>unsigned long</b>.
<br> <br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>unsigned long</b> @return type of IDL type <b>unsigned long</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * ) throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>hyper</b>. /** Gets the meta type of IDL type <b>hyper</b>.
<br> <br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>hyper</b> @return type of IDL type <b>hyper</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * ) throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>unsigned hyper</b>. /** Gets the meta type of IDL type <b>unsigned hyper</b>.
<br> <br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>unsigned hyper</b> @return type of IDL type <b>unsigned hyper</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * ) throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>float</b>. /** Gets the meta type of IDL type <b>float</b>.
<br> <br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>float</b> @return type of IDL type <b>float</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ) throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>double</b>. /** Gets the meta type of IDL type <b>double</b>.
<br> <br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>double</b> @return type of IDL type <b>double</b>
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ) throw (); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ) SAL_THROW( () );
#endif #endif

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: Type.hxx,v $ * $RCSfile: Type.hxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:35:22 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -84,43 +84,48 @@ namespace uno
{ {
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Type::Type() throw () inline Type::Type() SAL_THROW( () )
{ {
_pType = reinterpret_cast< const ::com::sun::star::uno::Type * >( _pType = reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_VOID ) )->getTypeLibType(); ::typelib_static_type_getByTypeClass( typelib_TypeClass_VOID ) )->getTypeLibType();
::typelib_typedescriptionreference_acquire( _pType ); ::typelib_typedescriptionreference_acquire( _pType );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Type::Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ) throw () inline Type::Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ) SAL_THROW( () )
: _pType( 0 ) : _pType( 0 )
{ {
::typelib_typedescriptionreference_new( &_pType, (typelib_TypeClass)eTypeClass, rTypeName.pData ); ::typelib_typedescriptionreference_new( &_pType, (typelib_TypeClass)eTypeClass, rTypeName.pData );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Type::Type( TypeClass eTypeClass, const sal_Char * pTypeName ) throw () inline Type::Type( TypeClass eTypeClass, const sal_Char * pTypeName ) SAL_THROW( () )
: _pType( 0 ) : _pType( 0 )
{ {
::typelib_typedescriptionreference_newByAsciiName( &_pType, (typelib_TypeClass)eTypeClass, pTypeName ); ::typelib_typedescriptionreference_newByAsciiName( &_pType, (typelib_TypeClass)eTypeClass, pTypeName );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Type::Type( typelib_TypeDescriptionReference * pType ) throw () inline Type::Type( typelib_TypeDescriptionReference * pType ) SAL_THROW( () )
: _pType( pType ) : _pType( pType )
{ {
::typelib_typedescriptionreference_acquire( _pType ); ::typelib_typedescriptionreference_acquire( _pType );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Type::Type( typelib_TypeDescriptionReference * pType, __UnoType_NoAcquire ) throw () inline Type::Type( typelib_TypeDescriptionReference * pType, __UnoType_NoAcquire ) SAL_THROW( () )
: _pType( pType ) : _pType( pType )
{ {
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Type::Type( const Type & rType ) throw () inline Type::Type( typelib_TypeDescriptionReference * pType, __sal_NoAcquire ) SAL_THROW( () )
: _pType( pType )
{
}
//__________________________________________________________________________________________________
inline Type::Type( const Type & rType ) SAL_THROW( () )
: _pType( rType._pType ) : _pType( rType._pType )
{ {
::typelib_typedescriptionreference_acquire( _pType ); ::typelib_typedescriptionreference_acquire( _pType );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Type & Type::operator = ( const Type & rType ) throw () inline Type & Type::operator = ( const Type & rType ) SAL_THROW( () )
{ {
::typelib_typedescriptionreference_assign( &_pType, rType._pType ); ::typelib_typedescriptionreference_assign( &_pType, rType._pType );
return *this; return *this;
@@ -131,105 +136,105 @@ inline Type & Type::operator = ( const Type & rType ) throw ()
} }
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * ) throw () inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * ) SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_TYPE ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_TYPE ) );
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType() throw () inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType() SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_VOID ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_VOID ) );
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType() throw () inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType() SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_VOID ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_VOID ) );
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType() throw () inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType() SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_BOOLEAN ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_BOOLEAN ) );
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() throw () inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_BOOLEAN ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_BOOLEAN ) );
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * ) throw () inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * ) SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_BOOLEAN ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_BOOLEAN ) );
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType() throw () inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType() SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_CHAR ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_CHAR ) );
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() throw () inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_CHAR ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_CHAR ) );
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * ) throw () inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * ) SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_BYTE ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_BYTE ) );
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * ) throw () inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * ) SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_STRING ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_STRING ) );
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * ) throw () inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * ) SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_SHORT ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_SHORT ) );
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * ) throw () inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * ) SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_UNSIGNED_SHORT ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_UNSIGNED_SHORT ) );
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * ) throw () inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * ) SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_LONG ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_LONG ) );
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * ) throw () inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * ) SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_UNSIGNED_LONG ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_UNSIGNED_LONG ) );
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * ) throw () inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * ) SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_HYPER ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_HYPER ) );
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * ) throw () inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * ) SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_UNSIGNED_HYPER ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_UNSIGNED_HYPER ) );
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ) throw () inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ) SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_FLOAT ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_FLOAT ) );
} }
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ) throw () inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ) SAL_THROW( () )
{ {
return * reinterpret_cast< const ::com::sun::star::uno::Type * >( return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
::typelib_static_type_getByTypeClass( typelib_TypeClass_DOUBLE ) ); ::typelib_static_type_getByTypeClass( typelib_TypeClass_DOUBLE ) );

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: genfunc.h,v $ * $RCSfile: genfunc.h,v $
* *
* $Revision: 1.5 $ * $Revision: 1.6 $
* *
* last change: $Author: dbo $ $Date: 2001-02-27 12:16:24 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -83,13 +83,13 @@ extern "C"
@param pCppI C++ interface pointer @param pCppI C++ interface pointer
*/ */
inline void SAL_CALL cpp_acquire( void * pCppI ) inline void SAL_CALL cpp_acquire( void * pCppI )
throw (); SAL_THROW( () );
/** C function to release a C++ interface. /** C function to release a C++ interface.
<br> <br>
@param pCppI C++ interface pointer @param pCppI C++ interface pointer
*/ */
inline void SAL_CALL cpp_release( void * pCppI ) inline void SAL_CALL cpp_release( void * pCppI )
throw (); SAL_THROW( () );
/** C function to query for a C++ interface. /** C function to query for a C++ interface.
<br> <br>
@param pCppI C++ interface pointer @param pCppI C++ interface pointer
@@ -97,7 +97,7 @@ inline void SAL_CALL cpp_release( void * pCppI )
@return acquired C++ interface pointer or null @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 (); SAL_THROW( () );
} }
} }

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: genfunc.hxx,v $ * $RCSfile: genfunc.hxx,v $
* *
* $Revision: 1.6 $ * $Revision: 1.7 $
* *
* last change: $Author: dbo $ $Date: 2001-02-28 15:34:05 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -86,19 +86,19 @@ extern "C"
{ {
//================================================================================================== //==================================================================================================
inline void SAL_CALL cpp_acquire( void * pCppI ) inline void SAL_CALL cpp_acquire( void * pCppI )
throw () SAL_THROW( () )
{ {
reinterpret_cast< XInterface * >( pCppI )->acquire(); reinterpret_cast< XInterface * >( pCppI )->acquire();
} }
//================================================================================================== //==================================================================================================
inline void SAL_CALL cpp_release( void * pCppI ) inline void SAL_CALL cpp_release( void * pCppI )
throw () SAL_THROW( () )
{ {
reinterpret_cast< XInterface * >( pCppI )->release(); 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 () SAL_THROW( () )
{ {
if (pCppI) if (pCppI)
{ {

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: typedescription.h,v $ * $RCSfile: typedescription.h,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: dbo $ $Date: 2001-01-09 12:47:35 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -501,7 +501,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newUnion(
sal_Int64 nDefaultDiscriminant, sal_Int64 nDefaultDiscriminant,
typelib_TypeDescriptionReference * pDefaultTypeRef, typelib_TypeDescriptionReference * pDefaultTypeRef,
sal_Int32 nMembers, sal_Int32 nMembers,
typelib_Union_Init * pMembers ) SAL_THROW (); typelib_Union_Init * pMembers )
SAL_THROW_EXTERN_C();
/** Creates an enum type description. /** Creates an enum type description.
<br> <br>
@@ -518,7 +519,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newEnum(
sal_Int32 nDefaultValue, sal_Int32 nDefaultValue,
sal_Int32 nEnumValues, sal_Int32 nEnumValues,
rtl_uString ** ppEnumNames, rtl_uString ** ppEnumNames,
sal_Int32 * pEnumValues ) SAL_THROW (); sal_Int32 * pEnumValues )
SAL_THROW_EXTERN_C();
/** Creates a new type description. /** Creates a new type description.
<br> <br>
@@ -536,7 +538,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_new(
rtl_uString * pTypeName, rtl_uString * pTypeName,
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
sal_Int32 nMembers, sal_Int32 nMembers,
typelib_CompoundMember_Init * pMembers ) SAL_THROW (); typelib_CompoundMember_Init * pMembers )
SAL_THROW_EXTERN_C();
/** Creates an interface type description. /** Creates an interface type description.
<br> <br>
@@ -557,7 +560,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newInterface(
sal_uInt32 nUik1, sal_uInt16 nUik2, sal_uInt16 nUik3, sal_uInt32 nUik4, sal_uInt32 nUik5, sal_uInt32 nUik1, sal_uInt16 nUik2, sal_uInt16 nUik3, sal_uInt32 nUik4, sal_uInt32 nUik5,
typelib_TypeDescriptionReference * pBaseInterface, typelib_TypeDescriptionReference * pBaseInterface,
sal_Int32 nMembers, sal_Int32 nMembers,
typelib_TypeDescriptionReference ** ppMembers ) SAL_THROW (); typelib_TypeDescriptionReference ** ppMembers )
SAL_THROW_EXTERN_C();
/** Creates an interface method type description. /** Creates an interface method type description.
<br> <br>
@@ -582,7 +586,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newInterfaceMethod(
sal_Int32 nParams, sal_Int32 nParams,
typelib_Parameter_Init * pParams, typelib_Parameter_Init * pParams,
sal_Int32 nExceptions, sal_Int32 nExceptions,
rtl_uString ** ppExceptionNames ) SAL_THROW (); rtl_uString ** ppExceptionNames )
SAL_THROW_EXTERN_C();
/** Creates an interface attribute type description. /** Creates an interface attribute type description.
<br> <br>
@@ -598,14 +603,16 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newInterfaceAttribute(
rtl_uString * pAttributeName, rtl_uString * pAttributeName,
typelib_TypeClass eAttributeTypeClass, typelib_TypeClass eAttributeTypeClass,
rtl_uString * pAttributeTypeName, rtl_uString * pAttributeTypeName,
sal_Bool bReadOnly ) SAL_THROW (); sal_Bool bReadOnly )
SAL_THROW_EXTERN_C();
/** Increments reference count of given type description. /** Increments reference count of given type description.
<br> <br>
@param pDesc type description @param pDesc type description
*/ */
SAL_DLLEXPORT void SAL_CALL typelib_typedescription_acquire( SAL_DLLEXPORT void SAL_CALL typelib_typedescription_acquire(
typelib_TypeDescription * pDesc ) SAL_THROW (); typelib_TypeDescription * pDesc )
SAL_THROW_EXTERN_C();
/** Decrements reference count of given type.<br> /** Decrements reference count of given type.<br>
If reference count reaches 0, the trype description is deleted. If reference count reaches 0, the trype description is deleted.
@@ -613,7 +620,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_acquire(
@param pDesc type description @param pDesc type description
*/ */
SAL_DLLEXPORT void SAL_CALL typelib_typedescription_release( SAL_DLLEXPORT void SAL_CALL typelib_typedescription_release(
typelib_TypeDescription * pDesc ) SAL_THROW (); typelib_TypeDescription * pDesc )
SAL_THROW_EXTERN_C();
/** Registers a type description and creates a type description reference.<br> /** Registers a type description and creates a type description reference.<br>
Type descriptions will be registered automatically if they are provided Type descriptions will be registered automatically if they are provided
@@ -621,7 +629,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_release(
@param ppNewDescription inout description to be registered; @param ppNewDescription inout description to be registered;
*/ */
SAL_DLLEXPORT void SAL_CALL typelib_typedescription_register( SAL_DLLEXPORT void SAL_CALL typelib_typedescription_register(
typelib_TypeDescription ** ppNewDescription ) SAL_THROW (); typelib_TypeDescription ** ppNewDescription )
SAL_THROW_EXTERN_C();
/** Tests whether two types descriptions are equal, i.e. type class and names are equal. /** Tests whether two types descriptions are equal, i.e. type class and names are equal.
<br> <br>
@@ -630,7 +639,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_register(
@return true, if type descriptions are equal @return true, if type descriptions are equal
*/ */
SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_equals( SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_equals(
const typelib_TypeDescription * p1, const typelib_TypeDescription * p2 ) SAL_THROW (); const typelib_TypeDescription * p1, const typelib_TypeDescription * p2 )
SAL_THROW_EXTERN_C();
/** Retrieves a type description via its fully qualified name. /** Retrieves a type description via its fully qualified name.
<br> <br>
@@ -638,14 +648,16 @@ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_equals(
@param pName name demanded type description @param pName name demanded type description
*/ */
SAL_DLLEXPORT void SAL_CALL typelib_typedescription_getByName( SAL_DLLEXPORT void SAL_CALL typelib_typedescription_getByName(
typelib_TypeDescription ** ppRet, rtl_uString * pName ) SAL_THROW (); typelib_TypeDescription ** ppRet, rtl_uString * pName )
SAL_THROW_EXTERN_C();
/** Sets size of type description cache. /** Sets size of type description cache.
<br> <br>
@param nNewSize new size of cache @param nNewSize new size of cache
*/ */
SAL_DLLEXPORT void SAL_CALL typelib_setCacheSize( SAL_DLLEXPORT void SAL_CALL typelib_setCacheSize(
sal_Int32 nNewSize ) SAL_THROW (); sal_Int32 nNewSize )
SAL_THROW_EXTERN_C();
/** Function pointer declaration of callback function get additional descriptions. /** Function pointer declaration of callback function get additional descriptions.
Callbacks <b>must</b> provide <b>complete</b> type descriptions! Callbacks <b>must</b> provide <b>complete</b> type descriptions!
@@ -663,7 +675,8 @@ typedef void (SAL_CALL * typelib_typedescription_Callback)(
@param pCallback callback function @param pCallback callback function
*/ */
SAL_DLLEXPORT void SAL_CALL typelib_typedescription_registerCallback( SAL_DLLEXPORT void SAL_CALL typelib_typedescription_registerCallback(
void * pContext, typelib_typedescription_Callback pCallback ) SAL_THROW (); void * pContext, typelib_typedescription_Callback pCallback )
SAL_THROW_EXTERN_C();
/** Revokes a previously registered callback function. /** Revokes a previously registered callback function.
<br> <br>
@@ -671,7 +684,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_registerCallback(
@param pCallback registered callback function @param pCallback registered callback function
*/ */
SAL_DLLEXPORT void SAL_CALL typelib_typedescription_revokeCallback( SAL_DLLEXPORT void SAL_CALL typelib_typedescription_revokeCallback(
void * pContext, typelib_typedescription_Callback pCallback ) SAL_THROW (); void * pContext, typelib_typedescription_Callback pCallback )
SAL_THROW_EXTERN_C();
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
@@ -731,7 +745,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescription_revokeCallback(
SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_new( SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_new(
typelib_TypeDescriptionReference ** ppTDR, typelib_TypeDescriptionReference ** ppTDR,
typelib_TypeClass eTypeClass, typelib_TypeClass eTypeClass,
rtl_uString * pTypeName ) SAL_THROW (); rtl_uString * pTypeName )
SAL_THROW_EXTERN_C();
/** Creates a type description reference.<br> /** Creates a type description reference.<br>
This is a weak reference <b>not</b> holding the description. This is a weak reference <b>not</b> holding the description.
@@ -744,14 +759,16 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_new(
SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_newByAsciiName( SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_newByAsciiName(
typelib_TypeDescriptionReference ** ppTDR, typelib_TypeDescriptionReference ** ppTDR,
typelib_TypeClass eTypeClass, typelib_TypeClass eTypeClass,
const sal_Char * pTypeName ) SAL_THROW (); const sal_Char * pTypeName )
SAL_THROW_EXTERN_C();
/** Increments reference count of type description reference. /** Increments reference count of type description reference.
<br> <br>
@param pRef type description reference @param pRef type description reference
*/ */
SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_acquire( SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_acquire(
typelib_TypeDescriptionReference * pRef ) SAL_THROW (); typelib_TypeDescriptionReference * pRef )
SAL_THROW_EXTERN_C();
/** Increments reference count of type description reference. /** Increments reference count of type description reference.
If the reference count reaches 0, the reference is deleted. If the reference count reaches 0, the reference is deleted.
@@ -759,7 +776,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_acquire(
@param pRef type description reference @param pRef type description reference
*/ */
SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_release( SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_release(
typelib_TypeDescriptionReference * pRef ) SAL_THROW (); typelib_TypeDescriptionReference * pRef )
SAL_THROW_EXTERN_C();
/** Retrieves the type description for a given reference.<br> /** Retrieves the type description for a given reference.<br>
If it is not possible to resolve the reference, null is returned. If it is not possible to resolve the reference, null is returned.
@@ -767,7 +785,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_release(
@param ppRet inout type description @param ppRet inout type description
*/ */
SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_getDescription( SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_getDescription(
typelib_TypeDescription ** ppRet, typelib_TypeDescriptionReference * pRef ) SAL_THROW (); typelib_TypeDescription ** ppRet, typelib_TypeDescriptionReference * pRef )
SAL_THROW_EXTERN_C();
/** Tests whether two types description references are equal, i.e. type class and names are equal. /** Tests whether two types description references are equal, i.e. type class and names are equal.
<br> <br>
@@ -776,7 +795,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_getDescription(
@return true, if type description references are equal @return true, if type description references are equal
*/ */
SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_equals( SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_equals(
const typelib_TypeDescriptionReference * p1, const typelib_TypeDescriptionReference * p2 ) SAL_THROW (); const typelib_TypeDescriptionReference * p1, const typelib_TypeDescriptionReference * p2 )
SAL_THROW_EXTERN_C();
/** Assigns a type. /** Assigns a type.
<br> <br>
@@ -785,7 +805,8 @@ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_equals(
*/ */
SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_assign( SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_assign(
typelib_TypeDescriptionReference ** ppDest, typelib_TypeDescriptionReference ** ppDest,
typelib_TypeDescriptionReference * pSource ) SAL_THROW (); typelib_TypeDescriptionReference * pSource )
SAL_THROW_EXTERN_C();
/** Tests if values of type pAssignable can be assigned by values of type pFrom. /** 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 This includes widening conversion (e.g., long assignable from short), as long
@@ -796,7 +817,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_assign(
*/ */
SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_isAssignableFrom( SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_isAssignableFrom(
typelib_TypeDescription * pAssignable, typelib_TypeDescription * pAssignable,
typelib_TypeDescription * pFrom ) SAL_THROW (); typelib_TypeDescription * pFrom )
SAL_THROW_EXTERN_C();
/** Tests if values of type pAssignable can be assigned by values of type pFrom. /** 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 This includes widening conversion (e.g., long assignable from short), as long
@@ -807,7 +829,8 @@ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_isAssignableFrom(
*/ */
SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_isAssignableFrom( SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_isAssignableFrom(
typelib_TypeDescriptionReference * pAssignable, typelib_TypeDescriptionReference * pAssignable,
typelib_TypeDescriptionReference * pFrom ) SAL_THROW (); typelib_TypeDescriptionReference * pFrom )
SAL_THROW_EXTERN_C();
/** Gets static type reference of standard types by type class. /** Gets static type reference of standard types by type class.
==OPTIMIZATION HACK==: ==OPTIMIZATION HACK==:
@@ -820,7 +843,8 @@ SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_isAssignableFro
@return pointer to type reference pointer @return pointer to type reference pointer
*/ */
SAL_DLLEXPORT typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass( SAL_DLLEXPORT typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass(
typelib_TypeClass eTypeClass ) SAL_THROW (); typelib_TypeClass eTypeClass )
SAL_THROW_EXTERN_C();
/** Inits static type reference. /** Inits static type reference.
Thread synchronizes on typelib init mutex. Thread synchronizes on typelib init mutex.
@@ -831,7 +855,8 @@ SAL_DLLEXPORT typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_g
*/ */
SAL_DLLEXPORT void SAL_CALL typelib_static_type_init( SAL_DLLEXPORT void SAL_CALL typelib_static_type_init(
typelib_TypeDescriptionReference ** ppRef, typelib_TypeDescriptionReference ** ppRef,
typelib_TypeClass eTypeClass, const sal_Char * pTypeName ) SAL_THROW (); typelib_TypeClass eTypeClass, const sal_Char * pTypeName )
SAL_THROW_EXTERN_C();
/** Inits static sequence type reference. /** Inits static sequence type reference.
Thread synchronizes on typelib init mutex. Thread synchronizes on typelib init mutex.
@@ -841,7 +866,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_type_init(
*/ */
SAL_DLLEXPORT void SAL_CALL typelib_static_sequence_type_init( SAL_DLLEXPORT void SAL_CALL typelib_static_sequence_type_init(
typelib_TypeDescriptionReference ** ppRef, typelib_TypeDescriptionReference ** ppRef,
typelib_TypeDescriptionReference * pElementType ) SAL_THROW (); typelib_TypeDescriptionReference * pElementType )
SAL_THROW_EXTERN_C();
/** Inits <b>in</b>complete static compound type reference. /** Inits <b>in</b>complete static compound type reference.
Thread synchronizes on typelib init mutex. Thread synchronizes on typelib init mutex.
@@ -857,7 +883,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_compound_type_init(
typelib_TypeDescriptionReference ** ppRef, typelib_TypeDescriptionReference ** ppRef,
typelib_TypeClass eTypeClass, const sal_Char * pTypeName, typelib_TypeClass eTypeClass, const sal_Char * pTypeName,
typelib_TypeDescriptionReference * pBaseType, typelib_TypeDescriptionReference * pBaseType,
sal_Int32 nMembers, typelib_TypeDescriptionReference ** ppMembers ) SAL_THROW (); sal_Int32 nMembers, typelib_TypeDescriptionReference ** ppMembers )
SAL_THROW_EXTERN_C();
/** Inits <b>in</b>complete static interface type reference. /** Inits <b>in</b>complete static interface type reference.
Thread synchronizes on typelib init mutex. Thread synchronizes on typelib init mutex.
@@ -869,7 +896,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_compound_type_init(
SAL_DLLEXPORT void SAL_CALL typelib_static_interface_type_init( SAL_DLLEXPORT void SAL_CALL typelib_static_interface_type_init(
typelib_TypeDescriptionReference ** ppRef, typelib_TypeDescriptionReference ** ppRef,
const sal_Char * pTypeName, const sal_Char * pTypeName,
typelib_TypeDescriptionReference * pBaseType ) SAL_THROW (); typelib_TypeDescriptionReference * pBaseType )
SAL_THROW_EXTERN_C();
/** Inits <b>in</b>complete static enum type reference. /** Inits <b>in</b>complete static enum type reference.
Thread synchronizes on typelib init mutex. Thread synchronizes on typelib init mutex.
@@ -881,7 +909,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_interface_type_init(
SAL_DLLEXPORT void SAL_CALL typelib_static_enum_type_init( SAL_DLLEXPORT void SAL_CALL typelib_static_enum_type_init(
typelib_TypeDescriptionReference ** ppRef, typelib_TypeDescriptionReference ** ppRef,
const sal_Char * pTypeName, const sal_Char * pTypeName,
sal_Int32 nDefaultValue ) SAL_THROW (); sal_Int32 nDefaultValue )
SAL_THROW_EXTERN_C();
/** Inits <b>in</b>complete static compound type reference. /** Inits <b>in</b>complete static compound type reference.
Thread synchronizes on typelib init mutex. Thread synchronizes on typelib init mutex.
@@ -905,7 +934,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_union_type_init(
typelib_TypeDescriptionReference * pDefaultType, typelib_TypeDescriptionReference * pDefaultType,
sal_Int32 nMembers, sal_Int32 nMembers,
sal_Int64 * pDiscriminants, sal_Int64 * pDiscriminants,
typelib_TypeDescriptionReference ** pMemberTypes ) SAL_THROW (); typelib_TypeDescriptionReference ** pMemberTypes )
SAL_THROW_EXTERN_C();
/** Completes a typedescription to be used for, e.g., marshalling values. /** Completes a typedescription to be used for, e.g., marshalling values.
COMPOUND, UNION, INTERFACE and ENUM type descriptions may be partly COMPOUND, UNION, INTERFACE and ENUM type descriptions may be partly
@@ -916,7 +946,8 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_union_type_init(
@return true, if type description is complete @return true, if type description is complete
*/ */
SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_complete( SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_complete(
typelib_TypeDescription ** ppTypeDescr ) SAL_THROW (); typelib_TypeDescription ** ppTypeDescr )
SAL_THROW_EXTERN_C();
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: typedescription.hxx,v $ * $RCSfile: typedescription.hxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:35:25 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -100,37 +100,37 @@ public:
<br> <br>
@param pTypeDescr a type description @param pTypeDescr a type description
*/ */
inline TypeDescription( typelib_TypeDescription * pTypeDescr = 0 ) throw (); inline TypeDescription( typelib_TypeDescription * pTypeDescr = 0 ) SAL_THROW( () );
/** Constructor: /** Constructor:
<br> <br>
@param pTypeDescrRef a type description reference @param pTypeDescrRef a type description reference
*/ */
inline TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ) throw (); inline TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ) SAL_THROW( () );
/** Constructor: /** Constructor:
<br> <br>
@param rType a type @param rType a type
*/ */
inline TypeDescription( const ::com::sun::star::uno::Type & rType ) throw (); inline TypeDescription( const ::com::sun::star::uno::Type & rType ) SAL_THROW( () );
/** Copy constructor: /** Copy constructor:
<br> <br>
@param rDescr another TypeDescription @param rDescr another TypeDescription
*/ */
inline TypeDescription( const TypeDescription & rDescr ) throw (); inline TypeDescription( const TypeDescription & rDescr ) SAL_THROW( () );
/** Constructor: /** Constructor:
<br> <br>
@param pTypeName a type name @param pTypeName a type name
*/ */
inline TypeDescription( rtl_uString * pTypeName ) throw (); inline TypeDescription( rtl_uString * pTypeName ) SAL_THROW( () );
/** Constructor: /** Constructor:
<br> <br>
@param rTypeName a type name @param rTypeName a type name
*/ */
inline TypeDescription( const ::rtl::OUString & rTypeName ) throw (); inline TypeDescription( const ::rtl::OUString & rTypeName ) SAL_THROW( () );
/** Destructor: /** Destructor:
<br> <br>
releases type description releases type description
*/ */
inline ~TypeDescription() throw (); inline ~TypeDescription() SAL_THROW( () );
/** Assignment operator: /** Assignment operator:
acquires given type description and releases a set one. acquires given type description and releases a set one.
@@ -138,14 +138,14 @@ public:
@param pTypeDescr another type description @param pTypeDescr another type description
@return this TypeDescription @return this TypeDescription
*/ */
inline TypeDescription & operator = ( typelib_TypeDescription * pTypeDescr ) throw (); inline TypeDescription & SAL_CALL operator = ( typelib_TypeDescription * pTypeDescr ) SAL_THROW( () );
/** Assignment operator: /** Assignment operator:
acquires given type description and releases a set one. acquires given type description and releases a set one.
<br> <br>
@param rTypeDescr another type description @param rTypeDescr another type description
@return this TypeDescription @return this TypeDescription
*/ */
inline TypeDescription & operator =( const TypeDescription & rTypeDescr ) throw () inline TypeDescription & SAL_CALL operator =( const TypeDescription & rTypeDescr ) SAL_THROW( () )
{ return this->operator =( rTypeDescr.get() ); } { return this->operator =( rTypeDescr.get() ); }
/** Tests if two type descriptions are equal. /** Tests if two type descriptions are equal.
@@ -153,81 +153,81 @@ public:
@param pTypeDescr another type description @param pTypeDescr another type description
@return true, if both type descriptions are equal, false otherwise @return true, if both type descriptions are equal, false otherwise
*/ */
inline sal_Bool equals( const typelib_TypeDescription * pTypeDescr ) const throw (); inline sal_Bool SAL_CALL equals( const typelib_TypeDescription * pTypeDescr ) const SAL_THROW( () );
/** Tests if two type descriptions are equal. /** Tests if two type descriptions are equal.
<br> <br>
@param rTypeDescr another type description @param rTypeDescr another type description
@return true, if both type descriptions are equal, false otherwise @return true, if both type descriptions are equal, false otherwise
*/ */
inline sal_Bool equals( const TypeDescription & rTypeDescr ) const throw () inline sal_Bool SAL_CALL equals( const TypeDescription & rTypeDescr ) const SAL_THROW( () )
{ return equals( rTypeDescr._pTypeDescr ); } { return equals( rTypeDescr._pTypeDescr ); }
/** Makes stored type description complete. /** Makes stored type description complete.
<br> <br>
*/ */
inline void makeComplete() const throw (); inline void SAL_CALL makeComplete() const SAL_THROW( () );
/** Gets the <b>un</b>acquired type description pointer. /** Gets the <b>un</b>acquired type description pointer.
<br> <br>
@return stored pointer of type description @return stored pointer of type description
*/ */
inline typelib_TypeDescription * get() const throw () inline typelib_TypeDescription * SAL_CALL get() const SAL_THROW( () )
{ return _pTypeDescr; } { return _pTypeDescr; }
/** Tests if a type description is set. /** Tests if a type description is set.
<br> <br>
@return true, if a type description is set, false otherwise @return true, if a type description is set, false otherwise
*/ */
inline sal_Bool is() const throw () inline sal_Bool SAL_CALL is() const SAL_THROW( () )
{ return (_pTypeDescr != 0); } { return (_pTypeDescr != 0); }
}; };
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline TypeDescription::TypeDescription( typelib_TypeDescription * pTypeDescr ) throw () inline TypeDescription::TypeDescription( typelib_TypeDescription * pTypeDescr ) SAL_THROW( () )
: _pTypeDescr( pTypeDescr ) : _pTypeDescr( pTypeDescr )
{ {
if (_pTypeDescr) if (_pTypeDescr)
typelib_typedescription_acquire( _pTypeDescr ); typelib_typedescription_acquire( _pTypeDescr );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline TypeDescription::TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ) throw () inline TypeDescription::TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ) SAL_THROW( () )
: _pTypeDescr( 0 ) : _pTypeDescr( 0 )
{ {
if (pTypeDescrRef) if (pTypeDescrRef)
typelib_typedescriptionreference_getDescription( &_pTypeDescr, pTypeDescrRef ); typelib_typedescriptionreference_getDescription( &_pTypeDescr, pTypeDescrRef );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline TypeDescription::TypeDescription( const ::com::sun::star::uno::Type & rType ) throw () inline TypeDescription::TypeDescription( const ::com::sun::star::uno::Type & rType ) SAL_THROW( () )
: _pTypeDescr( 0 ) : _pTypeDescr( 0 )
{ {
if (rType.getTypeLibType()) if (rType.getTypeLibType())
typelib_typedescriptionreference_getDescription( &_pTypeDescr, rType.getTypeLibType() ); typelib_typedescriptionreference_getDescription( &_pTypeDescr, rType.getTypeLibType() );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline TypeDescription::TypeDescription( const TypeDescription & rTypeDescr ) throw () inline TypeDescription::TypeDescription( const TypeDescription & rTypeDescr ) SAL_THROW( () )
: _pTypeDescr( rTypeDescr._pTypeDescr ) : _pTypeDescr( rTypeDescr._pTypeDescr )
{ {
if (_pTypeDescr) if (_pTypeDescr)
typelib_typedescription_acquire( _pTypeDescr ); typelib_typedescription_acquire( _pTypeDescr );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline TypeDescription::TypeDescription( rtl_uString * pTypeName ) throw () inline TypeDescription::TypeDescription( rtl_uString * pTypeName ) SAL_THROW( () )
: _pTypeDescr( 0 ) : _pTypeDescr( 0 )
{ {
typelib_typedescription_getByName( &_pTypeDescr , pTypeName ); typelib_typedescription_getByName( &_pTypeDescr , pTypeName );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline TypeDescription::TypeDescription( const ::rtl::OUString & rTypeName ) throw () inline TypeDescription::TypeDescription( const ::rtl::OUString & rTypeName ) SAL_THROW( () )
: _pTypeDescr( 0 ) : _pTypeDescr( 0 )
{ {
typelib_typedescription_getByName( &_pTypeDescr , rTypeName.pData ); typelib_typedescription_getByName( &_pTypeDescr , rTypeName.pData );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline TypeDescription::~TypeDescription() throw () inline TypeDescription::~TypeDescription() SAL_THROW( () )
{ {
if (_pTypeDescr) if (_pTypeDescr)
typelib_typedescription_release( _pTypeDescr ); typelib_typedescription_release( _pTypeDescr );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline TypeDescription & TypeDescription::operator = ( typelib_TypeDescription * pTypeDescr ) throw () inline TypeDescription & TypeDescription::operator = ( typelib_TypeDescription * pTypeDescr ) SAL_THROW( () )
{ {
if (_pTypeDescr) if (_pTypeDescr)
typelib_typedescription_release( _pTypeDescr ); typelib_typedescription_release( _pTypeDescr );
@@ -236,13 +236,13 @@ inline TypeDescription & TypeDescription::operator = ( typelib_TypeDescription *
return *this; return *this;
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool TypeDescription::equals( const typelib_TypeDescription * pTypeDescr ) const throw () inline sal_Bool TypeDescription::equals( const typelib_TypeDescription * pTypeDescr ) const SAL_THROW( () )
{ {
return (_pTypeDescr && pTypeDescr && return (_pTypeDescr && pTypeDescr &&
typelib_typedescription_equals( _pTypeDescr, pTypeDescr )); typelib_typedescription_equals( _pTypeDescr, pTypeDescr ));
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline void TypeDescription::makeComplete() const throw () inline void TypeDescription::makeComplete() const SAL_THROW( () )
{ {
if (_pTypeDescr && !_pTypeDescr->bComplete) if (_pTypeDescr && !_pTypeDescr->bComplete)
::typelib_typedescription_complete( &_pTypeDescr ); ::typelib_typedescription_complete( &_pTypeDescr );

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: any2.h,v $ * $RCSfile: any2.h,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:35:27 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -113,7 +113,7 @@ SAL_DLLEXPORT void SAL_CALL uno_any_assign(
uno_Any * pDest, void * pSource, uno_Any * pDest, void * pSource,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_AcquireFunc acquire, uno_ReleaseFunc release )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Assign an any with a given value. /** Assign an any with a given value.
Interfaces are acquired or released by the given callback functions. Interfaces are acquired or released by the given callback functions.
<br> <br>
@@ -127,7 +127,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_any_assign(
uno_Any * pDest, void * pSource, uno_Any * pDest, void * pSource,
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_AcquireFunc acquire, uno_ReleaseFunc release )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Constructs an any with a given value. /** Constructs an any with a given value.
Interfaces are acquired by the given callback function. Interfaces are acquired by the given callback function.
@@ -141,7 +141,7 @@ SAL_DLLEXPORT void SAL_CALL uno_any_construct(
uno_Any * pDest, void * pSource, uno_Any * pDest, void * pSource,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_AcquireFunc acquire ) uno_AcquireFunc acquire )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Constructs an any with a given value. /** Constructs an any with a given value.
Interfaces are acquired by the given callback function. Interfaces are acquired by the given callback function.
<br> <br>
@@ -154,7 +154,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_any_construct(
uno_Any * pDest, void * pSource, uno_Any * pDest, void * pSource,
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
uno_AcquireFunc acquire ) uno_AcquireFunc acquire )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Constructs an any with a given value and converts/ maps interfaces. /** Constructs an any with a given value and converts/ maps interfaces.
<br> <br>
@@ -167,7 +167,7 @@ SAL_DLLEXPORT void SAL_CALL uno_any_constructAndConvert(
uno_Any * pDest, void * pSource, uno_Any * pDest, void * pSource,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_Mapping * mapping ) uno_Mapping * mapping )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Constructs an any with a given value and converts/ maps interfaces. /** Constructs an any with a given value and converts/ maps interfaces.
<br> <br>
@param pDest pointer memory of destination any @param pDest pointer memory of destination any
@@ -179,7 +179,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_any_constructAndConvert(
uno_Any * pDest, void * pSource, uno_Any * pDest, void * pSource,
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
uno_Mapping * mapping ) uno_Mapping * mapping )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Destructs an any. /** Destructs an any.
<br> <br>
@@ -188,7 +188,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_any_constructAndConvert(
*/ */
SAL_DLLEXPORT void SAL_CALL uno_any_destruct( SAL_DLLEXPORT void SAL_CALL uno_any_destruct(
uno_Any * pValue, uno_ReleaseFunc release ) uno_Any * pValue, uno_ReleaseFunc release )
SAL_THROW (); SAL_THROW_EXTERN_C();
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: current_context.h,v $ * $RCSfile: current_context.h,v $
* *
* $Revision: 1.1 $ * $Revision: 1.2 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:33:43 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -79,7 +79,7 @@ extern "C"
SAL_DLLEXPORT void SAL_CALL uno_getCurrentContext( SAL_DLLEXPORT void SAL_CALL uno_getCurrentContext(
void ** ppCurrentContext, void ** ppCurrentContext,
rtl_uString * pEnvTypeName, void * pEnvContext ) rtl_uString * pEnvTypeName, void * pEnvContext )
SAL_THROW (); SAL_THROW_EXTERN_C();
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: current_context.hxx,v $ * $RCSfile: current_context.hxx,v $
* *
* $Revision: 1.1 $ * $Revision: 1.2 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:33:52 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -84,7 +84,7 @@ namespace uno
/** Current context. /** Current context.
*/ */
inline Reference< XCurrentContext > SAL_CALL getCurrentContext() throw () inline Reference< XCurrentContext > SAL_CALL getCurrentContext() SAL_THROW( () )
{ {
::rtl::OUString aEnvTypeName( RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) ); ::rtl::OUString aEnvTypeName( RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) );
@@ -98,7 +98,7 @@ inline Reference< XCurrentContext > SAL_CALL getCurrentContext() throw ()
*/ */
inline void SAL_CALL checkPermission( inline void SAL_CALL checkPermission(
const ::com::sun::star::security::Permission & rPerm ) const ::com::sun::star::security::Permission & rPerm )
throw (::com::sun::star::security::AccessControlException) SAL_THROW( (::com::sun::star::security::AccessControlException) )
{ {
Reference< XCurrentContext > xContext( getCurrentContext() ); Reference< XCurrentContext > xContext( getCurrentContext() );
OSL_ENSURE( xContext.is(), "### cannot get current thread's uno context!" ); OSL_ENSURE( xContext.is(), "### cannot get current thread's uno context!" );

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: data.h,v $ * $RCSfile: data.h,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -111,7 +111,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_equalData(
void * pVal1, typelib_TypeDescription * pVal1TypeDescr, void * pVal1, typelib_TypeDescription * pVal1TypeDescr,
void * pVal2, typelib_TypeDescription * pVal2TypeDescr, void * pVal2, typelib_TypeDescription * pVal2TypeDescr,
uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Tests if two values are equal. May compare different types (e.g., short to long). /** Tests if two values are equal. May compare different types (e.g., short to long).
<br> <br>
@param pVal1 pointer to a value @param pVal1 pointer to a value
@@ -127,7 +127,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_type_equalData(
void * pVal1, typelib_TypeDescriptionReference * pVal1Type, void * pVal1, typelib_TypeDescriptionReference * pVal1Type,
void * pVal2, typelib_TypeDescriptionReference * pVal2Type, void * pVal2, typelib_TypeDescriptionReference * pVal2Type,
uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Copy construct memory with given value. /** Copy construct memory with given value.
The size of the destination value must be larger or equal to the size of the source value. The size of the destination value must be larger or equal to the size of the source value.
@@ -140,7 +140,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_type_equalData(
SAL_DLLEXPORT void SAL_CALL uno_copyData( SAL_DLLEXPORT void SAL_CALL uno_copyData(
void * pDest, void * pSource, void * pDest, void * pSource,
typelib_TypeDescription * pTypeDescr, uno_AcquireFunc acquire ) typelib_TypeDescription * pTypeDescr, uno_AcquireFunc acquire )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Copy construct memory with given value. /** Copy construct memory with given value.
The size of the destination value must be larger or equal to the size of the source value. The size of the destination value must be larger or equal to the size of the source value.
<br> <br>
@@ -152,7 +152,7 @@ SAL_DLLEXPORT void SAL_CALL uno_copyData(
SAL_DLLEXPORT void SAL_CALL uno_type_copyData( SAL_DLLEXPORT void SAL_CALL uno_type_copyData(
void * pDest, void * pSource, void * pDest, void * pSource,
typelib_TypeDescriptionReference * pType, uno_AcquireFunc acquire ) typelib_TypeDescriptionReference * pType, uno_AcquireFunc acquire )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Copy construct memory with given value. /** 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> The size of the destination value must be larger or equal to the size of the source value.<br>
@@ -166,7 +166,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_copyData(
SAL_DLLEXPORT void SAL_CALL uno_copyAndConvertData( SAL_DLLEXPORT void SAL_CALL uno_copyAndConvertData(
void * pDest, void * pSource, void * pDest, void * pSource,
typelib_TypeDescription * pTypeDescr, uno_Mapping * mapping ) typelib_TypeDescription * pTypeDescr, uno_Mapping * mapping )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Copy construct memory with given value. /** 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> 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. Interfaces are converted/ mapped by mapping parameter.
@@ -179,7 +179,7 @@ SAL_DLLEXPORT void SAL_CALL uno_copyAndConvertData(
SAL_DLLEXPORT void SAL_CALL uno_type_copyAndConvertData( SAL_DLLEXPORT void SAL_CALL uno_type_copyAndConvertData(
void * pDest, void * pSource, void * pDest, void * pSource,
typelib_TypeDescriptionReference * pType, uno_Mapping * mapping ) typelib_TypeDescriptionReference * pType, uno_Mapping * mapping )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Destructs a given value; does <b>not</b> free its memory! /** Destructs a given value; does <b>not</b> free its memory!
<br> <br>
@@ -189,7 +189,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_copyAndConvertData(
*/ */
SAL_DLLEXPORT void SAL_CALL uno_destructData( 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 (); SAL_THROW_EXTERN_C();
/** Destructs a given value; does <b>not</b> free its memory! /** Destructs a given value; does <b>not</b> free its memory!
<br> <br>
@param pValue value to be destructed @param pValue value to be destructed
@@ -198,7 +198,7 @@ SAL_DLLEXPORT void SAL_CALL uno_destructData(
*/ */
SAL_DLLEXPORT void SAL_CALL uno_type_destructData( 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 (); SAL_THROW_EXTERN_C();
/** Default constructs a value. All simple types are set to 0, enums are set to their default /** Default constructs a value. All simple types are set to 0, enums are set to their default
value. value.
@@ -208,7 +208,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_destructData(
*/ */
SAL_DLLEXPORT void SAL_CALL uno_constructData( SAL_DLLEXPORT void SAL_CALL uno_constructData(
void * pMem, typelib_TypeDescription * pTypeDescr ) void * pMem, typelib_TypeDescription * pTypeDescr )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Default constructs a value. All simple types are set to 0, enums are set to their default /** Default constructs a value. All simple types are set to 0, enums are set to their default
value. value.
<br> <br>
@@ -217,7 +217,7 @@ SAL_DLLEXPORT void SAL_CALL uno_constructData(
*/ */
SAL_DLLEXPORT void SAL_CALL uno_type_constructData( SAL_DLLEXPORT void SAL_CALL uno_type_constructData(
void * pMem, typelib_TypeDescriptionReference * pType ) void * pMem, typelib_TypeDescriptionReference * pType )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Assigns a destination value with a source value. Widening conversion /** 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). <b>without</b> data loss is allowed (e.g., assigning a long with a short).
@@ -236,7 +236,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_assignData(
void * pDest, typelib_TypeDescription * pDestTypeDescr, void * pDest, typelib_TypeDescription * pDestTypeDescr,
void * pSource, typelib_TypeDescription * pSourceTypeDescr, 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 (); SAL_THROW_EXTERN_C();
/** Assigns a destination value with a source value. Widening conversion /** 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). <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. Assignment from any value to a value of type Any and vice versa is allowed.
@@ -254,7 +254,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_type_assignData(
void * pDest, typelib_TypeDescriptionReference * pDestType, void * pDest, typelib_TypeDescriptionReference * pDestType,
void * pSource, typelib_TypeDescriptionReference * pSourceType, 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 (); SAL_THROW_EXTERN_C();
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: environment.h,v $ * $RCSfile: environment.h,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -262,14 +262,19 @@ typedef struct _uno_ExtEnvironment
@param pEnv corresponding environment @param pEnv corresponding environment
@param pInterface an interface @param pInterface an interface
*/ */
void (SAL_CALL * acquireInterface)( uno_ExtEnvironment * pEnv, void * pInterface ); void (SAL_CALL * acquireInterface)(
uno_ExtEnvironment * pEnv,
void * pInterface );
/** Function to release an interface. /** Function to release an interface.
<br> <br>
@param pEnv corresponding environment @param pEnv corresponding environment
@param pInterface an interface @param pInterface an interface
*/ */
void (SAL_CALL * releaseInterface)( uno_ExtEnvironment * pEnv, void * pInterface ); void (SAL_CALL * releaseInterface)(
uno_ExtEnvironment * pEnv,
void * pInterface );
} uno_ExtEnvironment; } uno_ExtEnvironment;
#ifdef SAL_W32 #ifdef SAL_W32
@@ -296,7 +301,7 @@ typedef void (SAL_CALL * uno_initEnvironmentFunc)( uno_Environment * pEnv );
*/ */
SAL_DLLEXPORT void SAL_CALL uno_getEnvironment( 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 (); SAL_THROW_EXTERN_C();
/** Gets all specified environments. Caller has to release returned environments and /** Gets all specified environments. Caller has to release returned environments and
free allocated memory. free allocated memory.
@@ -309,7 +314,7 @@ SAL_DLLEXPORT void SAL_CALL uno_getEnvironment(
SAL_DLLEXPORT void SAL_CALL uno_getRegisteredEnvironments( SAL_DLLEXPORT void SAL_CALL uno_getRegisteredEnvironments(
uno_Environment *** pppEnvs, sal_Int32 * pnLen, uno_memAlloc memAlloc, uno_Environment *** pppEnvs, sal_Int32 * pnLen, uno_memAlloc memAlloc,
rtl_uString * pEnvTypeName ) rtl_uString * pEnvTypeName )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Creates an environment. The new environment is anonymous /** Creates an environment. The new environment is anonymous
(<b>NOT</b> publicly registered/ accessible). (<b>NOT</b> publicly registered/ accessible).
@@ -320,7 +325,7 @@ SAL_DLLEXPORT void SAL_CALL uno_getRegisteredEnvironments(
*/ */
SAL_DLLEXPORT void SAL_CALL uno_createEnvironment( 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 (); SAL_THROW_EXTERN_C();
/** Dumps out environment information, i.e. registered interfaces. /** Dumps out environment information, i.e. registered interfaces.
<br> <br>
@@ -330,7 +335,7 @@ SAL_DLLEXPORT void SAL_CALL uno_createEnvironment(
*/ */
SAL_DLLEXPORT void SAL_CALL uno_dumpEnvironment( 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 (); SAL_THROW_EXTERN_C();
/** Dumps out environment information, i.e. registered interfaces. /** Dumps out environment information, i.e. registered interfaces.
<br> <br>
@param stream output stream (FILE *) @param stream output stream (FILE *)
@@ -339,7 +344,7 @@ SAL_DLLEXPORT void SAL_CALL uno_dumpEnvironment(
*/ */
SAL_DLLEXPORT void SAL_CALL uno_dumpEnvironmentByName( 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 (); SAL_THROW_EXTERN_C();
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: environment.hxx,v $ * $RCSfile: environment.hxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -96,89 +96,89 @@ public:
<br> <br>
@param pEnv environment @param pEnv environment
*/ */
inline Environment( uno_Environment * pEnv = 0 ) throw (); inline Environment( uno_Environment * pEnv = 0 ) SAL_THROW( () );
/** Copy constructor: acquires given environment /** Copy constructor: acquires given environment
<br> <br>
@param rEnv another environment @param rEnv another environment
*/ */
inline Environment( const Environment & rEnv ) throw (); inline Environment( const Environment & rEnv ) SAL_THROW( () );
/** Destructor: /** Destructor:
<br> <br>
Releases a set environment. Releases a set environment.
*/ */
inline ~Environment() throw (); inline ~Environment() SAL_THROW( () );
/** Sets a given environment, i.e. acquires given one and releases a set one. /** Sets a given environment, i.e. acquires given one and releases a set one.
<br> <br>
@param pEnv another environment @param pEnv another environment
@return this environment @return this environment
*/ */
inline Environment & SAL_CALL operator = ( uno_Environment * pEnv ) throw (); inline Environment & SAL_CALL operator = ( uno_Environment * pEnv ) SAL_THROW( () );
/** Sets a given environment, i.e. acquires given one and releases a set one. /** Sets a given environment, i.e. acquires given one and releases a set one.
<br> <br>
@param rEnv another environment @param rEnv another environment
@return this environment @return this environment
*/ */
inline Environment & SAL_CALL operator = ( const Environment & rEnv ) throw () inline Environment & SAL_CALL operator = ( const Environment & rEnv ) SAL_THROW( () )
{ return operator = ( rEnv._pEnv ); } { return operator = ( rEnv._pEnv ); }
/** Provides <b>un</b>acquired pointer to the set C environment. /** Provides <b>un</b>acquired pointer to the set C environment.
<br> <br>
@return <b>un</b>acquired pointer to the C environment struct @return <b>un</b>acquired pointer to the C environment struct
*/ */
inline uno_Environment * SAL_CALL get() const throw () inline uno_Environment * SAL_CALL get() const SAL_THROW( () )
{ return _pEnv; } { return _pEnv; }
/** Gets type name of set environment. /** Gets type name of set environment.
<br> <br>
@return type name of set environment @return type name of set environment
*/ */
inline ::rtl::OUString SAL_CALL getTypeName() const throw () inline ::rtl::OUString SAL_CALL getTypeName() const SAL_THROW( () )
{ return _pEnv->pTypeName; } { return _pEnv->pTypeName; }
/** Gets free context pointer of set environment. /** Gets free context pointer of set environment.
<br> <br>
@return free context pointer of set environment @return free context pointer of set environment
*/ */
inline void * SAL_CALL getContext() const throw () inline void * SAL_CALL getContext() const SAL_THROW( () )
{ return _pEnv->pContext; } { return _pEnv->pContext; }
/** Tests if a environment is set. /** Tests if a environment is set.
<br> <br>
@return true, if a environment is set, false otherwise @return true, if a environment is set, false otherwise
*/ */
inline sal_Bool SAL_CALL is() const throw () inline sal_Bool SAL_CALL is() const SAL_THROW( () )
{ return (_pEnv != 0); } { return (_pEnv != 0); }
/** Releases a set environment. /** Releases a set environment.
<br> <br>
*/ */
inline void SAL_CALL clear() throw (); inline void SAL_CALL clear() SAL_THROW( () );
}; };
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Environment::Environment( uno_Environment * pEnv ) throw () inline Environment::Environment( uno_Environment * pEnv ) SAL_THROW( () )
: _pEnv( pEnv ) : _pEnv( pEnv )
{ {
if (_pEnv) if (_pEnv)
(*_pEnv->acquire)( _pEnv ); (*_pEnv->acquire)( _pEnv );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Environment::Environment( const Environment & rEnv ) throw () inline Environment::Environment( const Environment & rEnv ) SAL_THROW( () )
: _pEnv( rEnv._pEnv ) : _pEnv( rEnv._pEnv )
{ {
if (_pEnv) if (_pEnv)
(*_pEnv->acquire)( _pEnv ); (*_pEnv->acquire)( _pEnv );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Environment::~Environment() throw () inline Environment::~Environment() SAL_THROW( () )
{ {
if (_pEnv) if (_pEnv)
(*_pEnv->release)( _pEnv ); (*_pEnv->release)( _pEnv );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline void Environment::clear() throw () inline void Environment::clear() SAL_THROW( () )
{ {
if (_pEnv) if (_pEnv)
{ {
@@ -187,13 +187,16 @@ inline void Environment::clear() throw ()
} }
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Environment & Environment::operator = ( uno_Environment * pEnv ) throw () inline Environment & Environment::operator = ( uno_Environment * pEnv ) SAL_THROW( () )
{ {
if (pEnv) if (pEnv != _pEnv)
(*pEnv->acquire)( pEnv ); {
if (_pEnv) if (pEnv)
(*_pEnv->release)( _pEnv ); (*pEnv->acquire)( pEnv );
_pEnv = pEnv; if (_pEnv)
(*_pEnv->release)( _pEnv );
_pEnv = pEnv;
}
return *this; return *this;
} }

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: mapping.h,v $ * $RCSfile: mapping.h,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -139,7 +139,7 @@ SAL_DLLEXPORT void SAL_CALL uno_getMapping(
uno_Environment * pFrom, uno_Environment * pFrom,
uno_Environment * pTo, uno_Environment * pTo,
rtl_uString * pAddPurpose ) rtl_uString * pAddPurpose )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Callback function pointer declaration to get a mapping. /** Callback function pointer declaration to get a mapping.
<br> <br>
@@ -160,7 +160,7 @@ typedef void (SAL_CALL * uno_getMappingFunc)(
*/ */
SAL_DLLEXPORT void SAL_CALL uno_registerMappingCallback( SAL_DLLEXPORT void SAL_CALL uno_registerMappingCallback(
uno_getMappingFunc pCallback ) uno_getMappingFunc pCallback )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Revokes a mapping callback registration. /** Revokes a mapping callback registration.
<br> <br>
@@ -168,7 +168,7 @@ SAL_DLLEXPORT void SAL_CALL uno_registerMappingCallback(
*/ */
SAL_DLLEXPORT void SAL_CALL uno_revokeMappingCallback( SAL_DLLEXPORT void SAL_CALL uno_revokeMappingCallback(
uno_getMappingFunc pCallback ) uno_getMappingFunc pCallback )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Function pointer declaration to free a mapping. /** Function pointer declaration to free a mapping.
<br> <br>
@@ -190,7 +190,7 @@ typedef void (SAL_CALL * uno_freeMappingFunc)( uno_Mapping * pMapping );
SAL_DLLEXPORT void SAL_CALL uno_registerMapping( SAL_DLLEXPORT void SAL_CALL uno_registerMapping(
uno_Mapping ** ppMapping, uno_freeMappingFunc freeMapping, 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 (); SAL_THROW_EXTERN_C();
/** Revokes a mapping.<br> /** Revokes a mapping.<br>
A mapping registers itself on first acquire and revokes itself on last release. A mapping registers itself on first acquire and revokes itself on last release.
@@ -199,7 +199,7 @@ SAL_DLLEXPORT void SAL_CALL uno_registerMapping(
*/ */
SAL_DLLEXPORT void SAL_CALL uno_revokeMapping( SAL_DLLEXPORT void SAL_CALL uno_revokeMapping(
uno_Mapping * pMapping ) uno_Mapping * pMapping )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Gets an interface mapping from one language environment to another by /** Gets an interface mapping from one language environment to another by
corresponding environment type names. corresponding environment type names.
@@ -216,7 +216,7 @@ SAL_DLLEXPORT void SAL_CALL uno_getMappingByName(
rtl_uString * pFrom, rtl_uString * pFrom,
rtl_uString * pTo, rtl_uString * pTo,
rtl_uString * pAddPurpose ) rtl_uString * pAddPurpose )
SAL_THROW (); SAL_THROW_EXTERN_C();
/* symbol exported by each language binding library */ /* symbol exported by each language binding library */
#define UNO_EXT_GETMAPPING "uno_ext_getMapping" #define UNO_EXT_GETMAPPING "uno_ext_getMapping"

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: mapping.hxx,v $ * $RCSfile: mapping.hxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -110,7 +110,7 @@ public:
@param rAddPurpose additional purpose @param rAddPurpose additional purpose
*/ */
inline Mapping( const ::rtl::OUString & rFrom, const ::rtl::OUString & rTo, inline Mapping( const ::rtl::OUString & rFrom, const ::rtl::OUString & rTo,
const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ) throw (); const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ) SAL_THROW( () );
/** Holds a mapping from the specified source to the specified destination. /** Holds a mapping from the specified source to the specified destination.
<br> <br>
@@ -119,57 +119,57 @@ public:
@param rAddPurpose additional purpose @param rAddPurpose additional purpose
*/ */
inline Mapping( uno_Environment * pFrom, uno_Environment * pTo, inline Mapping( uno_Environment * pFrom, uno_Environment * pTo,
const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ) throw (); const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ) SAL_THROW( () );
/** Constructor. /** Constructor.
<br> <br>
@param pMapping another mapping @param pMapping another mapping
*/ */
inline Mapping( uno_Mapping * pMapping = 0 ) throw (); inline Mapping( uno_Mapping * pMapping = 0 ) SAL_THROW( () );
/** Copy constructor. /** Copy constructor.
<br> <br>
@param rMapping another mapping @param rMapping another mapping
*/ */
inline Mapping( const Mapping & rMapping ) throw (); inline Mapping( const Mapping & rMapping ) SAL_THROW( () );
/** Destructor. /** Destructor.
<br> <br>
*/ */
inline ~Mapping() throw (); inline ~Mapping() SAL_THROW( () );
/** Sets a given mapping. /** Sets a given mapping.
<br> <br>
@param pMapping another mapping @param pMapping another mapping
@return this mapping @return this mapping
*/ */
inline Mapping & SAL_CALL operator = ( uno_Mapping * pMapping ) throw (); inline Mapping & SAL_CALL operator = ( uno_Mapping * pMapping ) SAL_THROW( () );
/** Sets a given mapping. /** Sets a given mapping.
<br> <br>
@param rMapping another mapping @param rMapping another mapping
@return this mapping @return this mapping
*/ */
inline Mapping & SAL_CALL operator = ( const Mapping & rMapping ) throw () inline Mapping & SAL_CALL operator = ( const Mapping & rMapping ) SAL_THROW( () )
{ return operator = ( rMapping._pMapping ); } { return operator = ( rMapping._pMapping ); }
/** Provides a pointer to the C mapping. The returned mapping is <b>not</b> acquired! /** Provides a pointer to the C mapping. The returned mapping is <b>not</b> acquired!
<br> <br>
@return <b>un</b>acquired C mapping @return <b>un</b>acquired C mapping
*/ */
inline uno_Mapping * SAL_CALL get() const throw () inline uno_Mapping * SAL_CALL get() const SAL_THROW( () )
{ return _pMapping; } { return _pMapping; }
/** Tests if a mapping is set. /** Tests if a mapping is set.
<br> <br>
@return true if a mapping is set @return true if a mapping is set
*/ */
inline sal_Bool SAL_CALL is() const throw () inline sal_Bool SAL_CALL is() const SAL_THROW( () )
{ return (_pMapping != 0); } { return (_pMapping != 0); }
/** Releases a set mapping. /** Releases a set mapping.
<br> <br>
*/ */
inline void SAL_CALL clear() throw (); inline void SAL_CALL clear() SAL_THROW( () );
/** Maps an interface from one environment to another. /** Maps an interface from one environment to another.
<br> <br>
@@ -177,14 +177,14 @@ public:
@param pTypeDescr type description of interface @param pTypeDescr type description of interface
@return mapped interface @return mapped interface
*/ */
inline void * SAL_CALL mapInterface( void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const throw (); inline void * SAL_CALL mapInterface( void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const SAL_THROW( () );
/** Maps an interface from one environment to another. /** Maps an interface from one environment to another.
<br> <br>
@param pInterface source interface @param pInterface source interface
@param pTypeDescr type description of interface @param pTypeDescr type description of interface
@return mapped interface @return mapped interface
*/ */
inline void * SAL_CALL mapInterface( void * pInterface, typelib_TypeDescription * pTypeDescr ) const throw () inline void * SAL_CALL mapInterface( void * pInterface, typelib_TypeDescription * pTypeDescr ) const SAL_THROW( () )
{ return mapInterface( pInterface, (typelib_InterfaceTypeDescription *)pTypeDescr ); } { return mapInterface( pInterface, (typelib_InterfaceTypeDescription *)pTypeDescr ); }
/** Maps an interface from one environment to another. /** Maps an interface from one environment to another.
@@ -194,7 +194,7 @@ public:
@return mapped interface @return mapped interface
*/ */
inline void * SAL_CALL mapInterface( inline void * SAL_CALL mapInterface(
void * pInterface, const ::com::sun::star::uno::Type & rType ) const throw (); void * pInterface, const ::com::sun::star::uno::Type & rType ) const SAL_THROW( () );
/** Maps an interface from one environment to another. /** Maps an interface from one environment to another.
<br> <br>
@@ -202,7 +202,7 @@ public:
@param pInterface source interface @param pInterface source interface
@param pTypeDescr type description of interface @param pTypeDescr type description of interface
*/ */
inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const throw () inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const SAL_THROW( () )
{ (*_pMapping->mapInterface)( _pMapping, ppOut, pInterface, pTypeDescr ); } { (*_pMapping->mapInterface)( _pMapping, ppOut, pInterface, pTypeDescr ); }
/** Maps an interface from one environment to another. /** Maps an interface from one environment to another.
<br> <br>
@@ -210,7 +210,7 @@ public:
@param pInterface source interface @param pInterface source interface
@param pTypeDescr type description of interface @param pTypeDescr type description of interface
*/ */
inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, typelib_TypeDescription * pTypeDescr ) const throw () inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, typelib_TypeDescription * pTypeDescr ) const SAL_THROW( () )
{ (*_pMapping->mapInterface)( _pMapping, ppOut, pInterface, (typelib_InterfaceTypeDescription *)pTypeDescr ); } { (*_pMapping->mapInterface)( _pMapping, ppOut, pInterface, (typelib_InterfaceTypeDescription *)pTypeDescr ); }
/** Maps an interface from one environment to another. /** Maps an interface from one environment to another.
@@ -219,44 +219,46 @@ public:
@param pInterface source interface @param pInterface source interface
@param rType type of interface to be mapped @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 throw (); inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, const ::com::sun::star::uno::Type & rType ) const SAL_THROW( () );
}; };
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Mapping::Mapping( const ::rtl::OUString & rFrom, const ::rtl::OUString & rTo, inline Mapping::Mapping(
const ::rtl::OUString & rAddPurpose ) throw () const ::rtl::OUString & rFrom, const ::rtl::OUString & rTo, const ::rtl::OUString & rAddPurpose )
SAL_THROW( () )
: _pMapping( 0 ) : _pMapping( 0 )
{ {
uno_getMappingByName( &_pMapping, rFrom.pData, rTo.pData, rAddPurpose.pData ); uno_getMappingByName( &_pMapping, rFrom.pData, rTo.pData, rAddPurpose.pData );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Mapping::Mapping( uno_Environment * pFrom, uno_Environment * pTo, inline Mapping::Mapping(
const ::rtl::OUString & rAddPurpose ) throw () uno_Environment * pFrom, uno_Environment * pTo, const ::rtl::OUString & rAddPurpose )
SAL_THROW( () )
: _pMapping( 0 ) : _pMapping( 0 )
{ {
uno_getMapping( &_pMapping, pFrom, pTo, rAddPurpose.pData ); uno_getMapping( &_pMapping, pFrom, pTo, rAddPurpose.pData );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Mapping::Mapping( uno_Mapping * pMapping ) throw () inline Mapping::Mapping( uno_Mapping * pMapping ) SAL_THROW( () )
: _pMapping( pMapping ) : _pMapping( pMapping )
{ {
if (_pMapping) if (_pMapping)
(*_pMapping->acquire)( _pMapping ); (*_pMapping->acquire)( _pMapping );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Mapping::Mapping( const Mapping & rMapping ) throw () inline Mapping::Mapping( const Mapping & rMapping ) SAL_THROW( () )
: _pMapping( rMapping._pMapping ) : _pMapping( rMapping._pMapping )
{ {
if (_pMapping) if (_pMapping)
(*_pMapping->acquire)( _pMapping ); (*_pMapping->acquire)( _pMapping );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Mapping::~Mapping() throw () inline Mapping::~Mapping() SAL_THROW( () )
{ {
if (_pMapping) if (_pMapping)
(*_pMapping->release)( _pMapping ); (*_pMapping->release)( _pMapping );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline void Mapping::clear() throw () inline void Mapping::clear() SAL_THROW( () )
{ {
if (_pMapping) if (_pMapping)
{ {
@@ -265,7 +267,7 @@ inline void Mapping::clear() throw ()
} }
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Mapping & Mapping::operator = ( uno_Mapping * pMapping ) throw () inline Mapping & Mapping::operator = ( uno_Mapping * pMapping ) SAL_THROW( () )
{ {
if (pMapping) if (pMapping)
(*pMapping->acquire)( pMapping ); (*pMapping->acquire)( pMapping );
@@ -275,8 +277,9 @@ inline Mapping & Mapping::operator = ( uno_Mapping * pMapping ) throw ()
return *this; return *this;
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline void Mapping::mapInterface( void ** ppOut, void * pInterface, inline void Mapping::mapInterface(
const ::com::sun::star::uno::Type & rType ) const throw () void ** ppOut, void * pInterface, const ::com::sun::star::uno::Type & rType ) const
SAL_THROW( () )
{ {
typelib_TypeDescription * pTD = 0; typelib_TypeDescription * pTD = 0;
TYPELIB_DANGER_GET( &pTD, rType.getTypeLibType() ); TYPELIB_DANGER_GET( &pTD, rType.getTypeLibType() );
@@ -287,16 +290,18 @@ inline void Mapping::mapInterface( void ** ppOut, void * pInterface,
} }
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline void * Mapping::mapInterface( void * pInterface, inline void * Mapping::mapInterface(
typelib_InterfaceTypeDescription * pTypeDescr ) const throw () void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const
SAL_THROW( () )
{ {
void * pOut = 0; void * pOut = 0;
(*_pMapping->mapInterface)( _pMapping, &pOut, pInterface, pTypeDescr ); (*_pMapping->mapInterface)( _pMapping, &pOut, pInterface, pTypeDescr );
return pOut; return pOut;
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline void * Mapping::mapInterface( void * pInterface, inline void * Mapping::mapInterface(
const ::com::sun::star::uno::Type & rType ) const throw () void * pInterface, const ::com::sun::star::uno::Type & rType ) const
SAL_THROW( () )
{ {
void * pOut = 0; void * pOut = 0;
mapInterface( &pOut, pInterface, rType ); mapInterface( &pOut, pInterface, rType );
@@ -305,7 +310,7 @@ inline void * Mapping::mapInterface( void * pInterface,
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
template< class C > template< class C >
inline sal_Bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI ) throw () inline sal_Bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI ) SAL_THROW( () )
{ {
Mapping aMapping( Mapping aMapping(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO) ),
@@ -316,7 +321,7 @@ inline sal_Bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI ) throw
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
template< class C > template< class C >
inline sal_Bool mapToUno( uno_Interface ** ppRet, const Reference< C > & x ) throw () inline sal_Bool mapToUno( uno_Interface ** ppRet, const Reference< C > & x ) SAL_THROW( () )
{ {
Mapping aMapping( Mapping aMapping(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) ),

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: sequence2.h,v $ * $RCSfile: sequence2.h,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -87,7 +87,7 @@ SAL_DLLEXPORT void SAL_CALL uno_sequence_assign(
uno_Sequence * pSource, uno_Sequence * pSource,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Assign a sequence. /** Assign a sequence.
<br> <br>
@param ppDest destinstaion sequence @param ppDest destinstaion sequence
@@ -100,7 +100,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_sequence_assign(
uno_Sequence * pSource, uno_Sequence * pSource,
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Constructs a new sequence with given elements. /** Constructs a new sequence with given elements.
<br> <br>
@@ -115,7 +115,7 @@ SAL_DLLEXPORT void SAL_CALL uno_sequence_construct(
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
void * pElements, sal_Int32 len, void * pElements, sal_Int32 len,
uno_AcquireFunc acquire ) uno_AcquireFunc acquire )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Constructs a new sequence with given elements. /** Constructs a new sequence with given elements.
<br> <br>
@param ppSequence <b>out</b> parameter sequence @param ppSequence <b>out</b> parameter sequence
@@ -129,7 +129,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_sequence_construct(
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
void * pElements, sal_Int32 len, void * pElements, sal_Int32 len,
uno_AcquireFunc acquire ) uno_AcquireFunc acquire )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Assures that the reference count of the given sequence is one. /** 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. Otherwise a new copy of the sequence is created with a reference count of one.
@@ -144,7 +144,7 @@ SAL_DLLEXPORT void SAL_CALL uno_sequence_reference2One(
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_AcquireFunc acquire, uno_AcquireFunc acquire,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Assures that the reference count of the given sequence is one. /** 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. Otherwise a new copy of the sequence is created with a reference count of one.
<br> <br>
@@ -158,7 +158,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_sequence_reference2One(
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
uno_AcquireFunc acquire, uno_AcquireFunc acquire,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Reallocates length of a sequence. This truncates a sequence or enlarges it /** Reallocates length of a sequence. This truncates a sequence or enlarges it
default constructing appended elements. default constructing appended elements.
@@ -175,7 +175,7 @@ SAL_DLLEXPORT void SAL_CALL uno_sequence_realloc(
sal_Int32 nSize, sal_Int32 nSize,
uno_AcquireFunc acquire, uno_AcquireFunc acquire,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
SAL_THROW (); SAL_THROW_EXTERN_C();
/** Reallocates length of a sequence. This truncates a sequence or enlarges it /** Reallocates length of a sequence. This truncates a sequence or enlarges it
default constructing appended elements. default constructing appended elements.
<br> <br>
@@ -191,7 +191,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_sequence_realloc(
sal_Int32 nSize, sal_Int32 nSize,
uno_AcquireFunc acquire, uno_AcquireFunc acquire,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
SAL_THROW (); SAL_THROW_EXTERN_C();
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: threadpool.h,v $ * $RCSfile: threadpool.h,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:35:28 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -82,7 +82,7 @@ extern "C" {
* altered. ( This is in general a bug ). <br> * 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 (); SAL_THROW_EXTERN_C();
/** /**
@@ -95,7 +95,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_bindIdToCurrentThread( sal_Sequence *pThread
* @param ppThreadId [out] Contains the (acquired) ThreadId. * @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 (); SAL_THROW_EXTERN_C();
/** /**
@@ -103,7 +103,7 @@ SAL_DLLEXPORT void SAL_CALL uno_getIdOfCurrentThread( sal_Sequence **ppThreadId
* thread is broken. * thread is broken.
**/ **/
SAL_DLLEXPORT void SAL_CALL uno_releaseIdFromCurrentThread() SAL_DLLEXPORT void SAL_CALL uno_releaseIdFromCurrentThread()
SAL_THROW (); SAL_THROW_EXTERN_C();
/** /**
@@ -121,7 +121,7 @@ struct uno_threadpool_Handle;
* @see uno_threadpool_disposeThreads * @see uno_threadpool_disposeThreads
***/ ***/
SAL_DLLEXPORT struct uno_threadpool_Handle * SAL_CALL SAL_DLLEXPORT struct uno_threadpool_Handle * SAL_CALL
uno_threadpool_createHandle( sal_Int64 nDisposeId ) SAL_THROW (); uno_threadpool_createHandle( sal_Int64 nDisposeId ) SAL_THROW_EXTERN_C();
/** /**
* This method is called to wait for a reply of a previously sent request. This is a * This method is called to wait for a reply of a previously sent request. This is a
@@ -134,7 +134,7 @@ uno_threadpool_createHandle( sal_Int64 nDisposeId ) SAL_THROW ();
**/ **/
SAL_DLLEXPORT void SAL_CALL 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 (); SAL_THROW_EXTERN_C();
/** /**
@@ -163,7 +163,7 @@ SAL_DLLEXPORT void SAL_CALL
uno_threadpool_putRequest( sal_Sequence *pThreadId, uno_threadpool_putRequest( sal_Sequence *pThreadId,
void *pThreadSpecificData, void *pThreadSpecificData,
void ( SAL_CALL * doRequest ) ( void *pThreadSpecificData ), void ( SAL_CALL * doRequest ) ( void *pThreadSpecificData ),
sal_Bool bIsOneway ) SAL_THROW (); sal_Bool bIsOneway ) SAL_THROW_EXTERN_C();
/** /**
@@ -173,7 +173,7 @@ uno_threadpool_putRequest( sal_Sequence *pThreadId,
* @param pThreadSpecificData The pointer, that is returned by uno_threadpool_enter. * @param pThreadSpecificData The pointer, that is returned by uno_threadpool_enter.
**/ **/
SAL_DLLEXPORT void SAL_CALL SAL_DLLEXPORT void SAL_CALL
uno_threadpool_putReply( sal_Sequence *pThreadId, void *pThreadSpecificData ) SAL_THROW (); uno_threadpool_putReply( sal_Sequence *pThreadId, void *pThreadSpecificData ) SAL_THROW_EXTERN_C();
/** /**
@@ -191,7 +191,7 @@ uno_threadpool_putReply( sal_Sequence *pThreadId, void *pThreadSpecificData ) SA
* uno_threadpool_stopDisposeThreads. * uno_threadpool_stopDisposeThreads.
**/ **/
SAL_DLLEXPORT void SAL_CALL SAL_DLLEXPORT void SAL_CALL
uno_threadpool_disposeThreads( sal_Int64 nDisposeId ) SAL_THROW (); uno_threadpool_disposeThreads( sal_Int64 nDisposeId ) SAL_THROW_EXTERN_C();
/** /**
@@ -204,7 +204,7 @@ uno_threadpool_disposeThreads( sal_Int64 nDisposeId ) SAL_THROW ();
* @see uno_threadpool_disposeThreads * @see uno_threadpool_disposeThreads
**/ **/
SAL_DLLEXPORT void SAL_CALL SAL_DLLEXPORT void SAL_CALL
uno_threadpool_stopDisposeThreads( sal_Int64 nDisposeId ) SAL_THROW (); uno_threadpool_stopDisposeThreads( sal_Int64 nDisposeId ) SAL_THROW_EXTERN_C();
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@@ -34,8 +34,6 @@ mkdir: %_DEST%\inc%_EXT%\uno
..\inc\uno\mapping.h %_DEST%\inc%_EXT%\uno\mapping.h ..\inc\uno\mapping.h %_DEST%\inc%_EXT%\uno\mapping.h
..\inc\uno\mapping.hxx %_DEST%\inc%_EXT%\uno\mapping.hxx ..\inc\uno\mapping.hxx %_DEST%\inc%_EXT%\uno\mapping.hxx
..\inc\uno\threadpool.h %_DEST%\inc%_EXT%\uno\threadpool.h ..\inc\uno\threadpool.h %_DEST%\inc%_EXT%\uno\threadpool.h
..\inc\uno\current_context.h %_DEST%\inc%_EXT%\uno\current_context.h
..\inc\uno\current_context.hxx %_DEST%\inc%_EXT%\uno\current_context.hxx
..\%__SRC%\lib\icppu.lib %_DEST%\lib%_EXT%\icppu.lib ..\%__SRC%\lib\icppu.lib %_DEST%\lib%_EXT%\icppu.lib
..\%__SRC%\bin\cppu* %_DEST%\bin%_EXT%\* ..\%__SRC%\bin\cppu* %_DEST%\bin%_EXT%\*

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: current.cxx,v $ * $RCSfile: current.cxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: obo $ $Date: 2001-01-22 14:09:12 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -97,19 +97,19 @@ class ThreadKey
oslThreadKeyCallbackFunction _pCallback; oslThreadKeyCallbackFunction _pCallback;
public: public:
inline oslThreadKey getThreadKey() throw (); inline oslThreadKey getThreadKey() SAL_THROW( () );
inline ThreadKey( oslThreadKeyCallbackFunction pCallback ) throw (); inline ThreadKey( oslThreadKeyCallbackFunction pCallback ) SAL_THROW( () );
inline ~ThreadKey() throw (); inline ~ThreadKey() SAL_THROW( () );
}; };
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline ThreadKey::ThreadKey( oslThreadKeyCallbackFunction pCallback ) throw () inline ThreadKey::ThreadKey( oslThreadKeyCallbackFunction pCallback ) SAL_THROW( () )
: _bInit( sal_False ) : _bInit( sal_False )
, _pCallback( pCallback ) , _pCallback( pCallback )
{ {
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline ThreadKey::~ThreadKey() throw () inline ThreadKey::~ThreadKey() SAL_THROW( () )
{ {
if (_bInit) if (_bInit)
{ {
@@ -117,7 +117,7 @@ inline ThreadKey::~ThreadKey() throw ()
} }
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline oslThreadKey ThreadKey::getThreadKey() throw () inline oslThreadKey ThreadKey::getThreadKey() SAL_THROW( () )
{ {
if (! _bInit) if (! _bInit)
{ {
@@ -141,7 +141,7 @@ struct CurrentContext
uno_ExtEnvironment * _pCachedEnv; uno_ExtEnvironment * _pCachedEnv;
void * _pCachedInterface; void * _pCachedInterface;
inline void setCachedInterface( void * pInterface, uno_ExtEnvironment * pEnv ) throw (); inline void setCachedInterface( void * pInterface, uno_ExtEnvironment * pEnv ) SAL_THROW( () );
Reference< XMultiServiceFactory > _xMgr; Reference< XMultiServiceFactory > _xMgr;
Reference< XAccessController > _xAccessController; Reference< XAccessController > _xAccessController;
@@ -192,11 +192,11 @@ struct CurrentContext
virtual sal_Bool SAL_CALL hasElements() virtual sal_Bool SAL_CALL hasElements()
throw (RuntimeException); throw (RuntimeException);
inline CurrentContext() throw (); inline CurrentContext() SAL_THROW( () );
inline ~CurrentContext() throw (); inline ~CurrentContext() SAL_THROW( () );
}; };
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline CurrentContext::~CurrentContext() throw () inline CurrentContext::~CurrentContext() SAL_THROW( () )
{ {
#ifdef CPPU_ASSERTIONS #ifdef CPPU_ASSERTIONS
OSL_TRACE( "\n> destructing current context..." ); OSL_TRACE( "\n> destructing current context..." );
@@ -204,7 +204,7 @@ inline CurrentContext::~CurrentContext() throw ()
setCachedInterface( 0, 0 ); setCachedInterface( 0, 0 );
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline CurrentContext::CurrentContext() throw () inline CurrentContext::CurrentContext() SAL_THROW( () )
: _nRef( 0 ) : _nRef( 0 )
, _pCachedEnv( 0 ) , _pCachedEnv( 0 )
, _pCachedInterface( 0 ) , _pCachedInterface( 0 )
@@ -212,7 +212,7 @@ inline CurrentContext::CurrentContext() throw ()
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline void CurrentContext::setCachedInterface( inline void CurrentContext::setCachedInterface(
void * pInterface, uno_ExtEnvironment * pEnv ) throw () void * pInterface, uno_ExtEnvironment * pEnv ) SAL_THROW( () )
{ {
// acquire new one // acquire new one
if (pInterface) if (pInterface)
@@ -502,7 +502,7 @@ sal_Bool CurrentContext::hasElements()
} }
*/ */
//================================================================================================== //==================================================================================================
extern "C" void SAL_CALL delete_IdContainer( void * p ) throw () extern "C" void SAL_CALL delete_IdContainer( void * p )
{ {
if (p) if (p)
{ {
@@ -520,7 +520,7 @@ extern "C" void SAL_CALL delete_IdContainer( void * p ) throw ()
} }
} }
//================================================================================================== //==================================================================================================
IdContainer * getIdContainer() throw () IdContainer * getIdContainer() SAL_THROW( () )
{ {
static ThreadKey s_key( delete_IdContainer ); static ThreadKey s_key( delete_IdContainer );
oslThreadKey aKey = s_key.getThreadKey(); oslThreadKey aKey = s_key.getThreadKey();
@@ -541,7 +541,8 @@ IdContainer * getIdContainer() throw ()
//################################################################################################## //##################################################################################################
extern "C" SAL_DLLEXPORT void SAL_CALL uno_getCurrentContext( extern "C" SAL_DLLEXPORT void SAL_CALL uno_getCurrentContext(
void ** ppCurrentContext, void ** ppCurrentContext,
rtl_uString * pEnvTypeName, void * pEnvContext ) throw () rtl_uString * pEnvTypeName, void * pEnvContext )
SAL_THROW_EXTERN_C()
{ {
*ppCurrentContext = 0; *ppCurrentContext = 0;
/* /*

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: current.hxx,v $ * $RCSfile: current.hxx,v $
* *
* $Revision: 1.1 $ * $Revision: 1.2 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:40:19 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -75,5 +75,5 @@ struct IdContainer
sal_Sequence * pCurrentId; sal_Sequence * pCurrentId;
}; };
IdContainer * getIdContainer() throw (); IdContainer * getIdContainer() SAL_THROW( () );
} }

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: threadident.cxx,v $ * $RCSfile: threadident.cxx,v $
* *
* $Revision: 1.4 $ * $Revision: 1.5 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:39:23 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:57 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -95,7 +95,7 @@ static inline void createLocalId( sal_Sequence **ppThreadId )
extern "C" SAL_DLLEXPORT void SAL_CALL extern "C" SAL_DLLEXPORT void SAL_CALL
uno_getIdOfCurrentThread( sal_Sequence **ppThreadId ) uno_getIdOfCurrentThread( sal_Sequence **ppThreadId )
throw () SAL_THROW_EXTERN_C()
{ {
IdContainer * p = getIdContainer(); IdContainer * p = getIdContainer();
if( ! p->bInit ) if( ! p->bInit )
@@ -126,7 +126,7 @@ uno_getIdOfCurrentThread( sal_Sequence **ppThreadId )
extern "C" SAL_DLLEXPORT void SAL_CALL uno_releaseIdFromCurrentThread() extern "C" SAL_DLLEXPORT void SAL_CALL uno_releaseIdFromCurrentThread()
throw () SAL_THROW_EXTERN_C()
{ {
IdContainer *p = getIdContainer(); IdContainer *p = getIdContainer();
OSL_ASSERT( p ); OSL_ASSERT( p );
@@ -140,7 +140,7 @@ extern "C" SAL_DLLEXPORT void SAL_CALL uno_releaseIdFromCurrentThread()
} }
extern "C" SAL_DLLEXPORT sal_Bool SAL_CALL uno_bindIdToCurrentThread( sal_Sequence *pThreadId ) extern "C" SAL_DLLEXPORT sal_Bool SAL_CALL uno_bindIdToCurrentThread( sal_Sequence *pThreadId )
throw () SAL_THROW_EXTERN_C()
{ {
IdContainer *p = getIdContainer(); IdContainer *p = getIdContainer();
if( ! p->bInit ) if( ! p->bInit )

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: threadpool.cxx,v $ * $RCSfile: threadpool.cxx,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: jbu $ $Date: 2001-02-20 14:44:41 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:57 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -437,7 +437,7 @@ using namespace cppu_threadpool;
extern "C" SAL_DLLEXPORT void SAL_CALL uno_threadpool_putRequest( extern "C" SAL_DLLEXPORT void SAL_CALL uno_threadpool_putRequest(
sal_Sequence *pThreadId, void *pThreadSpecificData, sal_Sequence *pThreadId, void *pThreadSpecificData,
void ( SAL_CALL * doRequest ) ( void *pThreadSpecificData ), sal_Bool bIsOneway ) void ( SAL_CALL * doRequest ) ( void *pThreadSpecificData ), sal_Bool bIsOneway )
throw () SAL_THROW_EXTERN_C()
{ {
ThreadPool::getInstance()->addJob( pThreadId, bIsOneway, pThreadSpecificData,doRequest ); ThreadPool::getInstance()->addJob( pThreadId, bIsOneway, pThreadSpecificData,doRequest );
} }
@@ -446,7 +446,7 @@ extern "C" SAL_DLLEXPORT void SAL_CALL uno_threadpool_putRequest(
extern "C" SAL_DLLEXPORT void SAL_CALL uno_threadpool_putReply( extern "C" SAL_DLLEXPORT void SAL_CALL uno_threadpool_putReply(
sal_Sequence *pThreadId, void *pThreadSpecificData ) sal_Sequence *pThreadId, void *pThreadSpecificData )
throw () SAL_THROW_EXTERN_C()
{ {
ThreadPool::getInstance()->addJob( pThreadId, sal_False, pThreadSpecificData, 0 ); ThreadPool::getInstance()->addJob( pThreadId, sal_False, pThreadSpecificData, 0 );
} }
@@ -454,7 +454,7 @@ extern "C" SAL_DLLEXPORT void SAL_CALL uno_threadpool_putReply(
extern "C" SAL_DLLEXPORT struct uno_threadpool_Handle * SAL_CALL extern "C" SAL_DLLEXPORT struct uno_threadpool_Handle * SAL_CALL
uno_threadpool_createHandle( sal_Int64 nDisposeId ) uno_threadpool_createHandle( sal_Int64 nDisposeId )
throw () SAL_THROW_EXTERN_C()
{ {
sal_Sequence *pThreadId = 0; sal_Sequence *pThreadId = 0;
uno_getIdOfCurrentThread( &pThreadId ); uno_getIdOfCurrentThread( &pThreadId );
@@ -469,7 +469,7 @@ uno_threadpool_createHandle( sal_Int64 nDisposeId )
extern "C" SAL_DLLEXPORT void SAL_CALL uno_threadpool_enter( extern "C" SAL_DLLEXPORT void SAL_CALL uno_threadpool_enter(
struct uno_threadpool_Handle *pHandle , void **ppThreadSpecificData ) struct uno_threadpool_Handle *pHandle , void **ppThreadSpecificData )
throw () SAL_THROW_EXTERN_C()
{ {
OSL_ASSERT( ppThreadSpecificData ); OSL_ASSERT( ppThreadSpecificData );
@@ -483,14 +483,14 @@ extern "C" SAL_DLLEXPORT void SAL_CALL uno_threadpool_enter(
extern "C" SAL_DLLEXPORT void SAL_CALL extern "C" SAL_DLLEXPORT void SAL_CALL
uno_threadpool_disposeThreads( sal_Int64 nDisposeId ) uno_threadpool_disposeThreads( sal_Int64 nDisposeId )
throw () SAL_THROW_EXTERN_C()
{ {
ThreadPool::getInstance()->dispose( nDisposeId ); ThreadPool::getInstance()->dispose( nDisposeId );
} }
extern "C" SAL_DLLEXPORT void SAL_CALL extern "C" SAL_DLLEXPORT void SAL_CALL
uno_threadpool_stopDisposeThreads( sal_Int64 nDisposeId ) uno_threadpool_stopDisposeThreads( sal_Int64 nDisposeId )
throw () SAL_THROW_EXTERN_C()
{ {
ThreadPool::getInstance()->stopDisposing( nDisposeId ); ThreadPool::getInstance()->stopDisposing( nDisposeId );
} }

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: static_types.cxx,v $ * $RCSfile: static_types.cxx,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: dbo $ $Date: 2001-01-09 12:47:56 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:57 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -78,16 +78,19 @@ extern "C"
sal_Int32 SAL_CALL typelib_typedescription_getAlignedUnoSize( sal_Int32 SAL_CALL typelib_typedescription_getAlignedUnoSize(
const typelib_TypeDescription * pTypeDescription, const typelib_TypeDescription * pTypeDescription,
sal_Int32 nOffset, sal_Int32 nOffset,
sal_Int32 & rMaxIntegralTypeSize ) throw (); sal_Int32 & rMaxIntegralTypeSize )
SAL_THROW_EXTERN_C();
//------------------------------------------------------------------------ //------------------------------------------------------------------------
void SAL_CALL typelib_typedescription_newEmpty( void SAL_CALL typelib_typedescription_newEmpty(
typelib_TypeDescription ** ppRet, typelib_TypeDescription ** ppRet,
typelib_TypeClass eTypeClass, typelib_TypeClass eTypeClass,
rtl_uString * pTypeName ) throw (); rtl_uString * pTypeName )
SAL_THROW_EXTERN_C();
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void SAL_CALL typelib_typedescriptionreference_getByName( void SAL_CALL typelib_typedescriptionreference_getByName(
typelib_TypeDescriptionReference ** ppRet, typelib_TypeDescriptionReference ** ppRet,
rtl_uString * pName ) throw (); rtl_uString * pName )
SAL_THROW_EXTERN_C();
#ifdef SAL_W32 #ifdef SAL_W32
#pragma pack(push, 8) #pragma pack(push, 8)
@@ -116,7 +119,8 @@ struct AlignSize_Impl
// the value of the maximal alignment // the value of the maximal alignment
static sal_Int32 nMaxAlignment = (sal_Int32)&((AlignSize_Impl *) 16)->dDouble - 16; static sal_Int32 nMaxAlignment = (sal_Int32)&((AlignSize_Impl *) 16)->dDouble - 16;
static inline sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment ) throw () static inline sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment )
SAL_THROW( () )
{ {
if( nRequestedAlignment > nMaxAlignment ) if( nRequestedAlignment > nMaxAlignment )
nRequestedAlignment = nMaxAlignment; nRequestedAlignment = nMaxAlignment;
@@ -127,14 +131,15 @@ static inline sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment ) throw (
* Calculate the new size of the struktur. * Calculate the new size of the struktur.
*/ */
static inline sal_Int32 newAlignedSize( static inline sal_Int32 newAlignedSize(
sal_Int32 OldSize, sal_Int32 ElementSize, sal_Int32 NeededAlignment ) throw () sal_Int32 OldSize, sal_Int32 ElementSize, sal_Int32 NeededAlignment )
SAL_THROW( () )
{ {
NeededAlignment = adjustAlignment( NeededAlignment ); NeededAlignment = adjustAlignment( NeededAlignment );
return (OldSize + NeededAlignment -1) / NeededAlignment * NeededAlignment + ElementSize; return (OldSize + NeededAlignment -1) / NeededAlignment * NeededAlignment + ElementSize;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
static Mutex & typelib_getStaticInitMutex() throw () static Mutex & typelib_getStaticInitMutex() SAL_THROW( () )
{ {
static Mutex * s_pMutex = 0; static Mutex * s_pMutex = 0;
if (! s_pMutex) if (! s_pMutex)
@@ -149,10 +154,28 @@ static Mutex & typelib_getStaticInitMutex() throw ()
return *s_pMutex; return *s_pMutex;
} }
// !for NOT REALLY WEAK TYPES only!
static inline typelib_TypeDescriptionReference * __getTypeByName( rtl_uString * pTypeName )
SAL_THROW( () )
{
typelib_TypeDescriptionReference * pRef = 0;
::typelib_typedescriptionreference_getByName( &pRef, pTypeName );
if (pRef && pRef->pType && pRef->pType->pWeakRef) // found initialized td
{
return pRef;
}
else
{
return 0;
}
}
extern "C"
{
//################################################################################################## //##################################################################################################
SAL_DLLEXPORT typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass( SAL_DLLEXPORT typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass(
typelib_TypeClass eTypeClass ) typelib_TypeClass eTypeClass )
throw () SAL_THROW_EXTERN_C()
{ {
static typelib_TypeDescriptionReference * s_aTypes[] = { static typelib_TypeDescriptionReference * s_aTypes[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -330,7 +353,7 @@ SAL_DLLEXPORT typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_g
SAL_DLLEXPORT void SAL_CALL typelib_static_type_init( SAL_DLLEXPORT void SAL_CALL typelib_static_type_init(
typelib_TypeDescriptionReference ** ppRef, typelib_TypeDescriptionReference ** ppRef,
typelib_TypeClass eTypeClass, const sal_Char * pTypeName ) typelib_TypeClass eTypeClass, const sal_Char * pTypeName )
throw () SAL_THROW_EXTERN_C()
{ {
if (! *ppRef) if (! *ppRef)
{ {
@@ -348,21 +371,11 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_type_init(
} }
} }
// !for NOT REALLY WEAK TYPES only!
static inline typelib_TypeDescriptionReference * __getTypeByName( rtl_uString * pTypeName ) throw ()
{
typelib_TypeDescriptionReference * pRef = 0;
::typelib_typedescriptionreference_getByName( &pRef, pTypeName );
if (pRef && pRef->pType && pRef->pType->pWeakRef) // found initialized td
return pRef;
else
return 0;
}
//################################################################################################## //##################################################################################################
SAL_DLLEXPORT void SAL_CALL typelib_static_sequence_type_init( SAL_DLLEXPORT void SAL_CALL typelib_static_sequence_type_init(
typelib_TypeDescriptionReference ** ppRef, typelib_TypeDescriptionReference ** ppRef,
typelib_TypeDescriptionReference * pElementType ) throw () typelib_TypeDescriptionReference * pElementType )
SAL_THROW_EXTERN_C()
{ {
if (! *ppRef) if (! *ppRef)
{ {
@@ -400,7 +413,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_compound_type_init(
typelib_TypeClass eTypeClass, const sal_Char * pTypeName, typelib_TypeClass eTypeClass, const sal_Char * pTypeName,
typelib_TypeDescriptionReference * pBaseType, typelib_TypeDescriptionReference * pBaseType,
sal_Int32 nMembers, typelib_TypeDescriptionReference ** ppMembers ) sal_Int32 nMembers, typelib_TypeDescriptionReference ** ppMembers )
throw () SAL_THROW_EXTERN_C()
{ {
OSL_ENSHURE( typelib_TypeClass_STRUCT == eTypeClass || OSL_ENSHURE( typelib_TypeClass_STRUCT == eTypeClass ||
typelib_TypeClass_EXCEPTION == eTypeClass, "### unexpected type class!" ); typelib_TypeClass_EXCEPTION == eTypeClass, "### unexpected type class!" );
@@ -465,12 +478,13 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_compound_type_init(
} }
} }
} }
//################################################################################################## //##################################################################################################
SAL_DLLEXPORT void SAL_CALL typelib_static_interface_type_init( SAL_DLLEXPORT void SAL_CALL typelib_static_interface_type_init(
typelib_TypeDescriptionReference ** ppRef, typelib_TypeDescriptionReference ** ppRef,
const sal_Char * pTypeName, const sal_Char * pTypeName,
typelib_TypeDescriptionReference * pBaseType ) typelib_TypeDescriptionReference * pBaseType )
throw () SAL_THROW_EXTERN_C()
{ {
if (! *ppRef) if (! *ppRef)
{ {
@@ -517,12 +531,13 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_interface_type_init(
} }
} }
} }
//################################################################################################## //##################################################################################################
SAL_DLLEXPORT void SAL_CALL typelib_static_enum_type_init( SAL_DLLEXPORT void SAL_CALL typelib_static_enum_type_init(
typelib_TypeDescriptionReference ** ppRef, typelib_TypeDescriptionReference ** ppRef,
const sal_Char * pTypeName, const sal_Char * pTypeName,
sal_Int32 nDefaultValue ) sal_Int32 nDefaultValue )
throw () SAL_THROW_EXTERN_C()
{ {
if (! *ppRef) if (! *ppRef)
{ {
@@ -568,7 +583,7 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_union_type_init(
sal_Int32 nMembers, sal_Int32 nMembers,
sal_Int64 * pDiscriminants, sal_Int64 * pDiscriminants,
typelib_TypeDescriptionReference ** pMemberTypes ) typelib_TypeDescriptionReference ** pMemberTypes )
throw () SAL_THROW_EXTERN_C()
{ {
if (! *ppRef) if (! *ppRef)
{ {
@@ -629,5 +644,6 @@ SAL_DLLEXPORT void SAL_CALL typelib_static_union_type_init(
} }
} }
} }
} // extern "C"
} }

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: typelib.cxx,v $ * $RCSfile: typelib.cxx,v $
* *
* $Revision: 1.6 $ * $Revision: 1.7 $
* *
* last change: $Author: armin $ $Date: 2001-03-08 09:09:59 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:57 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -141,7 +141,8 @@ struct AlignSize_Impl
// the value of the maximal alignment // the value of the maximal alignment
static sal_Int32 nMaxAlignment = (sal_Int32)&((AlignSize_Impl *) 16)->dDouble - 16; static sal_Int32 nMaxAlignment = (sal_Int32)&((AlignSize_Impl *) 16)->dDouble - 16;
static inline sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment ) throw () static inline sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment )
SAL_THROW( () )
{ {
if( nRequestedAlignment > nMaxAlignment ) if( nRequestedAlignment > nMaxAlignment )
nRequestedAlignment = nMaxAlignment; nRequestedAlignment = nMaxAlignment;
@@ -152,18 +153,21 @@ static inline sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment ) throw (
* Calculate the new size of the struktur. * Calculate the new size of the struktur.
*/ */
static inline sal_Int32 newAlignedSize( static inline sal_Int32 newAlignedSize(
sal_Int32 OldSize, sal_Int32 ElementSize, sal_Int32 NeededAlignment ) throw () sal_Int32 OldSize, sal_Int32 ElementSize, sal_Int32 NeededAlignment )
SAL_THROW( () )
{ {
NeededAlignment = adjustAlignment( NeededAlignment ); NeededAlignment = adjustAlignment( NeededAlignment );
return (OldSize + NeededAlignment -1) / NeededAlignment * NeededAlignment + ElementSize; return (OldSize + NeededAlignment -1) / NeededAlignment * NeededAlignment + ElementSize;
} }
static inline sal_Bool reallyWeak( typelib_TypeClass eTypeClass ) throw () static inline sal_Bool reallyWeak( typelib_TypeClass eTypeClass )
SAL_THROW( () )
{ {
return TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK( eTypeClass ); return TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK( eTypeClass );
} }
static inline sal_Int32 getDescriptionSize( typelib_TypeClass eTypeClass ) throw () static inline sal_Int32 getDescriptionSize( typelib_TypeClass eTypeClass )
SAL_THROW( () )
{ {
OSL_ASSERT( typelib_TypeClass_TYPEDEF != eTypeClass ); OSL_ASSERT( typelib_TypeClass_TYPEDEF != eTypeClass );
@@ -212,20 +216,20 @@ static inline sal_Int32 getDescriptionSize( typelib_TypeClass eTypeClass ) throw
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
extern "C" void SAL_CALL typelib_typedescriptionreference_getByName( extern "C" void SAL_CALL typelib_typedescriptionreference_getByName(
typelib_TypeDescriptionReference ** ppRet, typelib_TypeDescriptionReference ** ppRet, rtl_uString * pName )
rtl_uString * pName ) throw (); SAL_THROW_EXTERN_C();
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct equalStr_Impl struct equalStr_Impl
{ {
sal_Bool operator()(const sal_Unicode * const & s1, const sal_Unicode * const & s2) const throw () sal_Bool operator()(const sal_Unicode * const & s1, const sal_Unicode * const & s2) const SAL_THROW( () )
{ return 0 == rtl_ustr_compare( s1, s2 ); } { return 0 == rtl_ustr_compare( s1, s2 ); }
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct hashStr_Impl struct hashStr_Impl
{ {
size_t operator()(const sal_Unicode * const & s) const throw () size_t operator()(const sal_Unicode * const & s) const SAL_THROW( () )
{ return rtl_ustr_hashCode( s ); } { return rtl_ustr_hashCode( s ); }
}; };
@@ -259,10 +263,9 @@ struct TypeDescriptor_Init_Impl
// The mutex to guard all type library accesses // The mutex to guard all type library accesses
Mutex * pMutex; Mutex * pMutex;
inline Mutex & getMutex() throw (); inline Mutex & getMutex() SAL_THROW( () );
inline void callChain( inline void callChain( typelib_TypeDescription ** ppRet, rtl_uString * pName ) SAL_THROW( () );
typelib_TypeDescription ** ppRet, rtl_uString * pName ) throw ();
#ifdef CPPU_ASSERTIONS #ifdef CPPU_ASSERTIONS
// only for debugging // only for debugging
@@ -276,10 +279,10 @@ struct TypeDescriptor_Init_Impl
sal_Int32 nInterfaceTypeDescriptionCount; sal_Int32 nInterfaceTypeDescriptionCount;
sal_Int32 nTypeDescriptionReferenceCount; sal_Int32 nTypeDescriptionReferenceCount;
#endif #endif
~TypeDescriptor_Init_Impl() throw (); ~TypeDescriptor_Init_Impl() SAL_THROW( () );
}; };
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline Mutex & TypeDescriptor_Init_Impl::getMutex() throw () inline Mutex & TypeDescriptor_Init_Impl::getMutex() SAL_THROW( () )
{ {
if( !pMutex ) if( !pMutex )
{ {
@@ -291,7 +294,8 @@ inline Mutex & TypeDescriptor_Init_Impl::getMutex() throw ()
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline void TypeDescriptor_Init_Impl::callChain( inline void TypeDescriptor_Init_Impl::callChain(
typelib_TypeDescription ** ppRet, rtl_uString * pName ) throw () typelib_TypeDescription ** ppRet, rtl_uString * pName )
SAL_THROW( () )
{ {
if (pCallbacks) if (pCallbacks)
{ {
@@ -314,13 +318,13 @@ inline void TypeDescriptor_Init_Impl::callChain(
// never called // never called
#if defined(CPPU_LEAK_STATIC_DATA) && defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500) #if defined(CPPU_LEAK_STATIC_DATA) && defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500)
static void dumb_sunpro5_must_have_dtor_stl_hashmap_code_if_compiled_with_minus_g() throw () static void dumb_sunpro5_must_have_dtor_stl_hashmap_code_if_compiled_with_minus_g() SAL_THROW( () )
{ {
delete (WeakMap_Impl *)0xbeef1e; delete (WeakMap_Impl *)0xbeef1e;
} }
#endif #endif
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() throw () TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () )
{ {
#ifndef CPPU_LEAK_STATIC_DATA #ifndef CPPU_LEAK_STATIC_DATA
if( pCache ) if( pCache )
@@ -424,7 +428,8 @@ static TypeDescriptor_Init_Impl aInit;
//------------------------------------------------------------------------ //------------------------------------------------------------------------
//------------------------------------------------------------------------ //------------------------------------------------------------------------
extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_registerCallback( extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_registerCallback(
void * pContext, typelib_typedescription_Callback pCallback ) throw () void * pContext, typelib_typedescription_Callback pCallback )
SAL_THROW_EXTERN_C()
{ {
// todo mt safe: guard is no solution, can not acquire while calling callback! // todo mt safe: guard is no solution, can not acquire while calling callback!
// OslGuard aGuard( aInit.getMutex() ); // OslGuard aGuard( aInit.getMutex() );
@@ -435,7 +440,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_registerCallback(
//------------------------------------------------------------------------ //------------------------------------------------------------------------
extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_revokeCallback( extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_revokeCallback(
void * pContext, typelib_typedescription_Callback pCallback ) throw () void * pContext, typelib_typedescription_Callback pCallback )
SAL_THROW_EXTERN_C()
{ {
if( aInit.pCallbacks ) if( aInit.pCallbacks )
{ {
@@ -464,12 +470,13 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_revokeCallback(
//------------------------------------------------------------------------ //------------------------------------------------------------------------
extern "C" sal_Int32 SAL_CALL typelib_typedescription_getAlignedUnoSize( extern "C" sal_Int32 SAL_CALL typelib_typedescription_getAlignedUnoSize(
const typelib_TypeDescription * pTypeDescription, const typelib_TypeDescription * pTypeDescription,
sal_Int32 nOffset, sal_Int32 nOffset, sal_Int32 & rMaxIntegralTypeSize )
sal_Int32 & rMaxIntegralTypeSize ) throw (); SAL_THROW_EXTERN_C();
//------------------------------------------------------------------------ //------------------------------------------------------------------------
static inline void typelib_typedescription_initTables( static inline void typelib_typedescription_initTables(
typelib_TypeDescription * pTD ) throw () typelib_TypeDescription * pTD )
SAL_THROW( () )
{ {
typelib_InterfaceTypeDescription * pITD = (typelib_InterfaceTypeDescription *)pTD; typelib_InterfaceTypeDescription * pITD = (typelib_InterfaceTypeDescription *)pTD;
@@ -540,8 +547,8 @@ static inline void typelib_typedescription_initTables(
//------------------------------------------------------------------------ //------------------------------------------------------------------------
extern "C" void SAL_CALL typelib_typedescription_newEmpty( extern "C" void SAL_CALL typelib_typedescription_newEmpty(
typelib_TypeDescription ** ppRet, typelib_TypeDescription ** ppRet,
typelib_TypeClass eTypeClass, typelib_TypeClass eTypeClass, rtl_uString * pTypeName )
rtl_uString * pTypeName ) throw () SAL_THROW_EXTERN_C()
{ {
if( *ppRet ) if( *ppRet )
{ {
@@ -692,7 +699,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_new(
rtl_uString * pTypeName, rtl_uString * pTypeName,
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
sal_Int32 nMembers, sal_Int32 nMembers,
typelib_CompoundMember_Init * pMembers ) throw () typelib_CompoundMember_Init * pMembers )
SAL_THROW_EXTERN_C()
{ {
if (typelib_TypeClass_TYPEDEF == eTypeClass) if (typelib_TypeClass_TYPEDEF == eTypeClass)
{ {
@@ -772,7 +780,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newUnion(
sal_Int64 nDefaultDiscriminant, sal_Int64 nDefaultDiscriminant,
typelib_TypeDescriptionReference * pDefaultTypeRef, typelib_TypeDescriptionReference * pDefaultTypeRef,
sal_Int32 nMembers, sal_Int32 nMembers,
typelib_Union_Init * pMembers ) throw () typelib_Union_Init * pMembers )
SAL_THROW_EXTERN_C()
{ {
typelib_typedescription_newEmpty( ppRet, typelib_TypeClass_UNION, pTypeName ); typelib_typedescription_newEmpty( ppRet, typelib_TypeClass_UNION, pTypeName );
// discriminant type // discriminant type
@@ -823,7 +832,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newEnum(
sal_Int32 nDefaultValue, sal_Int32 nDefaultValue,
sal_Int32 nEnumValues, sal_Int32 nEnumValues,
rtl_uString ** ppEnumNames, rtl_uString ** ppEnumNames,
sal_Int32 * pEnumValues ) throw () sal_Int32 * pEnumValues )
SAL_THROW_EXTERN_C()
{ {
typelib_typedescription_newEmpty( ppRet, typelib_TypeClass_ENUM, pTypeName ); typelib_typedescription_newEmpty( ppRet, typelib_TypeClass_ENUM, pTypeName );
typelib_EnumTypeDescription * pEnum = (typelib_EnumTypeDescription *)*ppRet; typelib_EnumTypeDescription * pEnum = (typelib_EnumTypeDescription *)*ppRet;
@@ -851,7 +861,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newInterface(
sal_uInt32 nUik1, sal_uInt16 nUik2, sal_uInt16 nUik3, sal_uInt32 nUik4, sal_uInt32 nUik5, sal_uInt32 nUik1, sal_uInt16 nUik2, sal_uInt16 nUik3, sal_uInt32 nUik4, sal_uInt32 nUik5,
typelib_TypeDescriptionReference * pBaseInterface, typelib_TypeDescriptionReference * pBaseInterface,
sal_Int32 nMembers, sal_Int32 nMembers,
typelib_TypeDescriptionReference ** ppMembers ) throw () typelib_TypeDescriptionReference ** ppMembers )
SAL_THROW_EXTERN_C()
{ {
typelib_InterfaceTypeDescription * pITD = 0; typelib_InterfaceTypeDescription * pITD = 0;
typelib_typedescription_newEmpty( typelib_typedescription_newEmpty(
@@ -924,7 +935,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newInterfaceMetho
sal_Int32 nParams, sal_Int32 nParams,
typelib_Parameter_Init * pParams, typelib_Parameter_Init * pParams,
sal_Int32 nExceptions, sal_Int32 nExceptions,
rtl_uString ** ppExceptionNames ) throw () rtl_uString ** ppExceptionNames )
SAL_THROW_EXTERN_C()
{ {
typelib_typedescription_newEmpty( typelib_typedescription_newEmpty(
(typelib_TypeDescription **)ppRet, typelib_TypeClass_INTERFACE_METHOD, pTypeName ); (typelib_TypeDescription **)ppRet, typelib_TypeClass_INTERFACE_METHOD, pTypeName );
@@ -990,7 +1002,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newInterfaceAttri
rtl_uString * pTypeName, rtl_uString * pTypeName,
typelib_TypeClass eAttributeTypeClass, typelib_TypeClass eAttributeTypeClass,
rtl_uString * pAttributeTypeName, rtl_uString * pAttributeTypeName,
sal_Bool bReadOnly ) throw () sal_Bool bReadOnly )
SAL_THROW_EXTERN_C()
{ {
typelib_typedescription_newEmpty( typelib_typedescription_newEmpty(
(typelib_TypeDescription **)ppRet, typelib_TypeClass_INTERFACE_ATTRIBUTE, pTypeName ); (typelib_TypeDescription **)ppRet, typelib_TypeClass_INTERFACE_ATTRIBUTE, pTypeName );
@@ -1021,7 +1034,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_newInterfaceAttri
//------------------------------------------------------------------------ //------------------------------------------------------------------------
extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_acquire( extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_acquire(
typelib_TypeDescription * pTypeDescription ) throw () typelib_TypeDescription * pTypeDescription )
SAL_THROW_EXTERN_C()
{ {
::osl_incrementInterlockedCount( &pTypeDescription->nRefCount ); ::osl_incrementInterlockedCount( &pTypeDescription->nRefCount );
} }
@@ -1029,7 +1043,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_acquire(
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// frees anything except typelib_TypeDescription base! // frees anything except typelib_TypeDescription base!
static inline void typelib_typedescription_destructExtendedMembers( static inline void typelib_typedescription_destructExtendedMembers(
typelib_TypeDescription * pTD ) throw () typelib_TypeDescription * pTD )
SAL_THROW( () )
{ {
OSL_ASSERT( typelib_TypeClass_TYPEDEF != pTD->eTypeClass ); OSL_ASSERT( typelib_TypeClass_TYPEDEF != pTD->eTypeClass );
@@ -1150,7 +1165,8 @@ static inline void typelib_typedescription_destructExtendedMembers(
//------------------------------------------------------------------------ //------------------------------------------------------------------------
extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_release( extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_release(
typelib_TypeDescription * pTD ) throw () typelib_TypeDescription * pTD )
SAL_THROW_EXTERN_C()
{ {
OSL_ASSERT(pTD->nRefCount > 0); OSL_ASSERT(pTD->nRefCount > 0);
@@ -1223,7 +1239,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_release(
//------------------------------------------------------------------------ //------------------------------------------------------------------------
extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_register( extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_register(
typelib_TypeDescription ** ppNewDescription ) throw () typelib_TypeDescription ** ppNewDescription )
SAL_THROW_EXTERN_C()
{ {
// connect the description with the weak reference // connect the description with the weak reference
ClearableMutexGuard aGuard( aInit.getMutex() ); ClearableMutexGuard aGuard( aInit.getMutex() );
@@ -1353,7 +1370,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_register(
//------------------------------------------------------------------------ //------------------------------------------------------------------------
static inline sal_Bool type_equals( static inline sal_Bool type_equals(
typelib_TypeDescriptionReference * p1, typelib_TypeDescriptionReference * p2 ) throw () typelib_TypeDescriptionReference * p1, typelib_TypeDescriptionReference * p2 )
SAL_THROW( () )
{ {
return (p1 == p2 || return (p1 == p2 ||
(p1->eTypeClass == p2->eTypeClass && (p1->eTypeClass == p2->eTypeClass &&
@@ -1361,7 +1379,8 @@ static inline sal_Bool type_equals(
rtl_ustr_compare( p1->pTypeName->buffer, p2->pTypeName->buffer ) == 0)); rtl_ustr_compare( p1->pTypeName->buffer, p2->pTypeName->buffer ) == 0));
} }
extern "C" SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_equals( extern "C" SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_equals(
const typelib_TypeDescription * p1, const typelib_TypeDescription * p2 ) throw () const typelib_TypeDescription * p1, const typelib_TypeDescription * p2 )
SAL_THROW_EXTERN_C()
{ {
return type_equals( return type_equals(
(typelib_TypeDescriptionReference *)p1, (typelib_TypeDescriptionReference *)p2 ); (typelib_TypeDescriptionReference *)p1, (typelib_TypeDescriptionReference *)p2 );
@@ -1370,8 +1389,8 @@ extern "C" SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_equals(
//------------------------------------------------------------------------ //------------------------------------------------------------------------
extern "C" sal_Int32 SAL_CALL typelib_typedescription_getAlignedUnoSize( extern "C" sal_Int32 SAL_CALL typelib_typedescription_getAlignedUnoSize(
const typelib_TypeDescription * pTypeDescription, const typelib_TypeDescription * pTypeDescription,
sal_Int32 nOffset, sal_Int32 nOffset, sal_Int32 & rMaxIntegralTypeSize )
sal_Int32 & rMaxIntegralTypeSize ) throw () SAL_THROW_EXTERN_C()
{ {
sal_Int32 nSize; sal_Int32 nSize;
if( pTypeDescription->nSize ) if( pTypeDescription->nSize )
@@ -1519,7 +1538,8 @@ extern "C" sal_Int32 SAL_CALL typelib_typedescription_getAlignedUnoSize(
//------------------------------------------------------------------------ //------------------------------------------------------------------------
extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_getByName( extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_getByName(
typelib_TypeDescription ** ppRet, rtl_uString * pName ) throw () typelib_TypeDescription ** ppRet, rtl_uString * pName )
SAL_THROW_EXTERN_C()
{ {
if( *ppRet ) if( *ppRet )
{ {
@@ -1654,7 +1674,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescription_getByName(
extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_newByAsciiName( extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_newByAsciiName(
typelib_TypeDescriptionReference ** ppTDR, typelib_TypeDescriptionReference ** ppTDR,
typelib_TypeClass eTypeClass, typelib_TypeClass eTypeClass,
const sal_Char * pTypeName ) throw () const sal_Char * pTypeName )
SAL_THROW_EXTERN_C()
{ {
OUString aTypeName( OUString::createFromAscii( pTypeName ) ); OUString aTypeName( OUString::createFromAscii( pTypeName ) );
typelib_typedescriptionreference_new( ppTDR, eTypeClass, aTypeName.pData ); typelib_typedescriptionreference_new( ppTDR, eTypeClass, aTypeName.pData );
@@ -1662,8 +1683,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_newByAsc
//------------------------------------------------------------------------ //------------------------------------------------------------------------
extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_new( extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_new(
typelib_TypeDescriptionReference ** ppTDR, typelib_TypeDescriptionReference ** ppTDR,
typelib_TypeClass eTypeClass, typelib_TypeClass eTypeClass, rtl_uString * pTypeName )
rtl_uString * pTypeName ) throw () SAL_THROW_EXTERN_C()
{ {
if( eTypeClass == typelib_TypeClass_TYPEDEF ) if( eTypeClass == typelib_TypeClass_TYPEDEF )
{ {
@@ -1757,14 +1778,16 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_new(
//------------------------------------------------------------------------ //------------------------------------------------------------------------
extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_acquire( extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_acquire(
typelib_TypeDescriptionReference * pRef ) throw () typelib_TypeDescriptionReference * pRef )
SAL_THROW_EXTERN_C()
{ {
::osl_incrementInterlockedCount( &pRef->nRefCount ); ::osl_incrementInterlockedCount( &pRef->nRefCount );
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_release( extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_release(
typelib_TypeDescriptionReference * pRef ) throw () typelib_TypeDescriptionReference * pRef )
SAL_THROW_EXTERN_C()
{ {
// Is it a type description? // Is it a type description?
if( reallyWeak( pRef->eTypeClass ) ) if( reallyWeak( pRef->eTypeClass ) )
@@ -1798,8 +1821,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_release(
//------------------------------------------------------------------------ //------------------------------------------------------------------------
extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_getDescription( extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_getDescription(
typelib_TypeDescription ** ppRet, typelib_TypeDescription ** ppRet, typelib_TypeDescriptionReference * pRef )
typelib_TypeDescriptionReference * pRef ) throw () SAL_THROW_EXTERN_C()
{ {
if( *ppRet ) if( *ppRet )
{ {
@@ -1847,8 +1870,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_getDescr
//------------------------------------------------------------------------ //------------------------------------------------------------------------
extern "C" void SAL_CALL typelib_typedescriptionreference_getByName( extern "C" void SAL_CALL typelib_typedescriptionreference_getByName(
typelib_TypeDescriptionReference ** ppRet, typelib_TypeDescriptionReference ** ppRet, rtl_uString * pName )
rtl_uString * pName ) throw () SAL_THROW_EXTERN_C()
{ {
if( *ppRet ) if( *ppRet )
{ {
@@ -1881,7 +1904,8 @@ extern "C" void SAL_CALL typelib_typedescriptionreference_getByName(
//------------------------------------------------------------------------ //------------------------------------------------------------------------
extern "C" SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_equals( extern "C" SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_equals(
const typelib_TypeDescriptionReference * p1, const typelib_TypeDescriptionReference * p1,
const typelib_TypeDescriptionReference * p2 ) throw () const typelib_TypeDescriptionReference * p2 )
SAL_THROW_EXTERN_C()
{ {
return (p1 == p2 || return (p1 == p2 ||
(p1->eTypeClass == p2->eTypeClass && (p1->eTypeClass == p2->eTypeClass &&
@@ -1892,7 +1916,8 @@ extern "C" SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_equa
//################################################################################################## //##################################################################################################
extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_assign( extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_assign(
typelib_TypeDescriptionReference ** ppDest, typelib_TypeDescriptionReference ** ppDest,
typelib_TypeDescriptionReference * pSource ) throw () typelib_TypeDescriptionReference * pSource )
SAL_THROW_EXTERN_C()
{ {
if (*ppDest != pSource) if (*ppDest != pSource)
{ {
@@ -1903,7 +1928,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL typelib_typedescriptionreference_assign(
} }
//################################################################################################## //##################################################################################################
extern "C" SAL_DLLEXPORT void SAL_CALL typelib_setCacheSize( sal_Int32 nNewSize ) throw () extern "C" SAL_DLLEXPORT void SAL_CALL typelib_setCacheSize( sal_Int32 nNewSize )
SAL_THROW_EXTERN_C()
{ {
OSL_ENSHURE( nNewSize >= 0, "### illegal cache size given!" ); OSL_ENSHURE( nNewSize >= 0, "### illegal cache size given!" );
if (nNewSize >= 0) if (nNewSize >= 0)
@@ -1941,7 +1967,8 @@ static sal_Bool s_aAssignableFromTab[11][11] =
//################################################################################################## //##################################################################################################
extern "C" SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_isAssignableFrom( extern "C" SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_isAssignableFrom(
typelib_TypeDescriptionReference * pAssignable, typelib_TypeDescriptionReference * pAssignable,
typelib_TypeDescriptionReference * pFrom ) throw () typelib_TypeDescriptionReference * pFrom )
SAL_THROW_EXTERN_C()
{ {
if (pAssignable && pFrom) if (pAssignable && pFrom)
{ {
@@ -2004,7 +2031,8 @@ extern "C" SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescriptionreference_isAs
//################################################################################################## //##################################################################################################
extern "C" SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_isAssignableFrom( extern "C" SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_isAssignableFrom(
typelib_TypeDescription * pAssignable, typelib_TypeDescription * pAssignable,
typelib_TypeDescription * pFrom ) throw () typelib_TypeDescription * pFrom )
SAL_THROW_EXTERN_C()
{ {
return typelib_typedescriptionreference_isAssignableFrom( return typelib_typedescriptionreference_isAssignableFrom(
pAssignable->pWeakRef, pFrom->pWeakRef ); pAssignable->pWeakRef, pFrom->pWeakRef );
@@ -2012,7 +2040,8 @@ extern "C" SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_isAssignableF
//################################################################################################## //##################################################################################################
extern "C" SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_complete( extern "C" SAL_DLLEXPORT sal_Bool SAL_CALL typelib_typedescription_complete(
typelib_TypeDescription ** ppTypeDescr ) throw () typelib_TypeDescription ** ppTypeDescr )
SAL_THROW_EXTERN_C()
{ {
if (! (*ppTypeDescr)->bComplete) if (! (*ppTypeDescr)->bComplete)
{ {

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: any.cxx,v $ * $RCSfile: any.cxx,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:39:28 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:57 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -72,7 +72,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_any_assign(
uno_Any * pDest, void * pSource, uno_Any * pDest, void * pSource,
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_AcquireFunc acquire, uno_ReleaseFunc release )
throw () SAL_THROW_EXTERN_C()
{ {
__destructAny( pDest, release ); __destructAny( pDest, release );
if (pType) if (pType)
@@ -89,7 +89,7 @@ SAL_DLLEXPORT void SAL_CALL uno_any_assign(
uno_Any * pDest, void * pSource, uno_Any * pDest, void * pSource,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_AcquireFunc acquire, uno_ReleaseFunc release )
throw () SAL_THROW_EXTERN_C()
{ {
__destructAny( pDest, release ); __destructAny( pDest, release );
if (pTypeDescr) if (pTypeDescr)
@@ -106,7 +106,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_any_construct(
uno_Any * pDest, void * pSource, uno_Any * pDest, void * pSource,
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
uno_AcquireFunc acquire ) uno_AcquireFunc acquire )
throw () SAL_THROW_EXTERN_C()
{ {
if (pType) if (pType)
{ {
@@ -122,7 +122,7 @@ SAL_DLLEXPORT void SAL_CALL uno_any_construct(
uno_Any * pDest, void * pSource, uno_Any * pDest, void * pSource,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_AcquireFunc acquire ) uno_AcquireFunc acquire )
throw () SAL_THROW_EXTERN_C()
{ {
if (pTypeDescr) if (pTypeDescr)
{ {
@@ -138,7 +138,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_any_constructAndConvert(
uno_Any * pDest, void * pSource, uno_Any * pDest, void * pSource,
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
uno_Mapping * mapping ) uno_Mapping * mapping )
throw () SAL_THROW_EXTERN_C()
{ {
if (pType) if (pType)
{ {
@@ -154,7 +154,7 @@ SAL_DLLEXPORT void SAL_CALL uno_any_constructAndConvert(
uno_Any * pDest, void * pSource, uno_Any * pDest, void * pSource,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_Mapping * mapping ) uno_Mapping * mapping )
throw () SAL_THROW_EXTERN_C()
{ {
if (pTypeDescr) if (pTypeDescr)
{ {
@@ -167,7 +167,7 @@ SAL_DLLEXPORT void SAL_CALL uno_any_constructAndConvert(
} }
//################################################################################################## //##################################################################################################
SAL_DLLEXPORT void SAL_CALL uno_any_destruct( uno_Any * pValue, uno_ReleaseFunc release ) SAL_DLLEXPORT void SAL_CALL uno_any_destruct( uno_Any * pValue, uno_ReleaseFunc release )
throw () SAL_THROW_EXTERN_C()
{ {
__destructAny( pValue, release ); __destructAny( pValue, release );
} }

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: assign.hxx,v $ * $RCSfile: assign.hxx,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:39:28 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:57 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -79,7 +79,7 @@ namespace cppu
inline void __assignInterface( inline void __assignInterface(
void ** ppDest, void * pSource, void ** ppDest, void * pSource,
uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_AcquireFunc acquire, uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
void * pDest = *ppDest; void * pDest = *ppDest;
if (pSource) if (pSource)
@@ -103,7 +103,7 @@ inline sal_Bool __queryAndAssignInterface(
void ** ppDest, void * pSource, void ** ppDest, void * pSource,
typelib_TypeDescriptionReference * pDestType, typelib_TypeDescriptionReference * pDestType,
uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
void * pDest = *ppDest; void * pDest = *ppDest;
if (pSource) if (pSource)
@@ -162,13 +162,13 @@ sal_Bool assignStruct(
void * pDest, void * pSource, void * pDest, void * pSource,
typelib_CompoundTypeDescription * pTypeDescr, typelib_CompoundTypeDescription * pTypeDescr,
uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release )
throw (); SAL_THROW( () );
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline sal_Bool __assignStruct( inline sal_Bool __assignStruct(
void * pDest, void * pSource, void * pDest, void * pSource,
typelib_CompoundTypeDescription * pTypeDescr, typelib_CompoundTypeDescription * pTypeDescr,
uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
if (pTypeDescr->pBaseTypeDescription) if (pTypeDescr->pBaseTypeDescription)
{ {
@@ -203,7 +203,7 @@ inline sal_Bool __assignData(
void * pSource, void * pSource,
typelib_TypeDescriptionReference * pSourceType, typelib_TypeDescription * pSourceTypeDescr, typelib_TypeDescriptionReference * pSourceType, typelib_TypeDescription * pSourceTypeDescr,
uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
if (pDest == pSource) if (pDest == pSource)
return sal_True; return sal_True;

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: constr.hxx,v $ * $RCSfile: constr.hxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:39:28 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:57 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -75,7 +75,7 @@ namespace cppu
inline void __defaultConstructUnion( inline void __defaultConstructUnion(
void * pMem, void * pMem,
typelib_TypeDescription * pTypeDescr ) typelib_TypeDescription * pTypeDescr )
throw () SAL_THROW( () )
{ {
::uno_type_constructData( ::uno_type_constructData(
(char *)pMem + ((typelib_UnionTypeDescription *)pTypeDescr)->nValueOffset, (char *)pMem + ((typelib_UnionTypeDescription *)pTypeDescr)->nValueOffset,
@@ -86,12 +86,12 @@ inline void __defaultConstructUnion(
void defaultConstructStruct( void defaultConstructStruct(
void * pMem, void * pMem,
typelib_CompoundTypeDescription * pCompType ) typelib_CompoundTypeDescription * pCompType )
throw (); SAL_THROW( () );
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline void __defaultConstructStruct( inline void __defaultConstructStruct(
void * pMem, void * pMem,
typelib_CompoundTypeDescription * pTypeDescr ) typelib_CompoundTypeDescription * pTypeDescr )
throw () SAL_THROW( () )
{ {
if (pTypeDescr->pBaseTypeDescription) if (pTypeDescr->pBaseTypeDescription)
{ {
@@ -113,7 +113,7 @@ inline void __defaultConstructData(
void * pMem, void * pMem,
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
typelib_TypeDescription * pTypeDescr ) typelib_TypeDescription * pTypeDescr )
throw () SAL_THROW( () )
{ {
switch (pType->eTypeClass) switch (pType->eTypeClass)
{ {

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: copy.hxx,v $ * $RCSfile: copy.hxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:39:28 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:57 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -78,13 +78,13 @@ void copyConstructStruct(
void * pDest, void * pSource, void * pDest, void * pSource,
typelib_CompoundTypeDescription * pTypeDescr, typelib_CompoundTypeDescription * pTypeDescr,
uno_AcquireFunc acquire, uno_Mapping * mapping ) uno_AcquireFunc acquire, uno_Mapping * mapping )
throw (); SAL_THROW ( () );
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline void __copyConstructStruct( inline void __copyConstructStruct(
void * pDest, void * pSource, void * pDest, void * pSource,
typelib_CompoundTypeDescription * pTypeDescr, typelib_CompoundTypeDescription * pTypeDescr,
uno_AcquireFunc acquire, uno_Mapping * mapping ) uno_AcquireFunc acquire, uno_Mapping * mapping )
throw () SAL_THROW ( () )
{ {
if (pTypeDescr->pBaseTypeDescription) if (pTypeDescr->pBaseTypeDescription)
{ {
@@ -121,7 +121,7 @@ inline void __copyConstructUnion(
void * pDest, void * pSource, void * pDest, void * pSource,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_AcquireFunc acquire, uno_Mapping * mapping ) uno_AcquireFunc acquire, uno_Mapping * mapping )
throw () SAL_THROW ( () )
{ {
typelib_TypeDescriptionReference * pSetType = __unionGetSetType( pSource, pTypeDescr ); typelib_TypeDescriptionReference * pSetType = __unionGetSetType( pSource, pTypeDescr );
if (mapping) if (mapping)
@@ -146,13 +146,13 @@ void copyConstructSequence(
uno_Sequence ** ppDest, uno_Sequence * pSource, uno_Sequence ** ppDest, uno_Sequence * pSource,
typelib_TypeDescriptionReference * pElementType, typelib_TypeDescriptionReference * pElementType,
uno_AcquireFunc acquire, uno_Mapping * mapping ) uno_AcquireFunc acquire, uno_Mapping * mapping )
throw (); SAL_THROW ( () );
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline void __copyConstructAnyFromData( inline void __copyConstructAnyFromData(
uno_Any * pDestAny, void * pSource, uno_Any * pDestAny, void * pSource,
typelib_TypeDescriptionReference * pType, typelib_TypeDescription * pTypeDescr, typelib_TypeDescriptionReference * pType, typelib_TypeDescription * pTypeDescr,
uno_AcquireFunc acquire, uno_Mapping * mapping ) uno_AcquireFunc acquire, uno_Mapping * mapping )
throw () SAL_THROW ( () )
{ {
TYPE_ACQUIRE( pType ); TYPE_ACQUIRE( pType );
pDestAny->pType = pType; pDestAny->pType = pType;
@@ -290,7 +290,7 @@ inline void __copyConstructAny(
uno_Any * pDestAny, void * pSource, uno_Any * pDestAny, void * pSource,
typelib_TypeDescriptionReference * pType, typelib_TypeDescription * pTypeDescr, typelib_TypeDescriptionReference * pType, typelib_TypeDescription * pTypeDescr,
uno_AcquireFunc acquire, uno_Mapping * mapping ) uno_AcquireFunc acquire, uno_Mapping * mapping )
throw () SAL_THROW ( () )
{ {
if (typelib_TypeClass_VOID == pType->eTypeClass) if (typelib_TypeClass_VOID == pType->eTypeClass)
{ {
@@ -437,7 +437,7 @@ inline void __copyConstructSequence(
uno_Sequence ** ppDest, uno_Sequence * pSource, uno_Sequence ** ppDest, uno_Sequence * pSource,
typelib_TypeDescriptionReference * pElementType, typelib_TypeDescriptionReference * pElementType,
uno_AcquireFunc acquire, uno_Mapping * mapping ) uno_AcquireFunc acquire, uno_Mapping * mapping )
throw () SAL_THROW ( () )
{ {
typelib_TypeClass eTypeClass = pElementType->eTypeClass; typelib_TypeClass eTypeClass = pElementType->eTypeClass;
if (!mapping || if (!mapping ||
@@ -594,7 +594,7 @@ inline void __copyConstructData(
void * pDest, void * pSource, void * pDest, void * pSource,
typelib_TypeDescriptionReference * pType, typelib_TypeDescription * pTypeDescr, typelib_TypeDescriptionReference * pType, typelib_TypeDescription * pTypeDescr,
uno_AcquireFunc acquire, uno_Mapping * mapping ) uno_AcquireFunc acquire, uno_Mapping * mapping )
throw () SAL_THROW ( () )
{ {
switch (pType->eTypeClass) switch (pType->eTypeClass)
{ {

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: data.cxx,v $ * $RCSfile: data.cxx,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: dbo $ $Date: 2001-02-20 10:16:11 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:57 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -82,7 +82,7 @@ typelib_TypeDescription * s_pQITD = 0;
void defaultConstructStruct( void defaultConstructStruct(
void * pMem, void * pMem,
typelib_CompoundTypeDescription * pCompType ) typelib_CompoundTypeDescription * pCompType )
throw () SAL_THROW( () )
{ {
__defaultConstructStruct( pMem, pCompType ); __defaultConstructStruct( pMem, pCompType );
} }
@@ -91,7 +91,7 @@ void copyConstructStruct(
void * pDest, void * pSource, void * pDest, void * pSource,
typelib_CompoundTypeDescription * pTypeDescr, typelib_CompoundTypeDescription * pTypeDescr,
uno_AcquireFunc acquire, uno_Mapping * mapping ) uno_AcquireFunc acquire, uno_Mapping * mapping )
throw () SAL_THROW( () )
{ {
__copyConstructStruct( pDest, pSource, pTypeDescr, acquire, mapping ); __copyConstructStruct( pDest, pSource, pTypeDescr, acquire, mapping );
} }
@@ -100,7 +100,7 @@ void destructStruct(
void * pValue, void * pValue,
typelib_CompoundTypeDescription * pTypeDescr, typelib_CompoundTypeDescription * pTypeDescr,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
__destructStruct( pValue, pTypeDescr, release ); __destructStruct( pValue, pTypeDescr, release );
} }
@@ -109,7 +109,7 @@ sal_Bool equalStruct(
void * pDest, void *pSource, void * pDest, void *pSource,
typelib_CompoundTypeDescription * pTypeDescr, typelib_CompoundTypeDescription * pTypeDescr,
uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
return __equalStruct( pDest, pSource, pTypeDescr, queryInterface, release ); return __equalStruct( pDest, pSource, pTypeDescr, queryInterface, release );
} }
@@ -118,7 +118,7 @@ sal_Bool assignStruct(
void * pDest, void * pSource, void * pDest, void * pSource,
typelib_CompoundTypeDescription * pTypeDescr, typelib_CompoundTypeDescription * pTypeDescr,
uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
return __assignStruct( pDest, pSource, pTypeDescr, queryInterface, acquire, release ); return __assignStruct( pDest, pSource, pTypeDescr, queryInterface, acquire, release );
} }
@@ -127,7 +127,7 @@ void copyConstructSequence(
uno_Sequence ** ppDest, uno_Sequence * pSource, uno_Sequence ** ppDest, uno_Sequence * pSource,
typelib_TypeDescriptionReference * pElementType, typelib_TypeDescriptionReference * pElementType,
uno_AcquireFunc acquire, uno_Mapping * mapping ) uno_AcquireFunc acquire, uno_Mapping * mapping )
throw () SAL_THROW( () )
{ {
__copyConstructSequence( ppDest, pSource, pElementType, acquire, mapping ); __copyConstructSequence( ppDest, pSource, pElementType, acquire, mapping );
} }
@@ -136,7 +136,7 @@ void destructSequence(
uno_Sequence ** ppSequence, uno_Sequence ** ppSequence,
typelib_TypeDescriptionReference * pElementType, typelib_TypeDescriptionReference * pElementType,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
uno_Sequence * pSequence = *ppSequence; uno_Sequence * pSequence = *ppSequence;
OSL_ASSERT( pSequence ); OSL_ASSERT( pSequence );
@@ -154,7 +154,7 @@ sal_Bool equalSequence(
uno_Sequence * pDest, uno_Sequence * pSource, uno_Sequence * pDest, uno_Sequence * pSource,
typelib_TypeDescriptionReference * pElementType, typelib_TypeDescriptionReference * pElementType,
uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
return __equalSequence( pDest, pSource, pElementType, queryInterface, release ); return __equalSequence( pDest, pSource, pElementType, queryInterface, release );
} }
@@ -164,14 +164,14 @@ extern "C"
//################################################################################################## //##################################################################################################
SAL_DLLEXPORT void SAL_CALL uno_type_constructData( SAL_DLLEXPORT void SAL_CALL uno_type_constructData(
void * pMem, typelib_TypeDescriptionReference * pType ) void * pMem, typelib_TypeDescriptionReference * pType )
throw () SAL_THROW_EXTERN_C()
{ {
__defaultConstructData( pMem, pType, 0 ); __defaultConstructData( pMem, pType, 0 );
} }
//################################################################################################## //##################################################################################################
SAL_DLLEXPORT void SAL_CALL uno_constructData( SAL_DLLEXPORT void SAL_CALL uno_constructData(
void * pMem, typelib_TypeDescription * pTypeDescr ) void * pMem, typelib_TypeDescription * pTypeDescr )
throw () SAL_THROW_EXTERN_C()
{ {
__defaultConstructData( pMem, pTypeDescr->pWeakRef, pTypeDescr ); __defaultConstructData( pMem, pTypeDescr->pWeakRef, pTypeDescr );
} }
@@ -179,7 +179,7 @@ SAL_DLLEXPORT void SAL_CALL uno_constructData(
SAL_DLLEXPORT void SAL_CALL uno_type_destructData( SAL_DLLEXPORT void SAL_CALL uno_type_destructData(
void * pValue, typelib_TypeDescriptionReference * pType, void * pValue, typelib_TypeDescriptionReference * pType,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
throw () SAL_THROW_EXTERN_C()
{ {
__destructData( pValue, pType, 0, release ); __destructData( pValue, pType, 0, release );
} }
@@ -188,7 +188,7 @@ SAL_DLLEXPORT void SAL_CALL uno_destructData(
void * pValue, void * pValue,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
throw () SAL_THROW_EXTERN_C()
{ {
__destructData( pValue, pTypeDescr->pWeakRef, pTypeDescr, release ); __destructData( pValue, pTypeDescr->pWeakRef, pTypeDescr, release );
} }
@@ -197,7 +197,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_copyData(
void * pDest, void * pSource, void * pDest, void * pSource,
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
uno_AcquireFunc acquire ) uno_AcquireFunc acquire )
throw () SAL_THROW_EXTERN_C()
{ {
__copyConstructData( pDest, pSource, pType, 0, acquire, 0 ); __copyConstructData( pDest, pSource, pType, 0, acquire, 0 );
} }
@@ -206,7 +206,7 @@ SAL_DLLEXPORT void SAL_CALL uno_copyData(
void * pDest, void * pSource, void * pDest, void * pSource,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_AcquireFunc acquire ) uno_AcquireFunc acquire )
throw () SAL_THROW_EXTERN_C()
{ {
__copyConstructData( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, acquire, 0 ); __copyConstructData( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, acquire, 0 );
} }
@@ -215,7 +215,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_copyAndConvertData(
void * pDest, void * pSource, void * pDest, void * pSource,
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
uno_Mapping * mapping ) uno_Mapping * mapping )
throw () SAL_THROW_EXTERN_C()
{ {
__copyConstructData( pDest, pSource, pType, 0, 0, mapping ); __copyConstructData( pDest, pSource, pType, 0, 0, mapping );
} }
@@ -224,7 +224,7 @@ SAL_DLLEXPORT void SAL_CALL uno_copyAndConvertData(
void * pDest, void * pSource, void * pDest, void * pSource,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_Mapping * mapping ) uno_Mapping * mapping )
throw () SAL_THROW_EXTERN_C()
{ {
__copyConstructData( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, 0, mapping ); __copyConstructData( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, 0, mapping );
} }
@@ -233,7 +233,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_type_equalData(
void * pVal1, typelib_TypeDescriptionReference * pVal1Type, void * pVal1, typelib_TypeDescriptionReference * pVal1Type,
void * pVal2, typelib_TypeDescriptionReference * pVal2Type, void * pVal2, typelib_TypeDescriptionReference * pVal2Type,
uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
throw () SAL_THROW_EXTERN_C()
{ {
return __equalData( pVal1, pVal1Type, 0, return __equalData( pVal1, pVal1Type, 0,
pVal2, pVal2Type, 0, pVal2, pVal2Type, 0,
@@ -244,7 +244,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_equalData(
void * pVal1, typelib_TypeDescription * pVal1TD, void * pVal1, typelib_TypeDescription * pVal1TD,
void * pVal2, typelib_TypeDescription * pVal2TD, void * pVal2, typelib_TypeDescription * pVal2TD,
uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
throw () SAL_THROW_EXTERN_C()
{ {
return __equalData( pVal1, pVal1TD->pWeakRef, pVal1TD, return __equalData( pVal1, pVal1TD->pWeakRef, pVal1TD,
pVal2, pVal2TD->pWeakRef, pVal2TD, pVal2, pVal2TD->pWeakRef, pVal2TD,
@@ -255,7 +255,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_type_assignData(
void * pDest, typelib_TypeDescriptionReference * pDestType, void * pDest, typelib_TypeDescriptionReference * pDestType,
void * pSource, typelib_TypeDescriptionReference * pSourceType, void * pSource, typelib_TypeDescriptionReference * pSourceType,
uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release )
throw () SAL_THROW_EXTERN_C()
{ {
return __assignData( pDest, pDestType, 0, return __assignData( pDest, pDestType, 0,
pSource, pSourceType, 0, pSource, pSourceType, 0,
@@ -266,7 +266,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_assignData(
void * pDest, typelib_TypeDescription * pDestTD, void * pDest, typelib_TypeDescription * pDestTD,
void * pSource, typelib_TypeDescription * pSourceTD, void * pSource, typelib_TypeDescription * pSourceTD,
uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release )
throw () SAL_THROW_EXTERN_C()
{ {
return __assignData( pDest, pDestTD->pWeakRef, pDestTD, return __assignData( pDest, pDestTD->pWeakRef, pDestTD,
pSource, pSourceTD->pWeakRef, pSourceTD, pSource, pSourceTD->pWeakRef, pSourceTD,
@@ -281,6 +281,7 @@ SAL_DLLEXPORT sal_Bool SAL_CALL uno_assignData(
#ifdef _DEBUG #ifdef _DEBUG
#ifdef SAL_W32 #ifdef SAL_W32
# pragma pack(push, 8) # pragma pack(push, 8)
#elif defined(SAL_OS2) #elif defined(SAL_OS2)
@@ -303,6 +304,11 @@ struct O : public M
double p; double p;
}; };
struct P : public N
{
double p;
};
struct empty struct empty
{ {
}; };
@@ -362,6 +368,11 @@ public:
if( sizeof( M ) != 8 || sizeof( N ) != 12 || sizeof( O ) != 16 ) if( sizeof( M ) != 8 || sizeof( N ) != 12 || sizeof( O ) != 16 )
abort(); abort();
#ifdef SAL_W32
if( sizeof( P ) != 24 )
abort();
#endif
#ifndef __GNUC__ #ifndef __GNUC__
// An empty superclass have a size of 0 except for gcc // An empty superclass have a size of 0 except for gcc
// FEATURE_EMPTYCLASS // FEATURE_EMPTYCLASS
@@ -377,6 +388,7 @@ public:
#endif #endif
static BinaryCompatible_Impl aTest; static BinaryCompatible_Impl aTest;
#endif #endif
} }

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: destr.hxx,v $ * $RCSfile: destr.hxx,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: dbo $ $Date: 2001-02-28 15:36:21 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:57 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -77,7 +77,7 @@ inline void __destructUnion(
void * pValue, void * pValue,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
typelib_TypeDescriptionReference * pType = __unionGetSetType( pValue, pTypeDescr ); typelib_TypeDescriptionReference * pType = __unionGetSetType( pValue, pTypeDescr );
::uno_type_destructData( ::uno_type_destructData(
@@ -90,13 +90,13 @@ void destructStruct(
void * pValue, void * pValue,
typelib_CompoundTypeDescription * pTypeDescr, typelib_CompoundTypeDescription * pTypeDescr,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
throw (); SAL_THROW( () );
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline void __destructStruct( inline void __destructStruct(
void * pValue, void * pValue,
typelib_CompoundTypeDescription * pTypeDescr, typelib_CompoundTypeDescription * pTypeDescr,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
if (pTypeDescr->pBaseTypeDescription) if (pTypeDescr->pBaseTypeDescription)
{ {
@@ -117,12 +117,12 @@ void destructSequence(
uno_Sequence ** ppSequence, uno_Sequence ** ppSequence,
typelib_TypeDescriptionReference * pElementType, typelib_TypeDescriptionReference * pElementType,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
throw (); SAL_THROW( () );
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline void __destructAny( inline void __destructAny(
uno_Any * pAny, uno_Any * pAny,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
typelib_TypeDescriptionReference * pType = pAny->pType; typelib_TypeDescriptionReference * pType = pAny->pType;
@@ -190,7 +190,7 @@ inline sal_Int32 __destructElements(
void * pElements, typelib_TypeDescriptionReference * pElementType, void * pElements, typelib_TypeDescriptionReference * pElementType,
sal_Int32 nStartIndex, sal_Int32 nStopIndex, sal_Int32 nStartIndex, sal_Int32 nStopIndex,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
switch (pElementType->eTypeClass) switch (pElementType->eTypeClass)
{ {
@@ -332,7 +332,7 @@ inline void __destructSequence(
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
if (! ::osl_decrementInterlockedCount( &pSequence->nRefCount )) if (! ::osl_decrementInterlockedCount( &pSequence->nRefCount ))
{ {
@@ -362,7 +362,7 @@ inline void __destructData(
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
switch (pType->eTypeClass) switch (pType->eTypeClass)
{ {

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: eq.hxx,v $ * $RCSfile: eq.hxx,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:39:29 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:57 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -80,7 +80,8 @@ namespace cppu
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline sal_Bool __unoEqualObject( void * pUnoI1, void * pUnoI2 ) throw () inline sal_Bool __unoEqualObject( void * pUnoI1, void * pUnoI2 )
SAL_THROW( () )
{ {
if (pUnoI1 == pUnoI2) if (pUnoI1 == pUnoI2)
return sal_True; return sal_True;
@@ -139,7 +140,7 @@ inline sal_Bool __unoEqualObject( void * pUnoI1, void * pUnoI2 ) throw ()
inline sal_Bool __equalObject( inline sal_Bool __equalObject(
void * pI1, void * pI2, void * pI1, void * pI2,
uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
if (pI1 == pI2) if (pI1 == pI2)
return sal_True; return sal_True;
@@ -167,13 +168,13 @@ sal_Bool equalStruct(
void * pDest, void *pSource, void * pDest, void *pSource,
typelib_CompoundTypeDescription * pTypeDescr, typelib_CompoundTypeDescription * pTypeDescr,
uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
throw (); SAL_THROW( () );
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline sal_Bool __equalStruct( inline sal_Bool __equalStruct(
void * pDest, void *pSource, void * pDest, void *pSource,
typelib_CompoundTypeDescription * pTypeDescr, typelib_CompoundTypeDescription * pTypeDescr,
uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
if (pTypeDescr->pBaseTypeDescription && if (pTypeDescr->pBaseTypeDescription &&
!equalStruct( pDest, pSource, pTypeDescr->pBaseTypeDescription, queryInterface, release )) !equalStruct( pDest, pSource, pTypeDescr->pBaseTypeDescription, queryInterface, release ))
@@ -204,13 +205,13 @@ sal_Bool equalSequence(
uno_Sequence * pDest, uno_Sequence * pSource, uno_Sequence * pDest, uno_Sequence * pSource,
typelib_TypeDescriptionReference * pElementType, typelib_TypeDescriptionReference * pElementType,
uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
throw (); SAL_THROW( () );
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline sal_Bool __equalSequence( inline sal_Bool __equalSequence(
uno_Sequence * pDest, uno_Sequence * pSource, uno_Sequence * pDest, uno_Sequence * pSource,
typelib_TypeDescriptionReference * pElementType, typelib_TypeDescriptionReference * pElementType,
uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
if (pDest == pSource) if (pDest == pSource)
return sal_True; return sal_True;
@@ -391,7 +392,7 @@ inline sal_Bool __equalData(
void * pSource, void * pSource,
typelib_TypeDescriptionReference * pSourceType, typelib_TypeDescription * pSourceTypeDescr, typelib_TypeDescriptionReference * pSourceType, typelib_TypeDescription * pSourceTypeDescr,
uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
typelib_TypeClass eSourceTypeClass, eDestTypeClass; typelib_TypeClass eSourceTypeClass, eDestTypeClass;
while (typelib_TypeClass_ANY == (eDestTypeClass = pDestType->eTypeClass)) while (typelib_TypeClass_ANY == (eDestTypeClass = pDestType->eTypeClass))

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: lbenv.cxx,v $ * $RCSfile: lbenv.cxx,v $
* *
* $Revision: 1.14 $ * $Revision: 1.15 $
* *
* last change: $Author: dbo $ $Date: 2001-02-20 10:16:11 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:57 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -130,7 +130,7 @@ namespace cppu
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline static sal_Bool td_equals( typelib_InterfaceTypeDescription * pTD1, inline static sal_Bool td_equals( typelib_InterfaceTypeDescription * pTD1,
typelib_InterfaceTypeDescription * pTD2 ) typelib_InterfaceTypeDescription * pTD2 )
throw () SAL_THROW( () )
{ {
return (pTD1 == pTD2 || return (pTD1 == pTD2 ||
(((typelib_TypeDescription *)pTD1)->pTypeName->length == (((typelib_TypeDescription *)pTD1)->pTypeName->length ==
@@ -148,7 +148,8 @@ struct InterfaceEntry
typelib_InterfaceTypeDescription * pTypeDescr; typelib_InterfaceTypeDescription * pTypeDescr;
ObjectEntry * pOEntry; ObjectEntry * pOEntry;
inline sal_Bool supports( typelib_InterfaceTypeDescription * pTypeDescr_ ) const throw (); inline sal_Bool supports( typelib_InterfaceTypeDescription * pTypeDescr_ ) const
SAL_THROW( () );
}; };
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
struct ObjectEntry struct ObjectEntry
@@ -158,25 +159,27 @@ struct ObjectEntry
sal_Int32 nRef; sal_Int32 nRef;
vector< InterfaceEntry > aInterfaces; vector< InterfaceEntry > aInterfaces;
inline ObjectEntry( uno_ExtEnvironment * pEnv, const OUString & rOId_ ) throw (); inline ObjectEntry( uno_ExtEnvironment * pEnv, const OUString & rOId_ ) SAL_THROW( () );
inline void append( inline void append(
void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr, void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr,
uno_freeProxyFunc fpFreeProxy ) throw (); uno_freeProxyFunc fpFreeProxy )
SAL_THROW( () );
inline const InterfaceEntry * find( inline const InterfaceEntry * find(
typelib_InterfaceTypeDescription * pTypeDescr ) const throw (); typelib_InterfaceTypeDescription * pTypeDescr ) const
SAL_THROW( () );
}; };
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
struct FctPtrHash : public unary_function< const void *, size_t > struct FctPtrHash : public unary_function< const void *, size_t >
{ {
size_t operator()( const void * pKey ) const throw () size_t operator () ( const void * pKey ) const SAL_THROW( () )
{ return (size_t)pKey; } { return (size_t)pKey; }
}; };
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
struct FctOUStringHash : public unary_function< const OUString &, size_t > struct FctOUStringHash : public unary_function< const OUString &, size_t >
{ {
size_t operator()( const OUString & rKey ) const throw () size_t operator () ( const OUString & rKey ) const SAL_THROW( () )
{ return rKey.hashCode(); } { return rKey.hashCode(); }
}; };
@@ -194,17 +197,21 @@ struct EnvironmentsData
Mutex aMutex; Mutex aMutex;
OUString2EnvironmentMap aName2EnvMap; OUString2EnvironmentMap aName2EnvMap;
~EnvironmentsData() throw (); ~EnvironmentsData() SAL_THROW( () );
inline uno_Environment * getEnvironment( const OUString & rTypeName, void * pContext ) throw (); inline uno_Environment * getEnvironment( const OUString & rTypeName, void * pContext )
inline sal_Bool registerEnvironment( uno_Environment * pEnv ) throw (); SAL_THROW( () );
inline sal_Bool revokeEnvironment( uno_Environment * pEnv ) throw (); inline sal_Bool registerEnvironment( uno_Environment * pEnv )
SAL_THROW( () );
inline sal_Bool revokeEnvironment( uno_Environment * pEnv )
SAL_THROW( () );
inline void getRegisteredEnvironments( inline void getRegisteredEnvironments(
uno_Environment *** pppEnvs, sal_Int32 * pnLen, uno_memAlloc memAlloc, uno_Environment *** pppEnvs, sal_Int32 * pnLen, uno_memAlloc memAlloc,
const OUString & rEnvTypeName ) throw (); const OUString & rEnvTypeName )
SAL_THROW( () );
}; };
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
static EnvironmentsData & getEnvironmentsData() throw () static EnvironmentsData & getEnvironmentsData() SAL_THROW( () )
{ {
static EnvironmentsData * s_p = 0; static EnvironmentsData * s_p = 0;
if (! s_p) if (! s_p)
@@ -230,12 +237,15 @@ struct uno_DefaultEnvironment : public uno_ExtEnvironment
OId2ObjectMap aOId2ObjectMap; OId2ObjectMap aOId2ObjectMap;
uno_DefaultEnvironment( uno_DefaultEnvironment(
const OUString & rTypeName_, void * pContext_, oslModule hMod_ ) throw (); const OUString & rTypeName_, void * pContext_, oslModule hMod_ )
~uno_DefaultEnvironment() throw (); SAL_THROW( () );
~uno_DefaultEnvironment()
SAL_THROW( () );
}; };
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline ObjectEntry::ObjectEntry( uno_ExtEnvironment * pEnv_, const OUString & rOId_ ) throw () inline ObjectEntry::ObjectEntry( uno_ExtEnvironment * pEnv_, const OUString & rOId_ )
SAL_THROW( () )
: pEnv( pEnv_ ) : pEnv( pEnv_ )
, oid( rOId_ ) , oid( rOId_ )
, nRef( 0 ) , nRef( 0 )
@@ -245,7 +255,8 @@ inline ObjectEntry::ObjectEntry( uno_ExtEnvironment * pEnv_, const OUString & rO
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline void ObjectEntry::append( inline void ObjectEntry::append(
void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr, void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr,
uno_freeProxyFunc fpFreeProxy ) throw () uno_freeProxyFunc fpFreeProxy )
SAL_THROW( () )
{ {
InterfaceEntry aNewEntry; InterfaceEntry aNewEntry;
if (! fpFreeProxy) if (! fpFreeProxy)
@@ -260,7 +271,8 @@ inline void ObjectEntry::append(
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool InterfaceEntry::supports( inline sal_Bool InterfaceEntry::supports(
typelib_InterfaceTypeDescription * pTypeDescr_ ) const throw () typelib_InterfaceTypeDescription * pTypeDescr_ ) const
SAL_THROW( () )
{ {
typelib_InterfaceTypeDescription * pITD = pTypeDescr; typelib_InterfaceTypeDescription * pITD = pTypeDescr;
while (pITD) while (pITD)
@@ -273,7 +285,8 @@ inline sal_Bool InterfaceEntry::supports(
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline const InterfaceEntry * ObjectEntry::find( inline const InterfaceEntry * ObjectEntry::find(
typelib_InterfaceTypeDescription * pTypeDescr ) const throw () typelib_InterfaceTypeDescription * pTypeDescr ) const
SAL_THROW( () )
{ {
// shortcut common case // shortcut common case
if (((typelib_TypeDescription *)pTypeDescr)->pTypeName->length == sizeof("com.sun.star.uno.XInterface") && if (((typelib_TypeDescription *)pTypeDescr)->pTypeName->length == sizeof("com.sun.star.uno.XInterface") &&
@@ -298,7 +311,7 @@ extern "C"
static void SAL_CALL defenv_registerInterface( static void SAL_CALL defenv_registerInterface(
uno_ExtEnvironment * pEnv, void ** ppInterface, uno_ExtEnvironment * pEnv, void ** ppInterface,
rtl_uString * pOId, typelib_InterfaceTypeDescription * pTypeDescr ) rtl_uString * pOId, typelib_InterfaceTypeDescription * pTypeDescr )
throw () SAL_THROW( () )
{ {
OSL_ENSHURE( pEnv && ppInterface && pOId && pTypeDescr, "### null ptr!" ); OSL_ENSHURE( pEnv && ppInterface && pOId && pTypeDescr, "### null ptr!" );
const OUString & rOId = * reinterpret_cast< OUString * >( &pOId ); const OUString & rOId = * reinterpret_cast< OUString * >( &pOId );
@@ -341,7 +354,7 @@ static void SAL_CALL defenv_registerInterface(
static void SAL_CALL defenv_registerProxyInterface( static void SAL_CALL defenv_registerProxyInterface(
uno_ExtEnvironment * pEnv, void ** ppInterface, uno_freeProxyFunc freeProxy, uno_ExtEnvironment * pEnv, void ** ppInterface, uno_freeProxyFunc freeProxy,
rtl_uString * pOId, typelib_InterfaceTypeDescription * pTypeDescr ) rtl_uString * pOId, typelib_InterfaceTypeDescription * pTypeDescr )
throw () SAL_THROW( () )
{ {
OSL_ENSHURE( pEnv && ppInterface && pOId && pTypeDescr, "### null ptr!" ); OSL_ENSHURE( pEnv && ppInterface && pOId && pTypeDescr, "### null ptr!" );
const OUString & rOId = * reinterpret_cast< OUString * >( &pOId ); const OUString & rOId = * reinterpret_cast< OUString * >( &pOId );
@@ -384,7 +397,7 @@ static void SAL_CALL defenv_registerProxyInterface(
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
static void SAL_CALL defenv_revokeInterface( static void SAL_CALL defenv_revokeInterface(
uno_ExtEnvironment * pEnv, void * pInterface ) uno_ExtEnvironment * pEnv, void * pInterface )
throw () SAL_THROW( () )
{ {
OSL_ENSHURE( pEnv && pInterface, "### null ptr!" ); OSL_ENSHURE( pEnv && pInterface, "### null ptr!" );
ClearableMutexGuard aGuard( static_cast< uno_DefaultEnvironment * >( pEnv )->aAccess ); ClearableMutexGuard aGuard( static_cast< uno_DefaultEnvironment * >( pEnv )->aAccess );
@@ -426,7 +439,7 @@ static void SAL_CALL defenv_revokeInterface(
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
static void SAL_CALL defenv_getObjectIdentifier( static void SAL_CALL defenv_getObjectIdentifier(
uno_ExtEnvironment * pEnv, rtl_uString ** ppOId, void * pInterface ) uno_ExtEnvironment * pEnv, rtl_uString ** ppOId, void * pInterface )
throw () SAL_THROW( () )
{ {
OSL_ENSHURE( pEnv && ppOId && pInterface, "### null ptr!" ); OSL_ENSHURE( pEnv && ppOId && pInterface, "### null ptr!" );
if (*ppOId) if (*ppOId)
@@ -453,7 +466,7 @@ static void SAL_CALL defenv_getObjectIdentifier(
static void SAL_CALL defenv_getRegisteredInterface( static void SAL_CALL defenv_getRegisteredInterface(
uno_ExtEnvironment * pEnv, void ** ppInterface, uno_ExtEnvironment * pEnv, void ** ppInterface,
rtl_uString * pOId, typelib_InterfaceTypeDescription * pTypeDescr ) rtl_uString * pOId, typelib_InterfaceTypeDescription * pTypeDescr )
throw () SAL_THROW( () )
{ {
OSL_ENSHURE( pEnv && ppInterface && pOId && pTypeDescr, "### null ptr!" ); OSL_ENSHURE( pEnv && ppInterface && pOId && pTypeDescr, "### null ptr!" );
if (*ppInterface) if (*ppInterface)
@@ -478,7 +491,7 @@ static void SAL_CALL defenv_getRegisteredInterface(
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
static void SAL_CALL defenv_getRegisteredInterfaces( static void SAL_CALL defenv_getRegisteredInterfaces(
uno_ExtEnvironment * pEnv, void *** pppInterfaces, sal_Int32 * pnLen, uno_memAlloc memAlloc ) uno_ExtEnvironment * pEnv, void *** pppInterfaces, sal_Int32 * pnLen, uno_memAlloc memAlloc )
throw () SAL_THROW( () )
{ {
OSL_ENSHURE( pEnv && pppInterfaces && pnLen && memAlloc, "### null ptr!" ); OSL_ENSHURE( pEnv && pppInterfaces && pnLen && memAlloc, "### null ptr!" );
MutexGuard aGuard( static_cast< uno_DefaultEnvironment * >( pEnv )->aAccess ); MutexGuard aGuard( static_cast< uno_DefaultEnvironment * >( pEnv )->aAccess );
@@ -500,13 +513,13 @@ static void SAL_CALL defenv_getRegisteredInterfaces(
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
static void SAL_CALL defenv_acquire( uno_Environment * pEnv ) static void SAL_CALL defenv_acquire( uno_Environment * pEnv )
throw () SAL_THROW( () )
{ {
::osl_incrementInterlockedCount( &((uno_DefaultEnvironment *)pEnv)->nRef ); ::osl_incrementInterlockedCount( &((uno_DefaultEnvironment *)pEnv)->nRef );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
static void SAL_CALL defenv_release( uno_Environment * pEnv ) static void SAL_CALL defenv_release( uno_Environment * pEnv )
throw () SAL_THROW( () )
{ {
ClearableMutexGuard aGuard( getEnvironmentsData().aMutex ); ClearableMutexGuard aGuard( getEnvironmentsData().aMutex );
if (! ::osl_decrementInterlockedCount( &((uno_DefaultEnvironment *)pEnv)->nRef )) if (! ::osl_decrementInterlockedCount( &((uno_DefaultEnvironment *)pEnv)->nRef ))
@@ -518,14 +531,15 @@ static void SAL_CALL defenv_release( uno_Environment * pEnv )
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
static void SAL_CALL defenv_dispose( uno_Environment * pEnv ) static void SAL_CALL defenv_dispose( uno_Environment * pEnv )
throw () SAL_THROW( () )
{ {
} }
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
uno_DefaultEnvironment::uno_DefaultEnvironment( uno_DefaultEnvironment::uno_DefaultEnvironment(
const OUString & rTypeName_, void * pContext_, oslModule hMod_ ) throw () const OUString & rTypeName_, void * pContext_, oslModule hMod_ )
SAL_THROW( () )
: nRef( 0 ) : nRef( 0 )
, hModule( hMod_ ) , hModule( hMod_ )
{ {
@@ -553,7 +567,7 @@ uno_DefaultEnvironment::uno_DefaultEnvironment(
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
uno_DefaultEnvironment::~uno_DefaultEnvironment() throw () uno_DefaultEnvironment::~uno_DefaultEnvironment() SAL_THROW( () )
{ {
OSL_ENSHURE( aOId2ObjectMap.empty(), "### object entries left!" ); OSL_ENSHURE( aOId2ObjectMap.empty(), "### object entries left!" );
@@ -571,7 +585,8 @@ uno_DefaultEnvironment::~uno_DefaultEnvironment() throw ()
} }
//================================================================================================== //==================================================================================================
static void writeLine( void * stream, const sal_Char * pLine, const sal_Char * pFilter ) throw () static void writeLine( void * stream, const sal_Char * pLine, const sal_Char * pFilter )
SAL_THROW( () )
{ {
if (pFilter && *pFilter) if (pFilter && *pFilter)
{ {
@@ -613,7 +628,8 @@ static void writeLine( void * stream, const sal_Char * pLine, const sal_Char * p
} }
} }
//================================================================================================== //==================================================================================================
static void writeLine( void * stream, const OUString & rLine, const sal_Char * pFilter ) throw () static void writeLine( void * stream, const OUString & rLine, const sal_Char * pFilter )
SAL_THROW( () )
{ {
OString aLine( OUStringToOString( rLine, RTL_TEXTENCODING_ASCII_US ) ); OString aLine( OUStringToOString( rLine, RTL_TEXTENCODING_ASCII_US ) );
writeLine( stream, aLine.getStr(), pFilter ); writeLine( stream, aLine.getStr(), pFilter );
@@ -621,7 +637,8 @@ static void writeLine( void * stream, const OUString & rLine, const sal_Char * p
//################################################################################################## //##################################################################################################
extern "C" SAL_DLLEXPORT void SAL_CALL uno_dumpEnvironment( extern "C" SAL_DLLEXPORT void SAL_CALL uno_dumpEnvironment(
void * stream, uno_Environment * pEnv, const sal_Char * pFilter ) throw () void * stream, uno_Environment * pEnv, const sal_Char * pFilter )
SAL_THROW( () )
{ {
OSL_ENSHURE( pEnv, "### null ptr!" ); OSL_ENSHURE( pEnv, "### null ptr!" );
OUStringBuffer buf; OUStringBuffer buf;
@@ -682,7 +699,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL uno_dumpEnvironment(
} }
//################################################################################################## //##################################################################################################
extern "C" SAL_DLLEXPORT void SAL_CALL uno_dumpEnvironmentByName( extern "C" SAL_DLLEXPORT void SAL_CALL uno_dumpEnvironmentByName(
void * stream, rtl_uString * pEnvTypeName, const sal_Char * pFilter ) throw () void * stream, rtl_uString * pEnvTypeName, const sal_Char * pFilter )
SAL_THROW( () )
{ {
uno_Environment * pEnv = 0; uno_Environment * pEnv = 0;
uno_getEnvironment( &pEnv, pEnvTypeName, 0 ); uno_getEnvironment( &pEnv, pEnvTypeName, 0 );
@@ -702,7 +720,8 @@ extern "C" SAL_DLLEXPORT void SAL_CALL uno_dumpEnvironmentByName(
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline static const OUString & unoenv_getStaticOIdPart() throw () inline static const OUString & unoenv_getStaticOIdPart()
SAL_THROW( () )
{ {
static OUString * s_pStaticOidPart = 0; static OUString * s_pStaticOidPart = 0;
if (! s_pStaticOidPart) if (! s_pStaticOidPart)
@@ -736,7 +755,8 @@ extern "C"
{ {
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
static void SAL_CALL unoenv_computeObjectIdentifier( static void SAL_CALL unoenv_computeObjectIdentifier(
uno_ExtEnvironment * pEnv, rtl_uString ** ppOId, void * pInterface ) throw () uno_ExtEnvironment * pEnv, rtl_uString ** ppOId, void * pInterface )
SAL_THROW( () )
{ {
OSL_ENSHURE( pEnv && ppOId && pInterface, "### null ptr!" ); OSL_ENSHURE( pEnv && ppOId && pInterface, "### null ptr!" );
if (*ppOId) if (*ppOId)
@@ -787,19 +807,21 @@ static void SAL_CALL unoenv_computeObjectIdentifier(
typelib_typedescription_release( pMTqueryInterface ); typelib_typedescription_release( pMTqueryInterface );
} }
//================================================================================================== //==================================================================================================
static void SAL_CALL unoenv_acquireInterface( uno_ExtEnvironment *, void * pUnoI ) throw () static void SAL_CALL unoenv_acquireInterface( uno_ExtEnvironment *, void * pUnoI )
SAL_THROW( () )
{ {
(*((uno_Interface *)pUnoI)->acquire)( (uno_Interface *)pUnoI ); (*((uno_Interface *)pUnoI)->acquire)( (uno_Interface *)pUnoI );
} }
//================================================================================================== //==================================================================================================
static void SAL_CALL unoenv_releaseInterface( uno_ExtEnvironment *, void * pUnoI ) throw () static void SAL_CALL unoenv_releaseInterface( uno_ExtEnvironment *, void * pUnoI )
SAL_THROW( () )
{ {
(*((uno_Interface *)pUnoI)->release)( (uno_Interface *)pUnoI ); (*((uno_Interface *)pUnoI)->release)( (uno_Interface *)pUnoI );
} }
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
EnvironmentsData::~EnvironmentsData() throw () EnvironmentsData::~EnvironmentsData() SAL_THROW( () )
{ {
MutexGuard aGuard( aMutex ); MutexGuard aGuard( aMutex );
@@ -826,7 +848,8 @@ EnvironmentsData::~EnvironmentsData() throw ()
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline uno_Environment * EnvironmentsData::getEnvironment( inline uno_Environment * EnvironmentsData::getEnvironment(
const OUString & rEnvTypeName, void * pContext ) throw () const OUString & rEnvTypeName, void * pContext )
SAL_THROW( () )
{ {
uno_Environment * pEnv = 0; uno_Environment * pEnv = 0;
@@ -845,7 +868,8 @@ inline uno_Environment * EnvironmentsData::getEnvironment(
return pEnv; return pEnv;
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool EnvironmentsData::registerEnvironment( uno_Environment * pEnv ) throw () inline sal_Bool EnvironmentsData::registerEnvironment( uno_Environment * pEnv )
SAL_THROW( () )
{ {
OSL_ENSHURE( pEnv, "### null ptr!" ); OSL_ENSHURE( pEnv, "### null ptr!" );
OUString aKey( OUString::valueOf( (sal_Int64)pEnv->pContext ) ); OUString aKey( OUString::valueOf( (sal_Int64)pEnv->pContext ) );
@@ -863,7 +887,8 @@ inline sal_Bool EnvironmentsData::registerEnvironment( uno_Environment * pEnv )
return sal_False; return sal_False;
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline sal_Bool EnvironmentsData::revokeEnvironment( uno_Environment * pEnv ) throw () inline sal_Bool EnvironmentsData::revokeEnvironment( uno_Environment * pEnv )
SAL_THROW( () )
{ {
OSL_ENSHURE( pEnv, "### null ptr!" ); OSL_ENSHURE( pEnv, "### null ptr!" );
OUString aKey( OUString::valueOf( (sal_Int64)pEnv->pContext ) ); OUString aKey( OUString::valueOf( (sal_Int64)pEnv->pContext ) );
@@ -877,7 +902,8 @@ inline sal_Bool EnvironmentsData::revokeEnvironment( uno_Environment * pEnv ) th
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
inline void EnvironmentsData::getRegisteredEnvironments( inline void EnvironmentsData::getRegisteredEnvironments(
uno_Environment *** pppEnvs, sal_Int32 * pnLen, uno_memAlloc memAlloc, uno_Environment *** pppEnvs, sal_Int32 * pnLen, uno_memAlloc memAlloc,
const OUString & rEnvTypeName ) throw () const OUString & rEnvTypeName )
SAL_THROW( () )
{ {
OSL_ENSHURE( pppEnvs && pnLen && memAlloc, "### null ptr!" ); OSL_ENSHURE( pppEnvs && pnLen && memAlloc, "### null ptr!" );
@@ -920,7 +946,8 @@ extern "C"
{ {
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
static uno_Environment * initDefaultEnvironment( static uno_Environment * initDefaultEnvironment(
const OUString & rEnvTypeName, void * pContext ) throw () const OUString & rEnvTypeName, void * pContext )
SAL_THROW( () )
{ {
uno_Environment * pEnv = 0; uno_Environment * pEnv = 0;
@@ -975,16 +1002,20 @@ static uno_Environment * initDefaultEnvironment(
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
static void SAL_CALL anonymous_defenv_release( uno_Environment * pEnv ) throw () static void SAL_CALL anonymous_defenv_release( uno_Environment * pEnv )
SAL_THROW( () )
{ {
if (! ::osl_decrementInterlockedCount( &((uno_DefaultEnvironment *)pEnv)->nRef )) if (! ::osl_decrementInterlockedCount( &((uno_DefaultEnvironment *)pEnv)->nRef ))
{
delete (uno_DefaultEnvironment *)pEnv; delete (uno_DefaultEnvironment *)pEnv;
} }
} }
//################################################################################################## //##################################################################################################
extern "C" SAL_DLLEXPORT void SAL_CALL uno_createEnvironment( SAL_DLLEXPORT void SAL_CALL uno_createEnvironment(
uno_Environment ** ppEnv, rtl_uString * pEnvTypeName, void * pContext ) throw () uno_Environment ** ppEnv, rtl_uString * pEnvTypeName, void * pContext )
SAL_THROW_EXTERN_C()
{ {
OSL_ENSHURE( ppEnv, "### null ptr!" ); OSL_ENSHURE( ppEnv, "### null ptr!" );
if (*ppEnv) if (*ppEnv)
@@ -996,8 +1027,9 @@ extern "C" SAL_DLLEXPORT void SAL_CALL uno_createEnvironment(
} }
//################################################################################################## //##################################################################################################
extern "C" SAL_DLLEXPORT void SAL_CALL uno_getEnvironment( SAL_DLLEXPORT void SAL_CALL uno_getEnvironment(
uno_Environment ** ppEnv, rtl_uString * pEnvTypeName, void * pContext ) throw () uno_Environment ** ppEnv, rtl_uString * pEnvTypeName, void * pContext )
SAL_THROW_EXTERN_C()
{ {
OSL_ENSHURE( ppEnv, "### null ptr!" ); OSL_ENSHURE( ppEnv, "### null ptr!" );
if (*ppEnv) if (*ppEnv)
@@ -1016,13 +1048,15 @@ extern "C" SAL_DLLEXPORT void SAL_CALL uno_getEnvironment(
} }
//################################################################################################## //##################################################################################################
extern "C" SAL_DLLEXPORT void SAL_CALL uno_getRegisteredEnvironments( SAL_DLLEXPORT void SAL_CALL uno_getRegisteredEnvironments(
uno_Environment *** pppEnvs, sal_Int32 * pnLen, uno_memAlloc memAlloc, uno_Environment *** pppEnvs, sal_Int32 * pnLen, uno_memAlloc memAlloc,
rtl_uString * pEnvTypeName ) throw () rtl_uString * pEnvTypeName )
SAL_THROW_EXTERN_C()
{ {
getEnvironmentsData().getRegisteredEnvironments( getEnvironmentsData().getRegisteredEnvironments(
pppEnvs, pnLen, memAlloc, pppEnvs, pnLen, memAlloc,
(pEnvTypeName ? OUString( pEnvTypeName ) : OUString()) ); (pEnvTypeName ? OUString( pEnvTypeName ) : OUString()) );
} }
} // extern "C"
} }

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: lbmap.cxx,v $ * $RCSfile: lbmap.cxx,v $
* *
* $Revision: 1.11 $ * $Revision: 1.12 $
* *
* last change: $Author: dbo $ $Date: 2001-02-20 10:16:11 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:57 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -124,7 +124,8 @@ struct MappingEntry
MappingEntry( MappingEntry(
uno_Mapping * pMapping_, uno_freeMappingFunc freeMapping_, uno_Mapping * pMapping_, uno_freeMappingFunc freeMapping_,
const OUString & rMappingName_ ) throw () const OUString & rMappingName_ )
SAL_THROW( () )
: nRef( 1 ) : nRef( 1 )
, pMapping( pMapping_ ) , pMapping( pMapping_ )
, freeMapping( freeMapping_ ) , freeMapping( freeMapping_ )
@@ -134,13 +135,13 @@ struct MappingEntry
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
struct FctOUStringHash : public unary_function< const OUString &, size_t > struct FctOUStringHash : public unary_function< const OUString &, size_t >
{ {
size_t operator()( const OUString & rKey ) const throw () size_t operator()( const OUString & rKey ) const SAL_THROW( () )
{ return (size_t)rKey.hashCode(); } { return (size_t)rKey.hashCode(); }
}; };
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
struct FctPtrHash : public unary_function< uno_Mapping *, size_t > struct FctPtrHash : public unary_function< uno_Mapping *, size_t >
{ {
size_t operator()( uno_Mapping * pKey ) const throw () size_t operator()( uno_Mapping * pKey ) const SAL_THROW( () )
{ return (size_t)pKey; } { return (size_t)pKey; }
}; };
@@ -162,10 +163,10 @@ struct MappingsData
Mutex aNegativeLibsMutex; Mutex aNegativeLibsMutex;
t_OUStringSet aNegativeLibs; t_OUStringSet aNegativeLibs;
~MappingsData() throw (); ~MappingsData() SAL_THROW( () );
}; };
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
MappingsData::~MappingsData() throw () MappingsData::~MappingsData() SAL_THROW( () )
{ {
#ifdef CPPU_ASSERTIONS #ifdef CPPU_ASSERTIONS
OSL_ENSHURE( aName2Entry.empty() && aMapping2Entry.empty(), "### unrevoked mappings!" ); OSL_ENSHURE( aName2Entry.empty() && aMapping2Entry.empty(), "### unrevoked mappings!" );
@@ -189,7 +190,7 @@ MappingsData::~MappingsData() throw ()
#endif #endif
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
static MappingsData & getMappingsData() throw () static MappingsData & getMappingsData() SAL_THROW( () )
{ {
static MappingsData * s_p = 0; static MappingsData * s_p = 0;
if (! s_p) if (! s_p)
@@ -224,17 +225,19 @@ struct uno_Mediate_Mapping : public uno_Mapping
const Environment & rFrom_, const Environment & rTo_, const Environment & rFrom_, const Environment & rTo_,
const Mapping & rFrom2Uno_, const Mapping & rUno2To_, const Mapping & rFrom2Uno_, const Mapping & rUno2To_,
const OUString & rAddPurpose ) const OUString & rAddPurpose )
throw (); SAL_THROW( () );
}; };
extern "C" extern "C"
{ {
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
static void SAL_CALL mediate_free( uno_Mapping * pMapping ) throw () static void SAL_CALL mediate_free( uno_Mapping * pMapping )
SAL_THROW( () )
{ {
delete static_cast< uno_Mediate_Mapping * >( pMapping ); delete static_cast< uno_Mediate_Mapping * >( pMapping );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
static void SAL_CALL mediate_acquire( uno_Mapping * pMapping ) throw () static void SAL_CALL mediate_acquire( uno_Mapping * pMapping )
SAL_THROW( () )
{ {
if (1 == ::osl_incrementInterlockedCount( if (1 == ::osl_incrementInterlockedCount(
& static_cast< uno_Mediate_Mapping * >( pMapping )->nRef )) & static_cast< uno_Mediate_Mapping * >( pMapping )->nRef ))
@@ -247,7 +250,8 @@ static void SAL_CALL mediate_acquire( uno_Mapping * pMapping ) throw ()
} }
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
static void SAL_CALL mediate_release( uno_Mapping * pMapping ) throw () static void SAL_CALL mediate_release( uno_Mapping * pMapping )
SAL_THROW( () )
{ {
if (! ::osl_decrementInterlockedCount( if (! ::osl_decrementInterlockedCount(
& static_cast< uno_Mediate_Mapping * >( pMapping )->nRef )) & static_cast< uno_Mediate_Mapping * >( pMapping )->nRef ))
@@ -260,7 +264,7 @@ static void SAL_CALL mediate_mapInterface(
uno_Mapping * pMapping, uno_Mapping * pMapping,
void ** ppOut, void * pInterface, void ** ppOut, void * pInterface,
typelib_InterfaceTypeDescription * pInterfaceTypeDescr ) typelib_InterfaceTypeDescription * pInterfaceTypeDescr )
throw () SAL_THROW( () )
{ {
OSL_ENSHURE( pMapping && ppOut, "### null ptr!" ); OSL_ENSHURE( pMapping && ppOut, "### null ptr!" );
if (pMapping && ppOut) if (pMapping && ppOut)
@@ -283,7 +287,8 @@ static void SAL_CALL mediate_mapInterface(
uno_Mediate_Mapping::uno_Mediate_Mapping( uno_Mediate_Mapping::uno_Mediate_Mapping(
const Environment & rFrom_, const Environment & rTo_, const Environment & rFrom_, const Environment & rTo_,
const Mapping & rFrom2Uno_, const Mapping & rUno2To_, const Mapping & rFrom2Uno_, const Mapping & rUno2To_,
const OUString & rAddPurpose_ ) throw () const OUString & rAddPurpose_ )
SAL_THROW( () )
: nRef( 1 ) : nRef( 1 )
, aFrom( rFrom_ ) , aFrom( rFrom_ )
, aTo( rTo_ ) , aTo( rTo_ )
@@ -299,7 +304,7 @@ uno_Mediate_Mapping::uno_Mediate_Mapping(
//================================================================================================== //==================================================================================================
static inline OUString getMappingName( static inline OUString getMappingName(
const Environment & rFrom, const Environment & rTo, const OUString & rAddPurpose ) const Environment & rFrom, const Environment & rTo, const OUString & rAddPurpose )
throw () SAL_THROW( () )
{ {
OUStringBuffer aKey( 64 ); OUStringBuffer aKey( 64 );
aKey.append( rAddPurpose ); aKey.append( rAddPurpose );
@@ -317,7 +322,7 @@ static inline OUString getMappingName(
//================================================================================================== //==================================================================================================
static inline OUString getBridgeName( static inline OUString getBridgeName(
const Environment & rFrom, const Environment & rTo, const OUString & rAddPurpose ) const Environment & rFrom, const Environment & rTo, const OUString & rAddPurpose )
throw () SAL_THROW( () )
{ {
OUStringBuffer aBridgeName( 16 ); OUStringBuffer aBridgeName( 16 );
if (rAddPurpose.getLength()) if (rAddPurpose.getLength())
@@ -331,14 +336,16 @@ static inline OUString getBridgeName(
return aBridgeName.makeStringAndClear(); return aBridgeName.makeStringAndClear();
} }
//================================================================================================== //==================================================================================================
static inline void setNegativeBridge( const OUString & rBridgeName ) throw () static inline void setNegativeBridge( const OUString & rBridgeName )
SAL_THROW( () )
{ {
MappingsData & rData = getMappingsData(); MappingsData & rData = getMappingsData();
MutexGuard aGuard( rData.aNegativeLibsMutex ); MutexGuard aGuard( rData.aNegativeLibsMutex );
rData.aNegativeLibs.insert( rBridgeName ); rData.aNegativeLibs.insert( rBridgeName );
} }
//================================================================================================== //==================================================================================================
static inline oslModule loadModule( const OUString & rBridgeName ) throw () static inline oslModule loadModule( const OUString & rBridgeName )
SAL_THROW( () )
{ {
sal_Bool bNeg; sal_Bool bNeg;
{ {
@@ -380,7 +387,7 @@ static inline oslModule loadModule( const OUString & rBridgeName ) throw ()
//================================================================================================== //==================================================================================================
static Mapping loadExternalMapping( static Mapping loadExternalMapping(
const Environment & rFrom, const Environment & rTo, const OUString & rAddPurpose ) const Environment & rFrom, const Environment & rTo, const OUString & rAddPurpose )
throw () SAL_THROW( () )
{ {
OSL_ASSERT( rFrom.is() && rTo.is() ); OSL_ASSERT( rFrom.is() && rTo.is() );
if (rFrom.is() && rTo.is()) if (rFrom.is() && rTo.is())
@@ -420,7 +427,7 @@ static Mapping loadExternalMapping(
//================================================================================================== //==================================================================================================
static Mapping getDirectMapping( static Mapping getDirectMapping(
const Environment & rFrom, const Environment & rTo, const OUString & rAddPurpose = OUString() ) const Environment & rFrom, const Environment & rTo, const OUString & rAddPurpose = OUString() )
throw () SAL_THROW( () )
{ {
OSL_ASSERT( rFrom.is() && rTo.is() ); OSL_ASSERT( rFrom.is() && rTo.is() );
if (rFrom.is() && rTo.is()) if (rFrom.is() && rTo.is())
@@ -450,7 +457,7 @@ static inline Mapping createMediateMapping(
const Environment & rFrom, const Environment & rTo, const Environment & rFrom, const Environment & rTo,
const Mapping & rFrom2Uno, const Mapping & rUno2To, const Mapping & rFrom2Uno, const Mapping & rUno2To,
const OUString & rAddPurpose ) const OUString & rAddPurpose )
throw () SAL_THROW( () )
{ {
uno_Mapping * pRet = new uno_Mediate_Mapping( uno_Mapping * pRet = new uno_Mediate_Mapping(
rFrom, rTo, rFrom2Uno, rUno2To, rAddPurpose ); // ref count initially 1 rFrom, rTo, rFrom2Uno, rUno2To, rAddPurpose ); // ref count initially 1
@@ -463,7 +470,7 @@ static inline Mapping createMediateMapping(
//================================================================================================== //==================================================================================================
static Mapping getMediateMapping( static Mapping getMediateMapping(
const Environment & rFrom, const Environment & rTo, const OUString & rAddPurpose ) const Environment & rFrom, const Environment & rTo, const OUString & rAddPurpose )
throw () SAL_THROW( () )
{ {
Environment aUno; Environment aUno;
Mapping aUno2To; Mapping aUno2To;
@@ -520,11 +527,13 @@ static Mapping getMediateMapping(
return Mapping(); return Mapping();
} }
extern "C"
{
//################################################################################################## //##################################################################################################
extern "C" SAL_DLLEXPORT void SAL_CALL uno_getMapping( SAL_DLLEXPORT void SAL_CALL uno_getMapping(
uno_Mapping ** ppMapping, uno_Environment * pFrom, uno_Environment * pTo, uno_Mapping ** ppMapping, uno_Environment * pFrom, uno_Environment * pTo,
rtl_uString * pAddPurpose ) rtl_uString * pAddPurpose )
throw () SAL_THROW_EXTERN_C()
{ {
OSL_ENSHURE( ppMapping && pFrom && pTo, "### null ptr!" ); OSL_ENSHURE( ppMapping && pFrom && pTo, "### null ptr!" );
if (*ppMapping) if (*ppMapping)
@@ -577,10 +586,10 @@ extern "C" SAL_DLLEXPORT void SAL_CALL uno_getMapping(
} }
} }
//################################################################################################## //##################################################################################################
extern "C" SAL_DLLEXPORT void SAL_CALL uno_getMappingByName( SAL_DLLEXPORT void SAL_CALL uno_getMappingByName(
uno_Mapping ** ppMapping, rtl_uString * pFrom, rtl_uString * pTo, uno_Mapping ** ppMapping, rtl_uString * pFrom, rtl_uString * pTo,
rtl_uString * pAddPurpose ) rtl_uString * pAddPurpose )
throw () SAL_THROW_EXTERN_C()
{ {
OSL_ENSHURE( ppMapping && pFrom && pTo, "### null ptr!" ); OSL_ENSHURE( ppMapping && pFrom && pTo, "### null ptr!" );
if (*ppMapping) if (*ppMapping)
@@ -607,10 +616,10 @@ extern "C" SAL_DLLEXPORT void SAL_CALL uno_getMappingByName(
} }
//################################################################################################## //##################################################################################################
extern "C" SAL_DLLEXPORT void SAL_CALL uno_registerMapping( SAL_DLLEXPORT void SAL_CALL uno_registerMapping(
uno_Mapping ** ppMapping, uno_freeMappingFunc freeMapping, uno_Mapping ** ppMapping, uno_freeMappingFunc freeMapping,
uno_Environment * pFrom, uno_Environment * pTo, rtl_uString * pAddPurpose ) uno_Environment * pFrom, uno_Environment * pTo, rtl_uString * pAddPurpose )
throw () SAL_THROW_EXTERN_C()
{ {
MappingsData & rData = getMappingsData(); MappingsData & rData = getMappingsData();
ClearableMutexGuard aGuard( rData.aMappingsMutex ); ClearableMutexGuard aGuard( rData.aMappingsMutex );
@@ -647,9 +656,9 @@ extern "C" SAL_DLLEXPORT void SAL_CALL uno_registerMapping(
} }
} }
//################################################################################################## //##################################################################################################
extern "C" SAL_DLLEXPORT void SAL_CALL uno_revokeMapping( SAL_DLLEXPORT void SAL_CALL uno_revokeMapping(
uno_Mapping * pMapping ) uno_Mapping * pMapping )
throw () SAL_THROW_EXTERN_C()
{ {
MappingsData & rData = getMappingsData(); MappingsData & rData = getMappingsData();
ClearableMutexGuard aGuard( rData.aMappingsMutex ); ClearableMutexGuard aGuard( rData.aMappingsMutex );
@@ -674,9 +683,9 @@ extern "C" SAL_DLLEXPORT void SAL_CALL uno_revokeMapping(
} }
//################################################################################################## //##################################################################################################
extern "C" SAL_DLLEXPORT void SAL_CALL uno_registerMappingCallback( SAL_DLLEXPORT void SAL_CALL uno_registerMappingCallback(
uno_getMappingFunc pCallback ) uno_getMappingFunc pCallback )
throw () SAL_THROW_EXTERN_C()
{ {
OSL_ENSHURE( pCallback, "### null ptr!" ); OSL_ENSHURE( pCallback, "### null ptr!" );
MappingsData & rData = getMappingsData(); MappingsData & rData = getMappingsData();
@@ -684,14 +693,15 @@ extern "C" SAL_DLLEXPORT void SAL_CALL uno_registerMappingCallback(
rData.aCallbacks.insert( pCallback ); rData.aCallbacks.insert( pCallback );
} }
//################################################################################################## //##################################################################################################
extern "C" SAL_DLLEXPORT void SAL_CALL uno_revokeMappingCallback( SAL_DLLEXPORT void SAL_CALL uno_revokeMappingCallback(
uno_getMappingFunc pCallback ) uno_getMappingFunc pCallback )
throw () SAL_THROW_EXTERN_C()
{ {
OSL_ENSHURE( pCallback, "### null ptr!" ); OSL_ENSHURE( pCallback, "### null ptr!" );
MappingsData & rData = getMappingsData(); MappingsData & rData = getMappingsData();
MutexGuard aGuard( rData.aCallbacksMutex ); MutexGuard aGuard( rData.aCallbacksMutex );
rData.aCallbacks.erase( pCallback ); rData.aCallbacks.erase( pCallback );
} }
} // extern "C"
} }

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: prim.hxx,v $ * $RCSfile: prim.hxx,v $
* *
* $Revision: 1.5 $ * $Revision: 1.6 $
* *
* last change: $Author: obo $ $Date: 2001-03-05 13:19:47 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:57 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -112,7 +112,8 @@ inline void * __map(
void * p, void * p,
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_Mapping * mapping ) throw () uno_Mapping * mapping )
SAL_THROW( () )
{ {
void * pRet = 0; void * pRet = 0;
if (p) if (p)
@@ -131,7 +132,8 @@ inline void * __map(
return pRet; return pRet;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline void __acquire( void * p, uno_AcquireFunc acquire ) throw () inline void __acquire( void * p, uno_AcquireFunc acquire )
SAL_THROW( () )
{ {
if (p) if (p)
{ {
@@ -142,7 +144,8 @@ inline void __acquire( void * p, uno_AcquireFunc acquire ) throw ()
} }
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline void __releaseRef( void ** pRef, uno_ReleaseFunc release ) throw () inline void __releaseRef( void ** pRef, uno_ReleaseFunc release )
SAL_THROW( () )
{ {
if (*pRef) if (*pRef)
{ {
@@ -154,7 +157,7 @@ inline void __releaseRef( void ** pRef, uno_ReleaseFunc release ) throw ()
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline uno_Sequence * __getEmptySequence() throw () inline uno_Sequence * __getEmptySequence() SAL_THROW( () )
{ {
if (! s_pSeq) if (! s_pSeq)
{ {
@@ -170,7 +173,8 @@ inline uno_Sequence * __getEmptySequence() throw ()
return s_pSeq; return s_pSeq;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline typelib_TypeDescriptionReference * __getVoidType() throw () inline typelib_TypeDescriptionReference * __getVoidType()
SAL_THROW( () )
{ {
if (! s_pVoidType) if (! s_pVoidType)
{ {
@@ -200,7 +204,8 @@ inline typelib_TypeDescriptionReference * __getVoidType() throw ()
::osl_incrementInterlockedCount( &(pType)->nRefCount ); ::osl_incrementInterlockedCount( &(pType)->nRefCount );
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline typelib_TypeDescription * __getQueryInterfaceTypeDescr() throw () inline typelib_TypeDescription * __getQueryInterfaceTypeDescr()
SAL_THROW( () )
{ {
if (! s_pQITD) if (! s_pQITD)
{ {
@@ -223,7 +228,8 @@ inline typelib_TypeDescription * __getQueryInterfaceTypeDescr() throw ()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline typelib_TypeDescriptionReference * __unionGetSetType( inline typelib_TypeDescriptionReference * __unionGetSetType(
void * pUnion, typelib_TypeDescription * pTD ) throw () void * pUnion, typelib_TypeDescription * pTD )
SAL_THROW( () )
{ {
typelib_TypeDescriptionReference * pRet; typelib_TypeDescriptionReference * pRet;
@@ -248,7 +254,7 @@ inline typelib_TypeDescriptionReference * __unionGetSetType(
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
inline sal_Bool __type_equals( inline sal_Bool __type_equals(
typelib_TypeDescriptionReference * pType1, typelib_TypeDescriptionReference * pType2 ) typelib_TypeDescriptionReference * pType1, typelib_TypeDescriptionReference * pType2 )
throw () SAL_THROW( () )
{ {
return (pType1 == pType2 || return (pType1 == pType2 ||
(pType1->eTypeClass == pType2->eTypeClass && (pType1->eTypeClass == pType2->eTypeClass &&

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: sequence.cxx,v $ * $RCSfile: sequence.cxx,v $
* *
* $Revision: 1.4 $ * $Revision: 1.5 $
* *
* last change: $Author: dbo $ $Date: 2001-02-05 11:19:44 $ * last change: $Author: dbo $ $Date: 2001-03-09 12:10:57 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -95,7 +95,8 @@ namespace cppu
{ {
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
static inline void allocSeq( static inline void allocSeq(
uno_Sequence ** ppSeq, sal_Int32 nElementSize, sal_Int32 nElements ) throw () uno_Sequence ** ppSeq, sal_Int32 nElementSize, sal_Int32 nElements )
SAL_THROW( () )
{ {
if (nElements >= 0) // (re)alloc memory? if (nElements >= 0) // (re)alloc memory?
{ {
@@ -114,7 +115,7 @@ static inline void __defaultConstructElements(
typelib_TypeDescriptionReference * pElementType, typelib_TypeDescriptionReference * pElementType,
sal_Int32 nStartIndex, sal_Int32 nStopIndex, sal_Int32 nStartIndex, sal_Int32 nStopIndex,
sal_Int32 nAlloc = -1 ) // >= 0 means (re)alloc memory for nAlloc elements sal_Int32 nAlloc = -1 ) // >= 0 means (re)alloc memory for nAlloc elements
throw () SAL_THROW( () )
{ {
switch (pElementType->eTypeClass) switch (pElementType->eTypeClass)
{ {
@@ -307,7 +308,7 @@ static inline void __copyConstructElements(
sal_Int32 nStartIndex, sal_Int32 nStopIndex, sal_Int32 nStartIndex, sal_Int32 nStopIndex,
uno_AcquireFunc acquire, uno_AcquireFunc acquire,
sal_Int32 nAlloc = -1 ) // >= 0 means (re)alloc memory for nAlloc elements sal_Int32 nAlloc = -1 ) // >= 0 means (re)alloc memory for nAlloc elements
throw () SAL_THROW( () )
{ {
switch (pElementType->eTypeClass) switch (pElementType->eTypeClass)
{ {
@@ -525,7 +526,7 @@ static inline void __reallocSequence(
typelib_TypeDescriptionReference * pElementType, typelib_TypeDescriptionReference * pElementType,
sal_Int32 nSize, sal_Int32 nSize,
uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_AcquireFunc acquire, uno_ReleaseFunc release )
throw () SAL_THROW( () )
{ {
uno_Sequence * pSource = *ppSequence; uno_Sequence * pSource = *ppSequence;
sal_Int32 nSourceElements = pSource->nElements; sal_Int32 nSourceElements = pSource->nElements;
@@ -595,7 +596,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_sequence_construct(
uno_Sequence ** ppSequence, typelib_TypeDescriptionReference * pType, uno_Sequence ** ppSequence, typelib_TypeDescriptionReference * pType,
void * pElements, sal_Int32 len, void * pElements, sal_Int32 len,
uno_AcquireFunc acquire ) uno_AcquireFunc acquire )
throw () SAL_THROW_EXTERN_C()
{ {
if (len) if (len)
{ {
@@ -637,7 +638,7 @@ SAL_DLLEXPORT void SAL_CALL uno_sequence_construct(
uno_Sequence ** ppSequence, typelib_TypeDescription * pTypeDescr, uno_Sequence ** ppSequence, typelib_TypeDescription * pTypeDescr,
void * pElements, sal_Int32 len, void * pElements, sal_Int32 len,
uno_AcquireFunc acquire ) uno_AcquireFunc acquire )
throw () SAL_THROW_EXTERN_C()
{ {
if (len) if (len)
{ {
@@ -673,7 +674,7 @@ SAL_DLLEXPORT void SAL_CALL uno_sequence_construct(
SAL_DLLEXPORT void SAL_CALL uno_type_sequence_realloc( SAL_DLLEXPORT void SAL_CALL uno_type_sequence_realloc(
uno_Sequence ** ppSequence, typelib_TypeDescriptionReference * pType, sal_Int32 nSize, uno_Sequence ** ppSequence, typelib_TypeDescriptionReference * pType, sal_Int32 nSize,
uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_AcquireFunc acquire, uno_ReleaseFunc release )
throw () SAL_THROW_EXTERN_C()
{ {
OSL_ENSHURE( ppSequence, "### null ptr!" ); OSL_ENSHURE( ppSequence, "### null ptr!" );
OSL_ENSHURE( nSize >= 0, "### new size must be at least 0!" ); OSL_ENSHURE( nSize >= 0, "### new size must be at least 0!" );
@@ -692,7 +693,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_sequence_realloc(
SAL_DLLEXPORT void SAL_CALL uno_sequence_realloc( SAL_DLLEXPORT void SAL_CALL uno_sequence_realloc(
uno_Sequence ** ppSequence, typelib_TypeDescription * pTypeDescr, sal_Int32 nSize, uno_Sequence ** ppSequence, typelib_TypeDescription * pTypeDescr, sal_Int32 nSize,
uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_AcquireFunc acquire, uno_ReleaseFunc release )
throw () SAL_THROW_EXTERN_C()
{ {
OSL_ENSHURE( ppSequence, "### null ptr!" ); OSL_ENSHURE( ppSequence, "### null ptr!" );
OSL_ENSHURE( nSize >= 0, "### new size must be at least 0!" ); OSL_ENSHURE( nSize >= 0, "### new size must be at least 0!" );
@@ -709,7 +710,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_sequence_reference2One(
uno_Sequence ** ppSequence, uno_Sequence ** ppSequence,
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_AcquireFunc acquire, uno_ReleaseFunc release )
throw () SAL_THROW_EXTERN_C()
{ {
OSL_ENSHURE( ppSequence, "### null ptr!" ); OSL_ENSHURE( ppSequence, "### null ptr!" );
uno_Sequence * pSequence = *ppSequence; uno_Sequence * pSequence = *ppSequence;
@@ -748,7 +749,7 @@ SAL_DLLEXPORT void SAL_CALL uno_sequence_reference2One(
uno_Sequence ** ppSequence, uno_Sequence ** ppSequence,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_AcquireFunc acquire, uno_ReleaseFunc release )
throw () SAL_THROW_EXTERN_C()
{ {
OSL_ENSHURE( ppSequence, "### null ptr!" ); OSL_ENSHURE( ppSequence, "### null ptr!" );
uno_Sequence * pSequence = *ppSequence; uno_Sequence * pSequence = *ppSequence;
@@ -783,7 +784,7 @@ SAL_DLLEXPORT void SAL_CALL uno_sequence_assign(
uno_Sequence * pSource, uno_Sequence * pSource,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pTypeDescr,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
throw () SAL_THROW_EXTERN_C()
{ {
if (*ppDest != pSource) if (*ppDest != pSource)
{ {
@@ -798,7 +799,7 @@ SAL_DLLEXPORT void SAL_CALL uno_type_sequence_assign(
uno_Sequence * pSource, uno_Sequence * pSource,
typelib_TypeDescriptionReference * pType, typelib_TypeDescriptionReference * pType,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
throw () SAL_THROW_EXTERN_C()
{ {
if (*ppDest != pSource) if (*ppDest != pSource)
{ {