<commit_before>/*
	<NAME>' Kubacki 2017
	https://github.com/condzi
*/

#pragma once

#include "SystemBase.hpp"

namespace ecs
{
	/*
	===============================================================================
		Wraps entityID_t into System methods like AddComponent. This class is useful
		for predefined Entites with many components. In advanced systems it's called
		"prefab". You must pass System you want to entity add to in constructor.

	===============================================================================
	*/
	class Entity
	{
	public:
		Entity( SystemBase& system, bool setIDonStartUp = true ) :
			idRO( id ),
			owningSystem( system )
		{
			if ( setIDonStartUp )
				this->id = system.CreateEntity();
		}
		virtual ~Entity() = default;

		entityID_t GetID()
		{
			return this->id;
		}
		const entityID_t GetID() const
		{
			return this->id;
		}
		void SetID( entityID_t newID )<commit_msg>ID for Entity is set to UNASSIGNED if not generate on startup<commit_after>/*
	<NAME> 2017
	https://github.com/condzi
*/

#pragma once

#include "SystemBase.hpp"

namespace ecs
{
	/*
	===============================================================================
		Wraps entityID_t into System methods like AddComponent. This class is useful
		for predefined Entites with many components. In advanced systems it's called
		"prefab". You must pass System you want to entity add to in constructor.

	===============================================================================
	*/
	class Entity
	{
	public:
		Entity( SystemBase& system, bool setIDonStartUp = true ) :
			idRO( id ),
			owningSystem( system )
		{
			if ( setIDonStartUp )
				this->id = system.CreateEntity();
			else
				this->id = UNASSIGNED_ENTITY_ID;
		}
		virtual ~Entity() = default;

		entityID_t GetID()
		{
			return this->id;
		}
		const entityID_t GetID() const
		{
			return this->id;
		}
		void SetID( entityID_t newID )
{'fraction_non_alphanumeric': 0.24661105318039625, 'fraction_numerical': 0.004171011470281543, 'mean_word_length': 4.010443864229765, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3992941', 'n_tokens_mistral': 645, 'n_tokens_neox': 552, 'n_words': 173}