Tag: cws_src680_oj14 User: fs Date: 2007-06-04 13:19:32+0000 Log: outsourced the container of wrappers, too
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.1&r2=1.1.2.2 Delta lines: +47 -3 -------------------- --- paramwrapper.hxx 2007-06-04 13:03:36+0000 1.1.2.1 +++ paramwrapper.hxx 2007-06-04 13:19:29+0000 1.1.2.2 @@ -4,9 +4,9 @@ * * $RCSfile: paramwrapper.hxx,v $ * - * $Revision: 1.1.2.1 $ + * $Revision: 1.1.2.2 $ * - * last change: $Author: fs $ $Date: 2007/06/04 13:03:36 $ + * last change: $Author: fs $ $Date: 2007/06/04 13:19:29 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -40,12 +40,19 @@ #ifndef _COM_SUN_STAR_SDBC_XPARAMETERS_HPP_ #include <com/sun/star/sdbc/XParameters.hpp> #endif +#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_ +#include <com/sun/star/container/XIndexAccess.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HPP_ +#include <com/sun/star/container/XEnumerationAccess.hpp> +#endif /** === end UNO includes === **/ #include <comphelper/uno3.hxx> #include <comphelper/broadcasthelper.hxx> #include <cppuhelper/weak.hxx> #include <cppuhelper/propshlp.hxx> +#include <cppuhelper/implbase2.hxx> #include <memory> #include <vector> @@ -111,6 +118,43 @@ ::rtl::OUString impl_getPseudoAggregatePropertyName( sal_Int32 _nHandle ) const; }; + //==================================================================== + //= ParameterWrapperContainer + //==================================================================== + typedef ::cppu::WeakImplHelper2 < ::com::sun::star::container::XIndexAccess + , ::com::sun::star::container::XEnumerationAccess + > ParameterWrapperContainer_Base; + + /// class for the parameter event @see approveParameter + class ParameterWrapperContainer : public ParameterWrapperContainer_Base + { + public: + typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > > Parameters; + + private: + Parameters m_aParameters; + + protected: + virtual ~ParameterWrapperContainer(); + + public: + ParameterWrapperContainer(); + + // ::com::sun::star::container::XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL hasElements() throw( ::com::sun::star::uno::RuntimeException ); + + // ::com::sun::star::container::XEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration() throw( ::com::sun::star::uno::RuntimeException ); + + // ::com::sun::star::container::XIndexAccess + virtual sal_Int32 SAL_CALL getCount() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 _rIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + + public: + Parameters& getParameters() { return m_aParameters; } + }; + //........................................................................ } // namespace dbtools //........................................................................ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
