2001-10-06 14:13:28 +00:00
|
|
|
#include "COutputStreamFilter.h"
|
|
|
|
|
|
|
|
//
|
|
|
|
// COutputStreamFilter
|
|
|
|
//
|
|
|
|
|
2002-06-17 13:31:21 +00:00
|
|
|
COutputStreamFilter::COutputStreamFilter(IOutputStream* stream, bool adopted) :
|
2002-06-10 22:06:45 +00:00
|
|
|
m_stream(stream),
|
|
|
|
m_adopted(adopted)
|
2001-10-06 14:13:28 +00:00
|
|
|
{
|
|
|
|
assert(m_stream != NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
COutputStreamFilter::~COutputStreamFilter()
|
|
|
|
{
|
|
|
|
if (m_adopted) {
|
|
|
|
delete m_stream;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-06-10 22:06:45 +00:00
|
|
|
IOutputStream*
|
|
|
|
COutputStreamFilter::getStream() const
|
2001-10-06 14:13:28 +00:00
|
|
|
{
|
|
|
|
return m_stream;
|
|
|
|
}
|