LibreOffice Module ucb (master)  1
filrow.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #ifndef INCLUDED_UCB_SOURCE_UCP_FILE_FILROW_HXX
20 #define INCLUDED_UCB_SOURCE_UCP_FILE_FILROW_HXX
21 
22 #include <com/sun/star/sdbc/XRow.hpp>
23 #include <com/sun/star/script/XTypeConverter.hpp>
24 #include <cppuhelper/implbase.hxx>
25 
26 namespace fileaccess {
27 
28  class TaskManager;
29 
30  class XRow_impl: public cppu::WeakImplHelper<
31  css::sdbc::XRow >
32  {
33  public:
34  XRow_impl( TaskManager* pShell,const css::uno::Sequence< css::uno::Any >& aValueMap );
35  virtual ~XRow_impl() override;
36 
37  virtual sal_Bool SAL_CALL
38  wasNull() override;
39 
40  virtual OUString SAL_CALL
41  getString( sal_Int32 columnIndex ) override;
42 
43  virtual sal_Bool SAL_CALL
44  getBoolean( sal_Int32 columnIndex ) override;
45 
46  virtual sal_Int8 SAL_CALL
47  getByte( sal_Int32 columnIndex ) override;
48 
49  virtual sal_Int16 SAL_CALL
50  getShort( sal_Int32 columnIndex ) override;
51 
52  virtual sal_Int32 SAL_CALL
53  getInt( sal_Int32 columnIndex ) override;
54 
55  virtual sal_Int64 SAL_CALL
56  getLong( sal_Int32 columnIndex ) override;
57 
58  virtual float SAL_CALL
59  getFloat( sal_Int32 columnIndex ) override;
60 
61  virtual double SAL_CALL
62  getDouble(
63  sal_Int32 columnIndex ) override;
64 
65  virtual css::uno::Sequence< sal_Int8 > SAL_CALL
66  getBytes( sal_Int32 columnIndex ) override;
67 
68  virtual css::util::Date SAL_CALL
69  getDate( sal_Int32 columnIndex ) override;
70 
71  virtual css::util::Time SAL_CALL
72  getTime( sal_Int32 columnIndex ) override;
73 
74  virtual css::util::DateTime SAL_CALL
75  getTimestamp( sal_Int32 columnIndex ) override;
76 
77  virtual css::uno::Reference< css::io::XInputStream > SAL_CALL
78  getBinaryStream( sal_Int32 columnIndex ) override;
79 
80  virtual css::uno::Reference< css::io::XInputStream > SAL_CALL
81  getCharacterStream( sal_Int32 columnIndex ) override;
82 
83  virtual css::uno::Any SAL_CALL
84  getObject(
85  sal_Int32 columnIndex,
86  const css::uno::Reference< css::container::XNameAccess >& typeMap ) override;
87 
88  virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL
89  getRef( sal_Int32 columnIndex ) override;
90 
91  virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL
92  getBlob( sal_Int32 columnIndex ) override;
93 
94  virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL
95  getClob( sal_Int32 columnIndex ) override;
96 
97  virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL
98  getArray( sal_Int32 columnIndex ) override;
99 
100  private:
101  osl::Mutex m_aMutex;
102  css::uno::Sequence< css::uno::Any > m_aValueMap;
105  css::uno::Reference< css::script::XTypeConverter > m_xTypeConverter;
106 
107  bool isIndexOutOfBounds( sal_Int32 nIndex );
108  template<typename T>
109  T getValue(sal_Int32 columnIndex);
110  };
111 
112 } // end namespace fileaccess
113 
114 #endif
115 
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::script::XTypeConverter > m_xTypeConverter
Definition: filrow.hxx:105
virtual sal_Bool SAL_CALL getBoolean(sal_Int32 columnIndex) override
Definition: filrow.cxx:107
virtual ~XRow_impl() override
Definition: filrow.cxx:85
osl::Mutex m_aMutex
Definition: filrow.hxx:101
signed char sal_Int8
virtual sal_Bool SAL_CALL wasNull() override
Definition: filrow.cxx:91
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob(sal_Int32 columnIndex) override
Definition: filrow.cxx:260
css::uno::Sequence< css::uno::Any > m_aValueMap
Definition: filrow.hxx:102
virtual double SAL_CALL getDouble(sal_Int32 columnIndex) override
Definition: filrow.cxx:163
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream(sal_Int32 columnIndex) override
Definition: filrow.cxx:209
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob(sal_Int32 columnIndex) override
Definition: filrow.cxx:251
virtual css::util::Date SAL_CALL getDate(sal_Int32 columnIndex) override
Definition: filrow.cxx:181
virtual sal_Int32 SAL_CALL getInt(sal_Int32 columnIndex) override
Definition: filrow.cxx:136
virtual css::uno::Any SAL_CALL getObject(sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess > &typeMap) override
Definition: filrow.cxx:229
virtual sal_Int16 SAL_CALL getShort(sal_Int32 columnIndex) override
Definition: filrow.cxx:126
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray(sal_Int32 columnIndex) override
Definition: filrow.cxx:270
virtual sal_Int8 SAL_CALL getByte(sal_Int32 columnIndex) override
Definition: filrow.cxx:117
unsigned char sal_Bool
XRow_impl(TaskManager *pShell, const css::uno::Sequence< css::uno::Any > &aValueMap)
Definition: filrow.cxx:78
virtual css::util::Time SAL_CALL getTime(sal_Int32 columnIndex) override
Definition: filrow.cxx:190
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream(sal_Int32 columnIndex) override
Definition: filrow.cxx:219
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef(sal_Int32 columnIndex) override
Definition: filrow.cxx:242
virtual css::util::DateTime SAL_CALL getTimestamp(sal_Int32 columnIndex) override
Definition: filrow.cxx:199
bool isIndexOutOfBounds(sal_Int32 nIndex)
Definition: filrow.cxx:279
virtual float SAL_CALL getFloat(sal_Int32 columnIndex) override
Definition: filrow.cxx:154
virtual sal_Int64 SAL_CALL getLong(sal_Int32 columnIndex) override
Definition: filrow.cxx:145
T getValue(sal_Int32 columnIndex)
Definition: filrow.cxx:285
virtual OUString SAL_CALL getString(sal_Int32 columnIndex) override
Definition: filrow.cxx:98
TaskManager *const m_pMyShell
Definition: filrow.hxx:104
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes(sal_Int32 columnIndex) override
Definition: filrow.cxx:172