#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_in(nullptr)
	, m_buf_out(nullptr)
	, m_isBypass(false)
	{

	}
	virtual ~Block() = default;
	
	virtual void process() = 0;

	IBuffer* buffer_in(size_t index=0) const
	{
		return m_buf_in;
	}

	IBuffer* buffer_out(size_t index=0) const
	{
		return m_buf_out;
	}

	size_t num_in() const
	{
		return m_num_in;
	}

	size_t num_out() const
	{
  		return m_num_out;
	}
	
	void buffer_in_add(IBuffer *buf)
	{
		m_buf_in = buf;
	}

	void buffer_out_add(IBuffer *buf)
	{
		m_buf_out = buf;
	}

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

};
} // Processor

#endif // __RADIO_BLOCK_H__

