#include "library.h" namespace domain { Library::Library(string name, string libraryInfo, string header, string componentDirectory, std::optional componentHeader, vector addressSpaces, vector components, vector buses, vector connections, map messages) : name(name), libraryInfo(libraryInfo), header(header), componentDirectory(componentDirectory), componentHeader(componentHeader), addressSpaces(addressSpaces), components(components), buses(buses), connections(connections), messages(messages) {} std::string Library::getName() { return name; } std::string Library::getLibraryInfo() { return libraryInfo; } std::string Library::getHeader() { return header; } std::string Library::getComponentDirectory() { return componentDirectory; } std::optional Library::getComponentHeader() { return componentHeader; } std::vector Library::getAddressSpaces() { return addressSpaces; } std::vector Library::getComponents() { return components; } std::vector Library::getBuses() { return buses; } std::vector Library::getConnections() { return connections; } std::map Library::getMessages() { return messages; } bool Library::hasComponent(std::string name) { for(uint i=0; i Library::getConnection(ConnectionComponent component, std::string bus) { for(uint i=0; i Library::getConnection(ConnectionComponent component, std::string bus, ConnectionComponent secondComponent) { for(uint i=0; i Library::getConnection(ConnectionComponent component, ConnectionComponent secondComponent) { for(auto & connection : connections) { if(connection.isConnecting(component, secondComponent)) { return connection; } } return nullopt; } } // namespace domain