barrier/io/CInputStreamFilter.cpp

26 lines
407 B
C++
Raw Normal View History

2001-10-06 18:13:28 +04:00
#include "CInputStreamFilter.h"
#include <assert.h>
//
// CInputStreamFilter
//
CInputStreamFilter::CInputStreamFilter(IInputStream* stream, bool adopted) :
m_stream(stream),
m_adopted(adopted)
{
assert(m_stream != NULL);
}
CInputStreamFilter::~CInputStreamFilter()
{
if (m_adopted) {
delete m_stream;
}
}
IInputStream* CInputStreamFilter::getStream() const
2001-10-06 18:13:28 +04:00
{
return m_stream;
}