mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-19 00:41:49 +03:00
26 lines
424 B
C++
26 lines
424 B
C++
|
#include "COutputStreamFilter.h"
|
||
|
#include <assert.h>
|
||
|
|
||
|
//
|
||
|
// COutputStreamFilter
|
||
|
//
|
||
|
|
||
|
COutputStreamFilter::COutputStreamFilter(IOutputStream* stream, bool adopted) :
|
||
|
m_stream(stream),
|
||
|
m_adopted(adopted)
|
||
|
{
|
||
|
assert(m_stream != NULL);
|
||
|
}
|
||
|
|
||
|
COutputStreamFilter::~COutputStreamFilter()
|
||
|
{
|
||
|
if (m_adopted) {
|
||
|
delete m_stream;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
IOutputStream* COutputStreamFilter::getStream() const throw()
|
||
|
{
|
||
|
return m_stream;
|
||
|
}
|