#pragma once

#include <iostream>


namespace util
{


class SilentStreambuf : public std::streambuf 
{
public:
	SilentStreambuf(void)
	{
	}

	virtual int_type overflow( int_type i_char = EOF )
	{
		return i_char;
	}
};


// std::ostream‚ĚNullObject
class SilentStream : public std::ostream
{
public:
	SilentStream(void) : std::ostream( &m_buf )
	{}

private:
	SilentStreambuf m_buf;
};


}
