#include "connection_instance.h" namespace domain { ConnectionInstance::ConnectionInstance(ComponentInstance *instance, std::vector attributes, Connection connection) : instance(instance), attributes(attributes), connection(connection) {} InstanceAttribute ConnectionInstance::getAttribute(string attribute) { for (auto &attr: attributes) { if (attr.name == attribute) { return attr; } } throw std::exception(); } BusConnectionInstance::BusConnectionInstance(ComponentInstance *instance, std::vector attributes, BusInstance *bus, Connection connection) : ConnectionInstance(instance, attributes, connection), bus(bus) {} DirectConnectionInstance::DirectConnectionInstance(ComponentInstance *instance, ComponentInstance *secondInstance, std::vector attributes, BusInstance *bus, Connection connection) : ConnectionInstance(instance, attributes, connection), secondInstance(secondInstance), bus(bus) {} } // namespace domain