schema_editor/comdel/domain/bus.cpp

53 lines
1.2 KiB
C++
Raw Normal View History

2022-03-31 21:20:41 +00:00
#include "bus.h"
namespace domain {
2022-04-24 20:21:45 +00:00
Wire::Wire(std::string name, WireType type, int width, bool hidden, bool hasTerminate, Value terminateWith)
: name(name), type(type), width(width), hidden(hidden), hasTerminate(hasTerminate), terminateWith(terminateWith)
2022-04-05 21:48:07 +00:00
{}
std::string Wire::getName() {
return name;
}
int Wire::getWidth() {
return width;
}
bool Wire::isHidden() {
return hidden;
}
2022-04-24 20:21:45 +00:00
bool Wire::hasTerminateWith() {
return hasTerminate;
2022-04-05 21:48:07 +00:00
}
2022-04-24 20:21:45 +00:00
Value Wire::getTerminateWith() {
return terminateWith;
2022-04-05 21:48:07 +00:00
}
Wire::WireType Wire::getType() {
return type;
}
2022-05-26 17:21:53 +00:00
Bus::Bus(std::string name, std::string tooltip, BusType type, std::pair<int, int> count, std::vector<Wire> wires, std::optional<ui::Bus> displayBus)
: name(name), tooltip(tooltip), type(type), count(count), wires(wires), displayBus(displayBus)
2022-03-31 21:20:41 +00:00
{}
std::string Bus::getName() {
return name;
}
std::string Bus::getTooltip() {
return tooltip;
}
Bus::BusType Bus::getType() {
return type;
}
std::pair<int, int> Bus::getCount() {
return count;
}
2022-04-05 21:48:07 +00:00
std::vector<Wire> Bus::getWires() {
return wires;
}
2022-05-26 17:21:53 +00:00
std::optional<ui::Bus> Bus::getDisplayBus() {
return displayBus;
}
2022-03-31 21:20:41 +00:00
} // namespace domain