summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorDaniel Boelzle <dbo@openoffice.org>2001-09-06 09:25:04 +0000
committerDaniel Boelzle <dbo@openoffice.org>2001-09-06 09:25:04 +0000
commit3126194e5856d56358c42723662d79386be953f8 (patch)
treeea44507f68b0ca97fbab1e755127167033e50d65 /cppu
parenta06c1a06ddbb7d17977f4454a94f6738f90da056 (diff)
#91945# putting cpp_ functions into namespace (non-extern-C)
Diffstat (limited to 'cppu')
-rw-r--r--cppu/inc/com/sun/star/uno/Any.hxx50
-rw-r--r--cppu/inc/com/sun/star/uno/Sequence.hxx29
-rw-r--r--cppu/inc/com/sun/star/uno/genfunc.h13
-rw-r--r--cppu/inc/com/sun/star/uno/genfunc.hxx7
4 files changed, 55 insertions, 44 deletions
diff --git a/cppu/inc/com/sun/star/uno/Any.hxx b/cppu/inc/com/sun/star/uno/Any.hxx
index 84a9b48cb150..7fa656182d48 100644
--- a/cppu/inc/com/sun/star/uno/Any.hxx
+++ b/cppu/inc/com/sun/star/uno/Any.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Any.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: dbo $ $Date: 2001-08-02 15:13:46 $
+ * last change: $Author: dbo $ $Date: 2001-09-06 10:25:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -94,36 +94,37 @@ namespace uno
//__________________________________________________________________________________________________
inline Any::Any() SAL_THROW( () )
{
- ::uno_any_construct( this, 0, 0, cpp_acquire );
+ ::uno_any_construct( this, 0, 0, (uno_AcquireFunc)cpp_acquire );
}
//__________________________________________________________________________________________________
inline Any::Any( const Any & rAny ) SAL_THROW( () )
{
- ::uno_type_any_construct( this, rAny.pData, rAny.pType, cpp_acquire );
+ ::uno_type_any_construct( this, rAny.pData, rAny.pType, (uno_AcquireFunc)cpp_acquire );
}
//__________________________________________________________________________________________________
inline Any::Any( const void * pData_, const Type & rType ) SAL_THROW( () )
{
::uno_type_any_construct(
- this, const_cast< void * >( pData_ ), rType.getTypeLibType(), cpp_acquire );
+ this, const_cast< void * >( pData_ ), rType.getTypeLibType(),
+ (uno_AcquireFunc)cpp_acquire );
}
//__________________________________________________________________________________________________
inline Any::Any( const void * pData_, typelib_TypeDescription * pTypeDescr ) SAL_THROW( () )
{
::uno_any_construct(
- this, const_cast< void * >( pData_ ), pTypeDescr, cpp_acquire );
+ this, const_cast< void * >( pData_ ), pTypeDescr, (uno_AcquireFunc)cpp_acquire );
}
//__________________________________________________________________________________________________
inline Any::Any( const void * pData_, typelib_TypeDescriptionReference * pType ) SAL_THROW( () )
{
::uno_type_any_construct(
- this, const_cast< void * >( pData_ ), pType, cpp_acquire );
+ this, const_cast< void * >( pData_ ), pType, (uno_AcquireFunc)cpp_acquire );
}
//__________________________________________________________________________________________________
inline Any::~Any() SAL_THROW( () )
{
::uno_any_destruct(
- this, cpp_release );
+ this, (uno_ReleaseFunc)cpp_release );
}
//__________________________________________________________________________________________________
inline Any & Any::operator = ( const Any & rAny ) SAL_THROW( () )
@@ -131,7 +132,8 @@ inline Any & Any::operator = ( const Any & rAny ) SAL_THROW( () )
if (this != &rAny)
{
::uno_type_any_assign(
- this, rAny.pData, rAny.pType, cpp_acquire, cpp_release );
+ this, rAny.pData, rAny.pType,
+ (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release );
}
return *this;
}
@@ -144,37 +146,42 @@ inline ::rtl::OUString Any::getValueTypeName() const SAL_THROW( () )
inline void Any::setValue( const void * pData_, const Type & rType ) SAL_THROW( () )
{
::uno_type_any_assign(
- this, const_cast< void * >( pData_ ), rType.getTypeLibType(), cpp_acquire, cpp_release );
+ this, const_cast< void * >( pData_ ), rType.getTypeLibType(),
+ (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release );
}
//__________________________________________________________________________________________________
inline void Any::setValue( const void * pData_, typelib_TypeDescriptionReference * pType ) SAL_THROW( () )
{
::uno_type_any_assign(
- this, const_cast< void * >( pData_ ), pType, cpp_acquire, cpp_release );
+ this, const_cast< void * >( pData_ ), pType,
+ (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release );
}
//__________________________________________________________________________________________________
inline void Any::setValue( const void * pData_, typelib_TypeDescription * pTypeDescr ) SAL_THROW( () )
{
::uno_any_assign(
- this, const_cast< void * >( pData_ ), pTypeDescr, cpp_acquire, cpp_release );
+ this, const_cast< void * >( pData_ ), pTypeDescr,
+ (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release );
}
//__________________________________________________________________________________________________
inline void Any::clear() SAL_THROW( () )
{
- ::uno_any_assign(
- this, 0, 0, cpp_acquire, cpp_release );
+ ::uno_any_clear(
+ this, (uno_ReleaseFunc)cpp_release );
}
//__________________________________________________________________________________________________
inline sal_Bool Any::operator == ( const Any & rAny ) const SAL_THROW( () )
{
return ::uno_type_equalData(
- pData, pType, rAny.pData, rAny.pType, cpp_queryInterface, cpp_release );
+ pData, pType, rAny.pData, rAny.pType,
+ (uno_QueryInterfaceFunc)cpp_queryInterface, (uno_ReleaseFunc)cpp_release );
}
//__________________________________________________________________________________________________
inline sal_Bool Any::operator != ( const Any & rAny ) const SAL_THROW( () )
{
return (! ::uno_type_equalData(
- pData, pType, rAny.pData, rAny.pType, cpp_queryInterface, cpp_release ));
+ pData, pType, rAny.pData, rAny.pType,
+ (uno_QueryInterfaceFunc)cpp_queryInterface, (uno_ReleaseFunc)cpp_release ));
}
//__________________________________________________________________________________________________
@@ -190,7 +197,8 @@ inline void SAL_CALL operator <<= ( Any & rAny, const C & value ) SAL_THROW( ()
{
const Type & rType = ::getCppuType( &value );
::uno_type_any_assign(
- &rAny, const_cast< C * >( &value ), rType.getTypeLibType(), cpp_acquire, cpp_release );
+ &rAny, const_cast< C * >( &value ), rType.getTypeLibType(),
+ (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release );
}
//__________________________________________________________________________________________________
template< class C >
@@ -200,7 +208,8 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, C & value ) SAL_THROW(
return ::uno_type_assignData(
&value, rType.getTypeLibType(),
rAny.pData, rAny.pType,
- cpp_queryInterface, cpp_acquire, cpp_release );
+ (uno_QueryInterfaceFunc)cpp_queryInterface,
+ (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release );
}
// bool
@@ -457,7 +466,8 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Any & value ) SAL_THRO
if (&rAny != &value)
{
::uno_type_any_assign(
- &value, rAny.pData, rAny.pType, cpp_acquire, cpp_release );
+ &value, rAny.pData, rAny.pType,
+ (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release );
}
return sal_True;
}
@@ -481,7 +491,7 @@ inline sal_Bool SAL_CALL operator == ( const Any & rAny, const C & value ) SAL_T
return ::uno_type_equalData(
rAny.pData, rAny.pType,
const_cast< C * >( &value ), rType.getTypeLibType(),
- cpp_queryInterface, cpp_release );
+ (uno_QueryInterfaceFunc)cpp_queryInterface, (uno_ReleaseFunc)cpp_release );
}
// operator to compare to an any. may use specialized operators ==.
//__________________________________________________________________________________________________
diff --git a/cppu/inc/com/sun/star/uno/Sequence.hxx b/cppu/inc/com/sun/star/uno/Sequence.hxx
index 256748be595a..c381ed3dba51 100644
--- a/cppu/inc/com/sun/star/uno/Sequence.hxx
+++ b/cppu/inc/com/sun/star/uno/Sequence.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Sequence.hxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: dbo $ $Date: 2001-05-10 14:40:58 $
+ * last change: $Author: dbo $ $Date: 2001-09-06 10:25:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -102,7 +102,9 @@ template< class E >
inline Sequence< E >::Sequence() SAL_THROW( () )
{
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, (uno_AcquireFunc)cpp_acquire );
}
//__________________________________________________________________________________________________
template< class E >
@@ -123,7 +125,8 @@ 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 );
+ &_pSequence, rType.getTypeLibType(),
+ const_cast< E * >( pElements ), len, (uno_AcquireFunc)cpp_acquire );
}
//__________________________________________________________________________________________________
template< class E >
@@ -131,7 +134,8 @@ inline Sequence< E >::Sequence( sal_Int32 len ) SAL_THROW( () )
{
const Type & rType = ::getCppuType( this );
::uno_type_sequence_construct(
- &_pSequence, rType.getTypeLibType(), 0, len, cpp_acquire );
+ &_pSequence, rType.getTypeLibType(),
+ 0, len, (uno_AcquireFunc)cpp_acquire );
}
//__________________________________________________________________________________________________
template< class E >
@@ -139,7 +143,7 @@ inline Sequence< E >::~Sequence() SAL_THROW( () )
{
const Type & rType = ::getCppuType( this );
::uno_type_destructData(
- this, rType.getTypeLibType(), cpp_release );
+ this, rType.getTypeLibType(), (uno_ReleaseFunc)cpp_release );
}
//__________________________________________________________________________________________________
template< class E >
@@ -147,7 +151,7 @@ inline Sequence< E > & Sequence< E >::operator = ( const Sequence< E > & rSeq )
{
const Type & rType = ::getCppuType( this );
::uno_type_sequence_assign(
- &_pSequence, rSeq._pSequence, rType.getTypeLibType(), cpp_release );
+ &_pSequence, rSeq._pSequence, rType.getTypeLibType(), (uno_ReleaseFunc)cpp_release );
return *this;
}
//__________________________________________________________________________________________________
@@ -160,7 +164,7 @@ inline sal_Bool Sequence< E >::operator == ( const Sequence< E > & rSeq ) const
return ::uno_type_equalData(
const_cast< Sequence< E > * >( this ), rType.getTypeLibType(),
const_cast< Sequence< E > * >( &rSeq ), rType.getTypeLibType(),
- cpp_queryInterface, cpp_release );
+ (uno_QueryInterfaceFunc)cpp_queryInterface, (uno_ReleaseFunc)cpp_release );
}
//__________________________________________________________________________________________________
template< class E >
@@ -174,7 +178,8 @@ inline E * Sequence< E >::getArray() SAL_THROW( () )
{
const Type & rType = ::getCppuType( this );
::uno_type_sequence_reference2One(
- &_pSequence, rType.getTypeLibType(), cpp_acquire, cpp_release );
+ &_pSequence, rType.getTypeLibType(),
+ (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release );
return reinterpret_cast< E * >( _pSequence->elements );
}
//__________________________________________________________________________________________________
@@ -184,7 +189,8 @@ inline E & Sequence< E >::operator [] ( sal_Int32 nIndex ) SAL_THROW( () )
OSL_ENSURE( nIndex >= 0 && nIndex < getLength(), "### illegal index of sequence!" );
const Type & rType = ::getCppuType( this );
::uno_type_sequence_reference2One(
- &_pSequence, rType.getTypeLibType(), cpp_acquire, cpp_release );
+ &_pSequence, rType.getTypeLibType(),
+ (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release );
return reinterpret_cast< E * >( _pSequence->elements )[ nIndex ];
}
//__________________________________________________________________________________________________
@@ -200,7 +206,8 @@ inline void Sequence< E >::realloc( sal_Int32 nSize ) SAL_THROW( () )
{
const Type & rType = ::getCppuType( this );
::uno_type_sequence_realloc(
- &_pSequence, rType.getTypeLibType(), nSize, cpp_acquire, cpp_release );
+ &_pSequence, rType.getTypeLibType(), nSize,
+ (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release );
}
//--------------------------------------------------------------------------------------------------
diff --git a/cppu/inc/com/sun/star/uno/genfunc.h b/cppu/inc/com/sun/star/uno/genfunc.h
index d7c4d8481eed..ded3e6639a7c 100644
--- a/cppu/inc/com/sun/star/uno/genfunc.h
+++ b/cppu/inc/com/sun/star/uno/genfunc.h
@@ -2,9 +2,9 @@
*
* $RCSfile: genfunc.h,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
+ * last change: $Author: dbo $ $Date: 2001-09-06 10:25:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,21 +76,19 @@ namespace star
namespace uno
{
-extern "C"
-{
-/** C function to acquire a C++ interface.
+/** Function to acquire a C++ interface.
@param pCppI C++ interface pointer
*/
inline void SAL_CALL cpp_acquire( void * pCppI )
SAL_THROW( () );
-/** C function to release a C++ interface.
+/** Function to release a C++ interface.
@param pCppI C++ interface pointer
*/
inline void SAL_CALL cpp_release( void * pCppI )
SAL_THROW( () );
-/** C function to query for a C++ interface.
+/** Function to query for a C++ interface.
@param pCppI C++ interface pointer
@param pType demanded interface type
@@ -98,7 +96,6 @@ inline void SAL_CALL cpp_release( void * pCppI )
*/
inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescriptionReference * pType )
SAL_THROW( () );
-}
}
}
diff --git a/cppu/inc/com/sun/star/uno/genfunc.hxx b/cppu/inc/com/sun/star/uno/genfunc.hxx
index 3604629ebe93..3304a83f70a2 100644
--- a/cppu/inc/com/sun/star/uno/genfunc.hxx
+++ b/cppu/inc/com/sun/star/uno/genfunc.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: genfunc.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: dbo $ $Date: 2001-06-29 11:06:53 $
+ * last change: $Author: dbo $ $Date: 2001-09-06 10:25:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -82,8 +82,6 @@ namespace star
namespace uno
{
-extern "C"
-{
//==================================================================================================
inline void SAL_CALL cpp_acquire( void * pCppI )
SAL_THROW( () )
@@ -123,7 +121,6 @@ inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescription
}
return 0;
}
-}
}
}