diff options
author | Patrick Luby <pluby@openoffice.org> | 2000-10-07 17:36:45 +0000 |
---|---|---|
committer | Patrick Luby <pluby@openoffice.org> | 2000-10-07 17:36:45 +0000 |
commit | dc064a8c9237cfbfda1c052f628d1e474e58997a (patch) | |
tree | f437e89cc01ac9d9486fbcd71682cc4e5f97ede6 | |
parent | 7cf653fd66ba2b7bd806fb1fc56fbd50bc88d9d1 (diff) |
Corrected chnages in last revision so that they work on Unix platforms.
-rw-r--r-- | cppuhelper/inc/cppuhelper/interfacecontainer.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/cppuhelper/inc/cppuhelper/interfacecontainer.h b/cppuhelper/inc/cppuhelper/interfacecontainer.h index f3b5ea9b18e5..196221ee232d 100644 --- a/cppuhelper/inc/cppuhelper/interfacecontainer.h +++ b/cppuhelper/inc/cppuhelper/interfacecontainer.h @@ -2,9 +2,9 @@ * * $RCSfile: interfacecontainer.h,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jbu $ $Date: 2000-10-06 16:00:30 $ + * last change: $Author: pluby $ $Date: 2000-10-07 18:36:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -304,7 +304,9 @@ public: */ inline void SAL_CALL clear(); +#ifndef UNX typedef key keyType; +#endif private: ::std::hash_map< key , void* , hashImpl , equalImpl > *m_pMap; ::osl::Mutex & rMutex; @@ -351,9 +353,13 @@ struct OBroadcastHelperVar /** * adds a listener threadsafe. **/ +#ifndef UNX inline void addListener( const container::keyType &key , const ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface > &r ) +#else + inline void addListener( const ::com::sun::star::uno::Type &key , const ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface > &r ) +#endif { - MutexGuard guard( rMutex ); + ::osl::MutexGuard guard( rMutex ); OSL_ENSHURE( !bInDispose, "do not add listeners in the dispose call" ); OSL_ENSHURE( !bDisposed, "object is disposed" ); if( ! bInDispose && ! bDisposed ) @@ -363,9 +369,13 @@ struct OBroadcastHelperVar /** * removes a listener threadsafe **/ +#ifndef UNX inline void removeListener( const container::keyType &key , const ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface > & r ) +#else + inline void removeListener( const ::com::sun::star::uno::Type &key , const ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface > & r ) +#endif { - MutexGuard guard( rMutex ); + ::osl::MutexGuard guard( rMutex ); OSL_ENSHURE( !bDisposed, "object is disposed" ); if( ! bInDispose && ! bDisposed ) aLC.removeInterface( key , r ); @@ -377,7 +387,11 @@ struct OBroadcastHelperVar * was not created, null was returned. This can be used to optimize * performance ( construction of an event object can be avoided ). ***/ +#ifndef UNX inline OInterfaceContainerHelper * SAL_CALL getContainer( const container::keyType &key ) const +#else + inline OInterfaceContainerHelper * SAL_CALL getContainer( const ::com::sun::star::uno::Type &key ) const +#endif { return aLC.getContainer( key ); } |