Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
Relationship.hpp
Go to the documentation of this file.
1/**************************************************************************
2 * Relationship v0.0.0
3 *
4 * Relationship is a software package, part of the Engine².
5 *
6 * This file is part of the EngineSquared project that is under GPL-3.0 License.
7 * Copyright © 2024 by @EngineSquared, All rights reserved.
8 *
9 * EngineSquared is a free software: you can redistribute it and/or modify
10 * it under the terms of the GPL-3.0 License as published by the
11 * Free Software Foundation. See the GPL-3.0 License for more details.
12 *
13 * @file Relationship.hpp
14 * @brief component to manage link between childs and parent
15 *
16 * This file contains the declaration of the Relationship component.
17 *
18 * @author @miou-zora
19 * @version 0.0.0
20 * @date 18-02-2024
21 **************************************************************************/
22
23#pragma once
24
25#include "entity/Entity.hpp"
26
32 // @brief number of children of the entity
33 std::size_t children = 0;
34 // @brief first child of the entity
35 std::optional<Engine::Entity> first = std::nullopt;
36 // @brief previous sibling of the entity
37 std::optional<Engine::Entity> prev = std::nullopt;
38 // @brief next sibling of the entity
39 std::optional<Engine::Entity> next = std::nullopt;
40 // @brief parent of the entity
41 std::optional<Engine::Entity> parent = std::nullopt;
42};
43} // namespace Relationship::Component
Definition Relationship.hpp:27
Definition Relationship.hpp:27
std::optional< Engine::Entity > parent
Definition Relationship.hpp:41
std::size_t children
Definition Relationship.hpp:33
std::optional< Engine::Entity > next
Definition Relationship.hpp:39
std::optional< Engine::Entity > first
Definition Relationship.hpp:35
std::optional< Engine::Entity > prev
Definition Relationship.hpp:37