LibreOffice Module connectivity (master) 1
drivers/firebird/Clob.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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
10#pragma once
11
12#include "Blob.hxx"
13
15
16#include <com/sun/star/io/XInputStream.hpp>
17#include <com/sun/star/sdbc/XClob.hpp>
18#include <rtl/ref.hxx>
19
21 {
22 typedef ::cppu::WeakComponentImplHelper< css::sdbc::XClob >
24
25 class Clob :
26 public Clob_BASE
27 {
28 protected:
29 ::osl::Mutex m_aMutex;
30
31 /*
32 * In Firebird Clob (textual Blob) is a subtype of blob,
33 * hence we store the data in a Blob, and the Clob class is
34 * a wrapper around that.
35 */
37
38 sal_Int64 m_nCharCount;
39
40 public:
41 Clob(isc_db_handle* pDatabaseHandle,
42 isc_tr_handle* pTransactionHandle,
43 ISC_QUAD const & aBlobID);
44
45 // ---- XClob ----------------------------------------------------
46 virtual sal_Int64 SAL_CALL
47 length() override;
48 virtual OUString SAL_CALL
49 getSubString(sal_Int64 aPosition, sal_Int32 aLength) override;
50 virtual css::uno::Reference< css::io::XInputStream > SAL_CALL
51 getCharacterStream() override;
52 virtual sal_Int64 SAL_CALL
53 position(const OUString& rPattern,
54 sal_Int32 aStart) override;
55 virtual sal_Int64 SAL_CALL
56 positionOfClob(const ::css::uno::Reference< ::css::sdbc::XClob >& rPattern,
57 sal_Int64 aStart) override;
58 // ---- OComponentHelper ------------------------------------------
59 virtual void SAL_CALL disposing() override;
60 };
61
62}
63
64/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
virtual OUString SAL_CALL getSubString(sal_Int64 aPosition, sal_Int32 aLength) override
virtual sal_Int64 SAL_CALL positionOfClob(const ::css::uno::Reference< ::css::sdbc::XClob > &rPattern, sal_Int64 aStart) override
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream() override
Clob(isc_db_handle *pDatabaseHandle, isc_tr_handle *pTransactionHandle, ISC_QUAD const &aBlobID)
virtual sal_Int64 SAL_CALL length() override
virtual void SAL_CALL disposing() override
rtl::Reference< connectivity::firebird::Blob > m_aBlob
virtual sal_Int64 SAL_CALL position(const OUString &rPattern, sal_Int32 aStart) override
::cppu::WeakComponentImplHelper< css::sdbc::XClob > Clob_BASE