~nobuto/ubuntu/natty/synergy/merge-from-experimental

« back to all changes in this revision

Viewing changes to lib/io/COutputStreamFilter.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Lutz
  • Date: 2003-10-31 19:36:30 UTC
  • Revision ID: james.westby@ubuntu.com-20031031193630-knbv79x5az7qh49y
Tags: upstream-1.0.14
ImportĀ upstreamĀ versionĀ 1.0.14

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * synergy -- mouse and keyboard sharing utility
 
3
 * Copyright (C) 2002 Chris Schoeneman
 
4
 * 
 
5
 * This package is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU General Public License
 
7
 * found in the file COPYING that should have accompanied this file.
 
8
 * 
 
9
 * This package is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 */
 
14
 
 
15
#include "COutputStreamFilter.h"
 
16
 
 
17
//
 
18
// COutputStreamFilter
 
19
//
 
20
 
 
21
COutputStreamFilter::COutputStreamFilter(IOutputStream* stream, bool adopted) :
 
22
        m_stream(stream),
 
23
        m_adopted(adopted)
 
24
{
 
25
        assert(m_stream != NULL);
 
26
}
 
27
 
 
28
COutputStreamFilter::~COutputStreamFilter()
 
29
{
 
30
        if (m_adopted) {
 
31
                delete m_stream;
 
32
        }
 
33
}
 
34
 
 
35
IOutputStream*
 
36
COutputStreamFilter::getStream() const
 
37
{
 
38
        return m_stream;
 
39
}