// StreamReader.cpp : implementation file
//

#include "stdafx.h"
#include "PGLWad.h"
#include "StreamReader.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// StreamReader

//IMPLEMENT_DYNCREATE(StreamReader, CObject)

StreamReader::StreamReader()
{
	m_inFile				= NULL;
}

StreamReader::~StreamReader()
{
	closeStream();
}

bool StreamReader::setStream(KArchive * archive)//char* filename)
{
	if (m_inFile)
		closeStream();
	m_inFile = archive;
	return true;
}


bool StreamReader::closeStream()
{
	if ( m_inFile)
	{
		m_inFile->close();
		m_inFile = NULL;
		return true;
	}
	return false;
}

//BEGIN_MESSAGE_MAP(StreamReader, CObject)
	//{{AFX_MSG_MAP(StreamReader)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
//END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// StreamReader message handlers
