50 lines
1.3 KiB
C++
50 lines
1.3 KiB
C++
#ifndef DOMAIN_CONNECTION_INSTANCE_H
|
|
#define DOMAIN_CONNECTION_INSTANCE_H
|
|
|
|
#include "connection.h"
|
|
#include "instance.h"
|
|
|
|
namespace domain {
|
|
|
|
class ConnectionInstance {
|
|
public:
|
|
ComponentInstance *instance;
|
|
Connection connection;
|
|
|
|
virtual ~ConnectionInstance() = default;
|
|
|
|
std::vector<InstanceAttribute> attributes;
|
|
|
|
std::pair<int, int> start;
|
|
std::pair<int, int> end;
|
|
|
|
ConnectionInstance(ComponentInstance *instance, std::vector<InstanceAttribute> attributes,
|
|
Connection connection);
|
|
|
|
InstanceAttribute getAttribute(string attribute);
|
|
};
|
|
|
|
|
|
class BusConnectionInstance : public ConnectionInstance {
|
|
public:
|
|
BusInstance *bus;
|
|
|
|
BusConnectionInstance(ComponentInstance *instance, std::vector<InstanceAttribute> attributes, BusInstance *bus,
|
|
Connection connection);
|
|
};
|
|
|
|
|
|
class DirectConnectionInstance : public ConnectionInstance {
|
|
public:
|
|
BusInstance *bus;
|
|
ComponentInstance *secondInstance;
|
|
|
|
DirectConnectionInstance(ComponentInstance *instance, ComponentInstance *secondsInstance,
|
|
std::vector<InstanceAttribute> attributes, BusInstance *bus, Connection connection);
|
|
};
|
|
|
|
|
|
} // namespace domain
|
|
|
|
#endif // DOMAIN_CONNECTIONINSTANCE_H
|