2021-01-30 22:39:06 +01:00
|
|
|
#pragma once
|
|
|
|
|
2021-08-29 14:18:45 +02:00
|
|
|
#include <hex.hpp>
|
|
|
|
|
2021-01-30 22:39:06 +01:00
|
|
|
namespace hex::dp {
|
|
|
|
|
|
|
|
class Link {
|
|
|
|
public:
|
2021-08-29 14:18:45 +02:00
|
|
|
Link(u32 from, u32 to);
|
2021-01-30 22:39:06 +01:00
|
|
|
|
2022-02-01 18:09:40 +01:00
|
|
|
[[nodiscard]] u32 getId() const { return this->m_id; }
|
2021-05-17 23:17:58 +02:00
|
|
|
void setID(u32 id) { this->m_id = id; }
|
|
|
|
|
2022-02-01 18:09:40 +01:00
|
|
|
[[nodiscard]] u32 getFromId() const { return this->m_from; }
|
|
|
|
[[nodiscard]] u32 getToId() const { return this->m_to; }
|
|
|
|
|
|
|
|
static void setIdCounter(u32 id) {
|
|
|
|
if (id > Link::s_idCounter)
|
|
|
|
Link::s_idCounter = id;
|
|
|
|
}
|
2021-01-30 22:39:06 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
u32 m_id;
|
|
|
|
u32 m_from, m_to;
|
2022-02-01 18:09:40 +01:00
|
|
|
|
|
|
|
static u32 s_idCounter;
|
2021-01-30 22:39:06 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|