76 lines
1.5 KiB
C++
76 lines
1.5 KiB
C++
#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);
|
|
|
|
bool hasAttribute(std::string name, Value::ValueType type);
|
|
|
|
bool hasPin(std::string name);
|
|
|
|
};
|
|
|
|
} // namespace domain
|
|
|
|
#endif // DOMAIN_COMPONENT_H
|