R-TYPE
Id.hpp
Go to the documentation of this file.
1 #ifndef _ID
2 #define _ID
3 
4 #include "IComp.hpp"
5 
6 namespace ECS {
7 
8 class ID : public IComp {
9 public:
10  explicit ID(int id) noexcept;
11  ID(const ID& id)
13  explicit ID(ID&&) noexcept = delete;
14  ~ID() noexcept override = default;
15 
16  ID& operator=(const ID&) const noexcept = delete;
17  ID& operator=(ID&&) const noexcept = delete;
18 
19  [[nodiscard]] int getID() const noexcept;
20  void setID(int id) noexcept;
21 
22 private:
23  int _id;
24 };
25 
26 };
27 
28 #endif
Definition: IComp.hpp:7
Definition: Id.hpp:8
int getID() const noexcept
Definition: Id.cpp:28
void setID(int id) noexcept
Definition: Id.cpp:35
ID(int id) noexcept
Definition: Id.cpp:8
noexcept
Definition: Id.hpp:12
Definition: ComponentManager.hpp:14