2022-03-31 21:20:41 +00:00
|
|
|
#ifndef DOMAIN_LIBRARY_H
|
|
|
|
#define DOMAIN_LIBRARY_H
|
|
|
|
|
2022-05-27 06:18:17 +00:00
|
|
|
#include "address_space.h"
|
2022-03-31 21:20:41 +00:00
|
|
|
#include "bus.h"
|
|
|
|
#include "component.h"
|
|
|
|
#include "connection.h"
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
|
|
namespace domain {
|
|
|
|
|
2022-05-27 06:18:17 +00:00
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
class Library {
|
|
|
|
std::string name;
|
|
|
|
std::string libraryInfo;
|
|
|
|
std::string header;
|
|
|
|
std::string componentDirectory;
|
|
|
|
std::optional<std::string> componentHeader;
|
|
|
|
|
|
|
|
std::vector<AddressSpace> addressSpaces;
|
|
|
|
std::vector<Component> components;
|
|
|
|
std::vector<Bus> buses;
|
|
|
|
std::vector<Connection> connections;
|
|
|
|
|
|
|
|
std::map<std::string, std::string> messages;
|
|
|
|
|
|
|
|
public:
|
|
|
|
Library(string name, string libraryInfo, string header, string componentDirectory,
|
|
|
|
std::optional<string> componentHeader,
|
|
|
|
vector<AddressSpace> addressSpaces, vector<Component> components, vector<Bus> buses,
|
|
|
|
vector<Connection> connection, map<string, string> messages);
|
|
|
|
|
|
|
|
std::string getName();
|
|
|
|
|
|
|
|
std::string getLibraryInfo();
|
|
|
|
|
|
|
|
std::string getHeader();
|
|
|
|
|
|
|
|
std::string getComponentDirectory();
|
|
|
|
|
|
|
|
std::optional<std::string> getComponentHeader();
|
|
|
|
|
|
|
|
std::vector<AddressSpace> getAddressSpaces();
|
|
|
|
|
|
|
|
std::vector<Component> getComponents();
|
|
|
|
|
|
|
|
std::vector<Bus> getBuses();
|
|
|
|
|
|
|
|
std::vector<Connection> getConnections();
|
|
|
|
|
|
|
|
bool hasComponent(std::string name);
|
2022-03-31 21:20:41 +00:00
|
|
|
|
2022-05-27 06:18:17 +00:00
|
|
|
bool hasBus(std::string name);
|
2022-03-31 21:20:41 +00:00
|
|
|
|
2022-05-27 06:18:17 +00:00
|
|
|
std::map<std::string, std::string> getMessages();
|
2022-03-31 21:20:41 +00:00
|
|
|
|
2022-05-27 06:18:17 +00:00
|
|
|
AddressSpace &getAddressSpace(std::string name);
|
2022-03-31 21:20:41 +00:00
|
|
|
|
2022-05-27 06:18:17 +00:00
|
|
|
Component &getComponent(std::string name);
|
2022-03-31 21:20:41 +00:00
|
|
|
|
2022-05-27 06:18:17 +00:00
|
|
|
Bus &getBus(std::string bus);
|
2022-03-31 21:20:41 +00:00
|
|
|
|
2022-05-27 06:18:17 +00:00
|
|
|
std::string getMessage(std::string key);
|
2022-03-31 21:20:41 +00:00
|
|
|
|
2022-05-27 06:18:17 +00:00
|
|
|
bool hasConnection(ConnectionComponent component, std::string bus);
|
2022-04-05 21:48:07 +00:00
|
|
|
|
2022-05-27 06:18:17 +00:00
|
|
|
std::optional<Connection> getConnection(ConnectionComponent component, std::string bus);
|
2022-03-31 21:20:41 +00:00
|
|
|
|
2022-05-27 06:18:17 +00:00
|
|
|
bool hasConnection(ConnectionComponent component, std::string bus, ConnectionComponent secondComponent);
|
2022-03-31 21:20:41 +00:00
|
|
|
|
2022-05-27 06:18:17 +00:00
|
|
|
std::optional<Connection> getConnection(ConnectionComponent component, std::string bus, ConnectionComponent secondComponent);
|
2022-04-05 21:48:07 +00:00
|
|
|
|
2022-05-27 06:18:17 +00:00
|
|
|
bool hasConnection(ConnectionComponent component, ConnectionComponent secondComponent);
|
2022-05-25 05:39:45 +00:00
|
|
|
|
2022-05-27 06:18:17 +00:00
|
|
|
std::optional<Connection> getConnection(ConnectionComponent component, ConnectionComponent secondComponent);
|
2022-05-25 05:39:45 +00:00
|
|
|
|
2022-05-27 06:18:17 +00:00
|
|
|
};
|
2022-03-31 21:20:41 +00:00
|
|
|
|
|
|
|
} // namespace domain
|
|
|
|
|
|
|
|
#endif // DOMAIN_LIBRARY_H
|