// $Id: BRbInputBuffer.h,v 1.7 2002/12/13 08:39:45 yuya Exp $

#ifndef _BRbInputBuffer_h_
#define _BRbInputBuffer_h_

////////////////////////////////////////////////////////////////////////////////

#include "BRbBase.h"

////////////////////////////////////////////////////////////////////////////////

class BRbInputBuffer
{

public:
	BRbInputBuffer(char* buffer, int length);
	BRbInputBuffer(VALUE buffer);
	virtual ~BRbInputBuffer();

public:
	virtual byte  read_byte();
	virtual word  read_word();
	virtual dword read_dword();
	virtual void  read_bytes(void* buffer, int size);
	virtual void  read_bytes_at(dword position, void* buffer, dword size);

protected:
	virtual void initialize(char* buffer, int length);
	virtual void can_read(int size);

public:
	int   m_position;
	int   m_length;
	char* m_buffer;

};

////////////////////////////////////////////////////////////////////////////////

#endif

////////////////////////////////////////////////////////////////////////////////
