Skip to content

Commit

Permalink
feat(Common): Add Id.hpp to Engine/EntityComponentSystem/Components/C…
Browse files Browse the repository at this point in the history
…ommon directory
  • Loading branch information
MasterLaplace committed Jan 13, 2024
1 parent 5ce90dd commit 8b00eeb
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Flakkari/Engine/EntityComponentSystem/Components/Common/Id.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
** EPITECH PROJECT, 2024
** Title: Flakkari
** Author: MasterLaplace
** Created: 2023-01-06
** File description:
** Id
*/

#ifndef ID_HPP_
#define ID_HPP_

#include <cstdint>

#include "Network/Packed.hpp"

namespace Engine::ECS::Components::Common {
PACKED_START

struct Id {
std::size_t id;

Id() : id(0) {}
Id(const Id &other) : id(other.id) {}
Id(std::size_t id) : id(id) {}

std::size_t size() const {
return sizeof(id);
}
};

PACKED_END
} // namespace Engine::ECS::Components::Common

#endif /* !ID_HPP_ */

0 comments on commit 8b00eeb

Please sign in to comment.