bump product version to 6.3.0.0.beta1
[LibreOffice.git] / connectivity / source / drivers / postgresql / pq_xbase.hxx
blob6e7ac8413f471ddfe7a5d61256625087cf61fb69
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * Effective License of whole file:
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License version 2.1, as published by the Free Software Foundation.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18 * MA 02111-1307 USA
20 * Parts "Copyright by Sun Microsystems, Inc" prior to August 2011:
22 * The Contents of this file are made available subject to the terms of
23 * the GNU Lesser General Public License Version 2.1
25 * Copyright: 2000 by Sun Microsystems, Inc.
27 * Contributor(s): Joerg Budischewski
29 * All parts contributed on or after August 2011:
31 * This Source Code Form is subject to the terms of the Mozilla Public
32 * License, v. 2.0. If a copy of the MPL was not distributed with this
33 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
35 ************************************************************************/
37 #ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_XBASE_HXX
38 #define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_XBASE_HXX
39 #include <cppuhelper/propshlp.hxx>
40 #include <cppuhelper/component.hxx>
41 #include <cppuhelper/compbase.hxx>
43 #include <com/sun/star/lang/XServiceInfo.hpp>
44 #include <com/sun/star/container/XNamed.hpp>
46 #include "pq_xcontainer.hxx"
48 namespace pq_sdbc_driver
51 typedef ::cppu::WeakComponentImplHelper< css::lang::XServiceInfo,
52 css::sdbcx::XDataDescriptorFactory,
53 css::container::XNamed
54 > ReflectionBase_BASE;
56 class ReflectionBase :
57 public ReflectionBase_BASE,
58 public cppu::OPropertySetHelper
60 protected:
61 const OUString m_implName;
62 const css::uno::Sequence< OUString > m_supportedServices;
63 ::rtl::Reference< comphelper::RefCountedMutex > m_xMutex;
64 css::uno::Reference< css::sdbc::XConnection > m_conn;
65 ConnectionSettings *m_pSettings;
66 cppu::IPropertyArrayHelper & m_propsDesc;
67 std::vector< css::uno::Any > m_values;
68 public:
69 ReflectionBase(
70 const OUString &implName,
71 const css::uno::Sequence< OUString > &supportedServices,
72 const ::rtl::Reference< comphelper::RefCountedMutex >& refMutex,
73 const css::uno::Reference< css::sdbc::XConnection > &conn,
74 ConnectionSettings *pSettings,
75 cppu::IPropertyArrayHelper & props /* must survive this object !*/ );
77 public:
78 void copyValuesFrom( const css::uno::Reference< css::beans::XPropertySet > &set );
80 public: // for initialization purposes only, not exported via an interface !
81 void setPropertyValue_NoBroadcast_public(
82 const OUString & name, const css::uno::Any & value );
84 public: //XInterface
85 virtual void SAL_CALL acquire() throw() override { ReflectionBase_BASE::acquire(); }
86 virtual void SAL_CALL release() throw() override { ReflectionBase_BASE::release(); }
87 virtual css::uno::Any SAL_CALL queryInterface(
88 const css::uno::Type & reqType ) override;
90 public: // OPropertySetHelper
91 virtual cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
93 virtual sal_Bool SAL_CALL convertFastPropertyValue(
94 css::uno::Any & rConvertedValue,
95 css::uno::Any & rOldValue,
96 sal_Int32 nHandle,
97 const css::uno::Any& rValue ) override;
99 virtual void SAL_CALL setFastPropertyValue_NoBroadcast(
100 sal_Int32 nHandle,
101 const css::uno::Any& rValue ) override;
103 using ::cppu::OPropertySetHelper::getFastPropertyValue;
105 void SAL_CALL getFastPropertyValue(
106 css::uno::Any& rValue,
107 sal_Int32 nHandle ) const override;
109 // XPropertySet
110 css::uno::Reference < css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
112 public: // XServiceInfo
113 virtual OUString SAL_CALL getImplementationName() override;
114 virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
115 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
117 public: // XTypeProvider, first implemented by OPropertySetHelper
118 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
119 virtual css::uno::Sequence< sal_Int8> SAL_CALL getImplementationId() override;
121 public: // XDataDescriptorFactory
122 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL
123 createDataDescriptor( ) override = 0;
125 public: // XNamed
126 virtual OUString SAL_CALL getName( ) override;
127 virtual void SAL_CALL setName( const OUString& aName ) override;
132 #endif
134 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */