2022-04-05 21:48:07 +00:00
|
|
|
#ifndef DOMAIN_INSTANCE_H
|
|
|
|
#define DOMAIN_INSTANCE_H
|
|
|
|
|
|
|
|
#include "bus.h"
|
|
|
|
#include "component.h"
|
|
|
|
#include "instanceattribute.h"
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace domain {
|
|
|
|
|
|
|
|
class Instance
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
std::string name;
|
2022-05-07 12:19:43 +00:00
|
|
|
std::vector<InstanceAttribute> attributes;
|
2022-04-05 21:48:07 +00:00
|
|
|
std::pair<int, int> position;
|
|
|
|
|
|
|
|
virtual ~Instance() {};
|
|
|
|
|
2022-05-07 12:19:43 +00:00
|
|
|
Instance(std::string name, std::vector<InstanceAttribute> attributes, std::pair<int, int> position);
|
2022-04-05 21:48:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class BusInstance: public Instance
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Bus bus;
|
|
|
|
int size;
|
|
|
|
|
|
|
|
BusInstance(std::string name, std::pair<int, int> position, Bus bus, int size);
|
|
|
|
|
|
|
|
virtual ~BusInstance() {
|
|
|
|
Instance::~Instance();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
class ComponentInstance: public Instance
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Component component;
|
|
|
|
|
2022-05-07 12:19:43 +00:00
|
|
|
ComponentInstance(std::string name, std::vector<InstanceAttribute> attributes, std::pair<int, int> position, Component component);
|
2022-04-05 21:48:07 +00:00
|
|
|
|
|
|
|
virtual ~ComponentInstance() {
|
|
|
|
Instance::~Instance();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace domain
|
|
|
|
|
|
|
|
#endif // DOMAIN_INSTANCE_H
|