Tag: cws_src680_oj14 User: fs Date: 2007-06-06 06:01:29+0000 Log: #i78077# allow for disposals, to release all references
File Changes: Directory: /dba/connectivity/inc/connectivity/ ============================================== File [changed]: paramwrapper.hxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/inc/connectivity/paramwrapper.hxx?r1=1.1.2.3&r2=1.1.2.4 Delta lines: +28 -14 --------------------- --- paramwrapper.hxx 2007-06-04 20:29:10+0000 1.1.2.3 +++ paramwrapper.hxx 2007-06-06 06:01:26+0000 1.1.2.4 @@ -4,9 +4,9 @@ * * $RCSfile: paramwrapper.hxx,v $ * - * $Revision: 1.1.2.3 $ + * $Revision: 1.1.2.4 $ * - * last change: $Author: fs $ $Date: 2007/06/04 20:29:10 $ + * last change: $Author: fs $ $Date: 2007/06/06 06:01:26 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -57,7 +57,7 @@ #include <comphelper/broadcasthelper.hxx> #include <cppuhelper/weak.hxx> #include <cppuhelper/propshlp.hxx> -#include <cppuhelper/implbase2.hxx> +#include <cppuhelper/compbase2.hxx> #include <memory> #include <vector> @@ -80,7 +80,10 @@ ,public ::cppu::OPropertySetHelper { private: + typedef ::cppu::OWeakObject UnoBase; + typedef ::cppu::OPropertySetHelper PropertyBase; + private: /// the most recently set value of the parameter ::connectivity::ORowSetValue m_aValue; /// the positions (in our m_xValueDestination) at which the value should be set (0-based!) @@ -96,8 +99,9 @@ ::std::auto_ptr< ::cppu::OPropertyArrayHelper > m_pInfoHelper; - protected: - virtual ~ParameterWrapper(); + public: + const ::connectivity::ORowSetValue& Value() const { return m_aValue; } + ::connectivity::ORowSetValue& Value() { return m_aValue; } public: ParameterWrapper( @@ -122,14 +126,16 @@ virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw( ::com::sun::star::uno::Exception ); virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const; - // prevent method hiding - using ::cppu::OPropertySetHelper::getFastPropertyValue; - - public: - const ::connectivity::ORowSetValue& Value() const { return m_aValue; } - ::connectivity::ORowSetValue& Value() { return m_aValue; } + // pseudo-XComponent + virtual void SAL_CALL dispose(); protected: + virtual ~ParameterWrapper(); + + // disambiguations + using ::cppu::OPropertySetHelper::getFastPropertyValue; + + private: ::rtl::OUString impl_getPseudoAggregatePropertyName( sal_Int32 _nHandle ) const; private: @@ -144,7 +150,7 @@ //==================================================================== //= ParameterWrapperContainer //==================================================================== - typedef ::cppu::WeakImplHelper2 < ::com::sun::star::container::XIndexAccess + typedef ::cppu::WeakComponentImplHelper2 < ::com::sun::star::container::XIndexAccess , ::com::sun::star::container::XEnumerationAccess > ParameterWrapperContainer_Base; @@ -152,6 +158,7 @@ class ParameterWrapperContainer : public ParameterWrapperContainer_Base { private: + ::osl::Mutex m_aMutex; Parameters m_aParameters; protected: @@ -194,6 +201,13 @@ } size_t size() const { return m_aParameters.size(); } + + protected: + // XComponent + virtual void SAL_CALL disposing(); + + private: + void impl_checkDisposed_throw(); }; //==================================================================== --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
