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

#ifndef _BRbOutputBuffer_h_
#define _BRbOutputBuffer_h_

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

#include "BRbBase.h"
#include <math.h>

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

class BRbOutputBuffer
{

public:
	BRbOutputBuffer();
	virtual ~BRbOutputBuffer();

public:
	virtual VALUE to_string();
	virtual void write_byte(byte value);
	virtual void write_word(word value);
	virtual void write_dword(dword value);
	virtual void write_bytes(void* value, int size);
	virtual void write_buffer(BRbOutputBuffer& buffer);

protected:
	virtual void resize(long new_length);
	virtual void reserve(long size);

protected:
	long  m_position;
	long  m_length;
	char* m_buffer;

protected:
	static const long LENGTH_FIRST;
	static const long LENGTH_UNIT;

};

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

#endif

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