From 0f621a9f3f962234efaf120c487fa8205b1edbf1 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Wed, 23 Aug 2023 00:05:12 +0300 Subject: [PATCH] Add ecs::entity_container::attach/detach declarations (no implementation yet) --- libs/ecs/include/psemek/ecs/entity_container.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libs/ecs/include/psemek/ecs/entity_container.hpp b/libs/ecs/include/psemek/ecs/entity_container.hpp index a3c32b1c..e2dc6c81 100644 --- a/libs/ecs/include/psemek/ecs/entity_container.hpp +++ b/libs/ecs/include/psemek/ecs/entity_container.hpp @@ -37,6 +37,18 @@ namespace psemek::ecs // or if the entity isn't active entity_accessor get(entity_handle const & entity); + // Attach new components to an existing entity + // If the entity already has a component, its value + // is replaced with a new one + // TODO: implement + template + void attach(entity_handle const & entity, Components && ... components); + + // Remove components from an existing entity + // TODO: implement + template + void detach(entity_handle const & entity); + // Create a query cache that can be used for the // apply() call to speed it up template