54 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include "bus.h"
 | |
| 
 | |
| namespace domain {
 | |
| 
 | |
| 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)
 | |
| {}
 | |
| 
 | |
| std::string Wire::getName() {
 | |
|     return name;
 | |
| }
 | |
| int Wire::getWidth() {
 | |
|     return width;
 | |
| }
 | |
| bool Wire::isHidden() {
 | |
|     return hidden;
 | |
| }
 | |
| 
 | |
| bool Wire::hasTerminateWith() {
 | |
|     return hasTerminate;
 | |
| }
 | |
| Value Wire::getTerminateWith() {
 | |
|     return terminateWith;
 | |
| }
 | |
| Wire::WireType Wire::getType() {
 | |
|     return type;
 | |
| }
 | |
| 
 | |
| Bus::Bus(std::string name, std::string tooltip, BusType type, std::pair<int, int> count, std::vector<Wire> wires, std::optional<Display> display)
 | |
|     : name(name), tooltip(tooltip), type(type), count(count), wires(wires), display(display)
 | |
| {}
 | |
| 
 | |
| 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;
 | |
| }
 | |
| std::optional<Display> Bus::getDisplay() {
 | |
|     return display;
 | |
| }
 | |
| std::vector<Wire> Bus::getWires() {
 | |
|     return wires;
 | |
| }
 | |
| 
 | |
| 
 | |
| } // namespace domain
 |