#ifndef DOMAIN_BUS_H #define DOMAIN_BUS_H #include "display.h" #include "value.h" #include #include #include namespace domain { class Wire { public: enum WireType { WIRE_DEFAULT, WIRED_AND, WIRED_OR, R_WIRE }; private: std::string name; WireType type; int width; bool hidden; bool hasTerminate; Value terminateWith; public: Wire(std::string name, WireType type, int width, bool hidden, bool hasTerminate, Value terminateWith); std::string getName(); int getWidth(); bool isHidden(); bool hasTerminateWith(); Value getTerminateWith(); WireType getType(); }; class Bus { public: enum BusType { AUTOMATIC, REGULAR, SINGLE_AUTOMATIC }; private: std::string name; std::string instanceName; std::string tooltip; BusType type; std::pair count; std::optional displayBus; std::vector wires; public: Bus(std::string name, std::string instanceName, std::string tooltip, BusType type, std::pair count, std::vector wires, std::optional display = std::nullopt); std::string getName(); std::string getInstanceName(); std::string getTooltip(); BusType getType(); std::pair getCount(); std::vector getWires(); std::optional getDisplayBus(); }; } // namespace domain #endif // DOMAIN_BUS_H