schema_editor/comdel/domain/instance.h

45 lines
949 B
C++

#ifndef DOMAIN_INSTANCE_H
#define DOMAIN_INSTANCE_H
#include "bus.h"
#include "component.h"
#include "instance_attribute.h"
#include <string>
#include <vector>
namespace domain {
class BusInstance {
public:
std::string name;
std::pair<int, int> position;
Bus bus;
int size;
BusInstance(std::string name, Bus bus);
BusInstance(std::string name, std::pair<int, int> position, Bus bus, int size = -1);
virtual ~BusInstance() = default;
};
class ComponentInstance {
public:
std::string name;
std::vector<InstanceAttribute> attributes;
std::pair<int, int> position;
Component component;
ComponentInstance(std::string name, std::vector<InstanceAttribute> attributes, std::pair<int, int> position, Component component);
virtual ~ComponentInstance() = default;
};
} // namespace domain
#endif // DOMAIN_INSTANCE_H