|
//====================================================================
// Although great care has gone into developing this software,
// it is provided without any guarantee of reliability, accuracy
// of information, or correctness of operation. I am not responsible
// for any damages that may occur as a result of using this software.
// Use this software entirely at your own risk.
// Copyright 2003, Chris Richardson
//
// Description: A CRT FILE* based source stream for lexer input.
//
//====================================================================
#if !defined(AFX_UTIL_FILESTREAM_H__AB1076B1_B861_4C04_AC74_DCDC0FBDD478__INCLUDED_)
#define AFX_UTIL_FILESTREAM_H__AB1076B1_B861_4C04_AC74_DCDC0FBDD478__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Stream.h"
#include "Status.h"
class CFILEStream : public CStream
{
public:
CFILEStream();
virtual ~CFILEStream();
ParseStatus Open( const TCHAR * p_pszPath );
ParseStatus Close();
virtual TCHAR * GetS( TCHAR * p_pszStr, int p_iLength );
virtual TCHAR GetC();
virtual TCHAR UngetC( TCHAR p_cC );
virtual unsigned long GetPos();
virtual void SetPos( unsigned long p_ulPos );
virtual const TCHAR * GetName() { return c_szFileName; }
protected:
FILE * c_pstFile;
TCHAR c_szFileName[MAX_PATH];
};
#endif // !defined(AFX_UTIL_FILESTREAM_H__AB1076B1_B861_4C04_AC74_DCDC0FBDD478__INCLUDED_)
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.