Definition EntityHierarchy.hpp:20
std::map< Entity, Children > _parentToChildren
Definition EntityHierarchy.hpp:89
std::optional< Entity > getParent(Entity child) const
Gets the parent of a specified child entity.
Definition EntityHierarchy.cpp:26
std::map< Entity, Entity > _childToParent
Definition EntityHierarchy.hpp:90
const Children & getChildren(Entity parent) const
Gets the children of a specified parent entity.
Definition EntityHierarchy.cpp:34
void attributeChild(Entity parent, Entity child)
Attributes a child entity to a parent entity.
Definition EntityHierarchy.cpp:5
~EntityHierarchy()=default
Destroys the EntityHierarchy object.
bool isAncestor(Entity entity, Entity ancestor) const
Checks if an entity is an ancestor of another entity.
Definition EntityHierarchy.cpp:43
std::set< Entity > Children
Alias for a set of child entities.
Definition EntityHierarchy.hpp:23
const auto & getParentToChild() const
Definition EntityHierarchy.hpp:74
void removeFromParent(Entity child)
Removes a child entity from its parent.
Definition EntityHierarchy.cpp:18
EntityHierarchy()=default
Constructs a new EntityHierarchy object.
uint32_t Entity
Definition Entity.hpp:7
Definition Requirements.hpp:12