#include <Entities/EntityMemoryPool.h>

#include <Entities/Entity.h>
#include <cstddef>
#include <utility.h>
#include <Entities/EntityView.h>

EntityMemoryPool::EntityMemoryPool()
{
	for (int i = 0; i < util::TAG_COUNT; i++)
	{
		EntityView x(*this, util::tagStart[i], util::tagSize[i]);
		for (auto entity : x)
		{
			m_tags[entity.m_index] = i;
		}
	}
}

tag_t EntityMemoryPool::getTag(index_t index) const
{ return m_tags[index]; }

size_t EntityMemoryPool::getId(index_t index) const
{ return m_ids[index]; }