#ifndef __RADIO_BLOCK_H__
#define __RADIO_BLOCK_H__

#include <forward_list>
#include "Buffer.hpp"


namespace Processor
{
class Block
{

	public:
	Block(size_t num_in, size_t num_out)
	: m_num_in(num_in)
	, m_num_out(num_out)
	, m_buf_out(nullptr)
	, m_isBypass(false)
	{

	}
	virtual ~Block() = default;
	
	virtual void process() = 0;
	virtual IBuffer* buffer_in(size_t index=0) = 0;
	IBuffer* buffer_out(size_t index=0)
	{
		return m_buf_out;
	}

	size_t num_in()
	{
		return m_num_in;
	}

	size_t num_out()
	{
  		return m_num_out;
	}
	
	void buffer_out_add(IBuffer *out)
	{
		m_buf_out = out;
	}

	protected:
	size_t m_num_in;
	size_t m_num_out;
	IBuffer* m_buf_out;
	bool m_isBypass;

};
} // Processor

#endif // __RADIO_BLOCK_H__

