schema_editor/comdel/domain/component.h

67 lines
1.4 KiB
C
Raw Permalink Normal View History

2022-03-31 21:20:41 +00:00
#ifndef DOMAIN_COMPONENT_H
#define DOMAIN_COMPONENT_H
#include "pin.h"
#include "rule.h"
#include "display.h"
#include "attribute.h"
#include <string>
#include <vector>
namespace domain {
using namespace std;
class Component
{
public:
enum ComponentType {
OTHER,
PROCESSOR,
MEMORY
};
private:
std::string name;
std::string tooltip;
std::string source;
ComponentType type;
std::vector<Rule> rules;
std::string instanceName;
std::pair<int, int> count;
Display display;
std::vector<Pin> pins;
std::vector<Attribute> attributes;
public:
Component(string name, string tooltip, string source, ComponentType type,
vector<Rule> rules, string instanceName, pair<int, int> count, Display display,
vector<Pin> pins, vector<Attribute> attributes);
std::string getName();
std::string getTooltip();
std::string getSource();
ComponentType getType();
std::vector<Rule> getRules();
std::string getInstanceName();
std::pair<int, int> getCount();
Display getDisplay();
std::vector<Pin> getPins();
Pin getPin(std::string pin);
std::vector<Attribute> getAttributes();
Attribute getAttribute(std::string attribute);
2022-04-05 21:48:07 +00:00
bool hasAttribute(std::string name, Value::ValueType type);
bool hasPin(std::string name);
2022-03-31 21:20:41 +00:00
};
} // namespace domain
#endif // DOMAIN_COMPONENT_H