mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-08 04:45:03 +08:00
Started over.
This commit is contained in:
25
io/CInputStreamFilter.cpp
Normal file
25
io/CInputStreamFilter.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
#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 throw()
|
||||
{
|
||||
return m_stream;
|
||||
}
|
||||
Reference in New Issue
Block a user