barrier/io/COutputStreamFilter.cpp

26 lines
416 B
C++
Raw Normal View History

2001-10-06 14:13:28 +00:00
#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
2001-10-06 14:13:28 +00:00
{
return m_stream;
}