<commit_before>// Copyright (C) 2015 <NAME>
// This file is part of the "Nazara Development Kit"
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp

#pragma once

#ifndef NDK_ENTITY_HPP
#define NDK_ENTITY_HPP

#include <Nazara/Core/Bitset.hpp>
#include <Nazara/Core/HandledObject.hpp>
#include <NDK/Algorithm.hpp>
#include <memory>
#include <vector>

namespace Ndk
{
	class BaseComponent;
	class Entity;
	class World;

	using EntityHandle = Nz::ObjectHandle<Entity>;

	class NDK_API Entity : public Nz::HandledObject<Entity>
	{
		friend class BaseSystem;
		friend World;

		public:
			Entity(const Entity&) = delete;
			Entity(Entity&& entity);
			~Entity();

			BaseComponent& AddComponent(std::unique_ptr<BaseComponent>&& component);
			template<typename ComponentType, typename... Args> ComponentType& AddComponent(Args&&... args);

			const EntityHandle& Clone() const;

			inline void Enable(bool enable);

			inline BaseComponent& GetComponent(ComponentIndex index);
			template<typename ComponentType> ComponentType& GetComponent();
			inline const BaseComponent& GetComponent(ComponentIndex index) const;
			template<typename ComponentType> const ComponentType& GetComponent() const;
			inline const Nz::Bitset<>& GetComponentBits() const;
			inline EntityId GetId() const;
			inline const Nz::Bitset<>& GetSystemBits() const;<commit_msg>Update Entity.hpp<commit_after>// Copyright (C) 2015 <NAME>
// This file is part of the "Nazara Development Kit"
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp

#pragma once

#ifndef NDK_ENTITY_HPP
#define NDK_ENTITY_HPP

#include <Nazara/Core/Bitset.hpp>
#include <Nazara/Core/HandledObject.hpp>
#include <NDK/Algorithm.hpp>
#include <memory>
#include <vector>

namespace Ndk
{
	class BaseComponent;
	class Entity;
	class World;

	using EntityHandle = Nz::ObjectHandle<Entity>;

	class NDK_API Entity : public Nz::HandledObject<Entity>
	{
		friend class BaseSystem;
		friend World;

		public:
			Entity(const Entity&) = delete;
			Entity(Entity&& entity);
			~Entity();

			BaseComponent& AddComponent(std::unique_ptr<BaseComponent>&& component);
			template<typename ComponentType, typename... Args> ComponentType& AddComponent(Args&&... args);

			const EntityHandle& Clone() const;

			inline void Enable(bool enable = true);

			inline BaseComponent& GetComponent(ComponentIndex index);
			template<typename ComponentType> ComponentType& GetComponent();
			inline const BaseComponent& GetComponent(ComponentIndex index) const;
			template<typename ComponentType> const ComponentType& GetComponent() const;
			inline const Nz::Bitset<>& GetComponentBits() const;
			inline EntityId GetId() const;
			inline const Nz::Bitset<>& GetSystemBits() const;
{'fraction_non_alphanumeric': 0.1068206423673764, 'fraction_numerical': 0.00288704438830747, 'mean_word_length': 5.431554524361949, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4792136', 'n_tokens_mistral': 898, 'n_tokens_neox': 802, 'n_words': 243}