LibreOffice Module ucb (master)  1
std_outputstream.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 
10 #ifndef INCLUDED_UCB_SOURCE_UCP_CMIS_STD_OUTPUTSTREAM_HXX
11 #define INCLUDED_UCB_SOURCE_UCP_CMIS_STD_OUTPUTSTREAM_HXX
12 
13 #include <boost/shared_ptr.hpp>
14 #include <ostream>
15 
16 #include <osl/mutex.hxx>
17 #include <cppuhelper/weak.hxx>
18 #include <com/sun/star/io/XOutputStream.hpp>
19 
20 namespace cmis
21 {
26  public cppu::OWeakObject,
27  public css::io::XOutputStream
28  {
29  public:
30 
31  StdOutputStream( boost::shared_ptr< std::ostream > const & pStream );
32 
33  virtual ~StdOutputStream( ) override;
34 
35  virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) override;
36 
37  virtual void SAL_CALL acquire ( ) throw ( ) override;
38 
39  virtual void SAL_CALL release ( ) throw ( ) override;
40 
41  virtual void SAL_CALL writeBytes ( const css::uno::Sequence< sal_Int8 >& aData ) override;
42 
43  virtual void SAL_CALL flush ( ) override;
44 
45  virtual void SAL_CALL closeOutput ( ) override;
46 
47  private:
48 
49  osl::Mutex m_aMutex;
50  boost::shared_ptr< std::ostream > m_pStream;
51  };
52 }
53 
54 #endif
55 
56 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const char aData[]
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual void SAL_CALL flush() override
virtual void SAL_CALL closeOutput() override
virtual void SAL_CALL acquire() override
virtual void SAL_CALL writeBytes(const css::uno::Sequence< sal_Int8 > &aData) override
virtual void SAL_CALL release() override
virtual ~StdOutputStream() override
boost::shared_ptr< std::ostream > m_pStream
Implements a OutputStream working on an std::ostream.
StdOutputStream(boost::shared_ptr< std::ostream > const &pStream)