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:
|
2022-10-06 09:14:46 +02:00
|
|
|
Link(int from, int to);
|
2021-01-30 22:39:06 +01:00
|
|
|
|
2022-10-06 09:14:46 +02:00
|
|
|
[[nodiscard]] int getId() const { return this->m_id; }
|
|
|
|
void setID(int id) { this->m_id = id; }
|
2021-05-17 23:17:58 +02:00
|
|
|
|
2022-10-06 09:14:46 +02:00
|
|
|
[[nodiscard]] int getFromId() const { return this->m_from; }
|
|
|
|
[[nodiscard]] int getToId() const { return this->m_to; }
|
2022-02-01 18:09:40 +01:00
|
|
|
|
2022-10-06 09:14:46 +02:00
|
|
|
static void setIdCounter(int id) {
|
2022-02-01 18:09:40 +01:00
|
|
|
if (id > Link::s_idCounter)
|
|
|
|
Link::s_idCounter = id;
|
|
|
|
}
|
2021-01-30 22:39:06 +01:00
|
|
|
|
|
|
|
private:
|
2022-10-06 09:14:46 +02:00
|
|
|
int m_id;
|
|
|
|
int m_from, m_to;
|
2022-02-01 18:09:40 +01:00
|
|
|
|
2022-10-06 09:14:46 +02:00
|
|
|
static int s_idCounter;
|
2021-01-30 22:39:06 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|