#ifndef DOMAIN_COMPONENT_H #define DOMAIN_COMPONENT_H #include "pin.h" #include "rule.h" #include "display.h" #include "attribute.h" #include #include namespace domain { using namespace std; class Component { public: enum ComponentType { OTHER, PROCESSOR, MEMORY }; private: std::string name; std::optional displayName; std::string tooltip; std::string source; ComponentType type; std::vector rules; std::string instanceName; std::pair count; Display display; std::vector pins; std::vector attributes; public: Component(string name, optional displayName, string tooltip, string source, ComponentType type, vector rules, string instanceName, pair count, Display display, vector pins, vector attributes); std::string getName(); std::string getDisplayName(); std::string getTooltip(); std::string getSource(); ComponentType getType(); std::vector getRules(); std::string getInstanceName(); std::pair getCount(); Display getDisplay(); std::vector getPins(); Pin getPin(std::string pin); std::vector& getAttributes(); Attribute getAttribute(std::string attribute); bool hasAttribute(std::string name, Value::ValueType type); bool hasPin(std::string name); }; } // namespace domain #endif // DOMAIN_COMPONENT_H