2022-03-31 21:20:41 +00:00
|
|
|
#ifndef DOMAIN_PIN_H
|
|
|
|
#define DOMAIN_PIN_H
|
|
|
|
|
|
|
|
#include "display.h"
|
2022-04-09 12:10:40 +00:00
|
|
|
#include "value.h"
|
2022-03-31 21:20:41 +00:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
|
|
namespace domain {
|
|
|
|
|
2022-05-27 06:18:17 +00:00
|
|
|
class Pin {
|
|
|
|
public:
|
|
|
|
enum PinType {
|
|
|
|
IN_OUT,
|
|
|
|
IN,
|
|
|
|
OUT
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::string name;
|
|
|
|
PinType type;
|
|
|
|
std::string tooltip;
|
2022-06-12 22:48:12 +00:00
|
|
|
std::optional<std::string> connection;
|
2022-05-27 06:18:17 +00:00
|
|
|
domain::ui::Pin displayPin;
|
|
|
|
|
|
|
|
std::optional<std::vector<Value>> wires;
|
|
|
|
|
|
|
|
public:
|
2022-06-12 22:48:12 +00:00
|
|
|
Pin(std::string name, PinType type, std::string tooltip, std::optional<std::string> connection, domain::ui::Pin pin,
|
2022-05-27 06:18:17 +00:00
|
|
|
std::optional<std::vector<Value>> wires);
|
|
|
|
|
|
|
|
std::string &getName();
|
|
|
|
|
|
|
|
PinType getType();
|
|
|
|
|
|
|
|
std::string getTooltip();
|
|
|
|
|
|
|
|
ui::Pin &getDisplayPin();
|
|
|
|
|
2022-06-12 22:48:12 +00:00
|
|
|
std::optional<std::string> getConnection();
|
2022-05-27 06:18:17 +00:00
|
|
|
|
|
|
|
std::optional<std::vector<Value>> &getWires();
|
|
|
|
};
|
2022-03-31 21:20:41 +00:00
|
|
|
|
|
|
|
} // namespace domain
|
|
|
|
|
|
|
|
#endif // DOMAIN_PIN_H
|