Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*************************************************************************
3 : *
4 : * Effective License of whole file:
5 : *
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.
9 : *
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.
14 : *
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
19 : *
20 : * Parts "Copyright by Sun Microsystems, Inc" prior to August 2011:
21 : *
22 : * The Contents of this file are made available subject to the terms of
23 : * the GNU Lesser General Public License Version 2.1
24 : *
25 : * Copyright: 2000 by Sun Microsystems, Inc.
26 : *
27 : * Contributor(s): Joerg Budischewski
28 : *
29 : * All parts contributed on or after August 2011:
30 : *
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/.
34 : *
35 : ************************************************************************/
36 :
37 : #ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_ARRAY_HXX
38 : #define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_ARRAY_HXX
39 : #include <cppuhelper/implbase1.hxx>
40 : #include <com/sun/star/sdbc/XArray.hpp>
41 :
42 : #include "pq_connection.hxx"
43 :
44 : namespace pq_sdbc_driver
45 : {
46 :
47 0 : class Array : public cppu::WeakImplHelper1< com::sun::star::sdbc::XArray >
48 : {
49 : com::sun::star::uno::Sequence< com::sun::star::uno::Any > m_data;
50 : com::sun::star::uno::Reference< com::sun::star::uno::XInterface > m_owner;
51 : com::sun::star::uno::Reference< com::sun::star::script::XTypeConverter > m_tc;
52 : rtl::Reference< RefCountedMutex > m_refMutex;
53 :
54 : public:
55 0 : Array(
56 : const rtl::Reference< RefCountedMutex > & mutex,
57 : const com::sun::star::uno::Sequence< com::sun::star::uno::Any > & data,
58 : const com::sun::star::uno::Reference< com::sun::star::uno::XInterface > & owner,
59 : const com::sun::star::uno::Reference< com::sun::star::script::XTypeConverter > &tc) :
60 : m_data( data ),
61 : m_owner( owner ),
62 : m_tc( tc ),
63 0 : m_refMutex( mutex )
64 0 : {}
65 :
66 : public: // XArray
67 :
68 : // Methods
69 : virtual OUString SAL_CALL getBaseTypeName( )
70 : throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
71 :
72 : virtual sal_Int32 SAL_CALL getBaseType( )
73 : throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
74 :
75 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getArray(
76 : const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap )
77 : throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
78 :
79 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getArrayAtIndex(
80 : sal_Int32 index,
81 : sal_Int32 count,
82 : const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap )
83 : throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
84 :
85 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL
86 : getResultSet(
87 : const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap )
88 : throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
89 :
90 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL getResultSetAtIndex(
91 : sal_Int32 index,
92 : sal_Int32 count,
93 : const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap )
94 : throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
95 :
96 : private:
97 : void checkRange( sal_Int32 index, sal_Int32 count );
98 : };
99 :
100 :
101 : };
102 :
103 : #endif
104 :
105 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|