2022-04-08 18:17:58 +00:00
|
|
|
#ifndef DOMAIN_CONNECTION_INSTANCE_H
|
|
|
|
#define DOMAIN_CONNECTION_INSTANCE_H
|
2022-04-05 21:48:07 +00:00
|
|
|
|
|
|
|
#include "connection.h"
|
|
|
|
#include "instance.h"
|
|
|
|
#include "wireinstance.h"
|
|
|
|
|
|
|
|
namespace domain {
|
|
|
|
|
|
|
|
class ConnectionInstance
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ComponentInstance *instance;
|
|
|
|
Connection connection;
|
|
|
|
|
2022-04-24 20:21:45 +00:00
|
|
|
virtual ~ConnectionInstance() = default;
|
|
|
|
|
2022-05-07 12:19:43 +00:00
|
|
|
std::vector<InstanceAttribute> attributes;
|
2022-04-05 21:48:07 +00:00
|
|
|
|
2022-05-25 05:39:45 +00:00
|
|
|
std::pair<int, int> start;
|
|
|
|
std::pair<int, int> end;
|
|
|
|
|
2022-05-07 12:19:43 +00:00
|
|
|
ConnectionInstance(ComponentInstance *instance, std::vector<InstanceAttribute> attributes, Connection connection);
|
2022-05-08 22:51:47 +00:00
|
|
|
|
|
|
|
InstanceAttribute getAttribute(string attribute);
|
2022-04-05 21:48:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class BusConnectionInstance: public ConnectionInstance
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
BusInstance *bus;
|
|
|
|
|
2022-05-07 12:19:43 +00:00
|
|
|
BusConnectionInstance(ComponentInstance *instance, std::vector<InstanceAttribute> attributes, BusInstance *bus, Connection connection);
|
2022-04-05 21:48:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class DirectConnectionInstance: public ConnectionInstance
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
BusInstance *bus;
|
|
|
|
ComponentInstance *secondInstance;
|
|
|
|
|
2022-05-07 12:19:43 +00:00
|
|
|
DirectConnectionInstance(ComponentInstance *instance, ComponentInstance *secondsInstance, std::vector<InstanceAttribute> attributes, BusInstance *bus, Connection connection);
|
2022-04-05 21:48:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace domain
|
|
|
|
|
|
|
|
#endif // DOMAIN_CONNECTIONINSTANCE_H
|