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