schema_editor/comdel/domain/pin.cpp

42 lines
915 B
C++
Raw Normal View History

2022-03-31 21:20:41 +00:00
#include "pin.h"
namespace domain {
PinConnection::PinConnection(std::string message, ConnectionType type)
: message(message), type(type)
{}
PinConnection::ConnectionType PinConnection::getType() {
return type;
}
std::string PinConnection::getMessage() {
return message;
}
2022-05-17 22:14:33 +00:00
Pin::Pin(std::string name, PinType type, std::string tooltip, PinConnection connection, domain::ui::Pin pin, std::optional<std::vector<Value>> wires)
: name(name), type(type), tooltip(tooltip), connection(connection), displayPin(pin), wires(wires)
2022-03-31 21:20:41 +00:00
{}
std::string &Pin::getName() {
2022-03-31 21:20:41 +00:00
return name;
}
Pin::PinType Pin::getType() {
return type;
}
std::string Pin::getTooltip() {
return tooltip;
}
2022-05-17 22:14:33 +00:00
ui::Pin &Pin::getDisplayPin() {
return displayPin;
2022-03-31 21:20:41 +00:00
}
PinConnection &Pin::getConnection() {
return connection;
}
2022-04-09 12:10:40 +00:00
std::optional<std::vector<Value>> &Pin::getWires() {
return wires;
}
2022-03-31 21:20:41 +00:00
} // namespace domain