55 lines
1.0 KiB
C
55 lines
1.0 KiB
C
|
#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;
|
||
|
std::vector<InstanceAttribute*> attributes;
|
||
|
std::pair<int, int> position;
|
||
|
|
||
|
virtual ~Instance() {};
|
||
|
|
||
|
Instance(std::string name, std::vector<InstanceAttribute*> attributes, std::pair<int, int> position);
|
||
|
};
|
||
|
|
||
|
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;
|
||
|
|
||
|
ComponentInstance(std::string name, std::vector<InstanceAttribute*> attributes, std::pair<int, int> position, Component component);
|
||
|
|
||
|
virtual ~ComponentInstance() {
|
||
|
Instance::~Instance();
|
||
|
}
|
||
|
};
|
||
|
|
||
|
} // namespace domain
|
||
|
|
||
|
#endif // DOMAIN_INSTANCE_H
|