schema_editor/comdel/domain/library.h

66 lines
1.8 KiB
C
Raw Normal View History

2022-03-31 21:20:41 +00:00
#ifndef DOMAIN_LIBRARY_H
#define DOMAIN_LIBRARY_H
#include "addressspace.h"
#include "bus.h"
#include "component.h"
#include "connection.h"
#include <string>
#include <vector>
namespace domain {
using namespace std;
class Library
{
std::string name;
std::string libraryInfo;
std::string header;
std::string componentDirectory;
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,
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::vector<AddressSpace> getAddressSpaces();
std::vector<Component> getComponents();
std::vector<Bus> getBuses();
std::vector<Connection> getConnections();
2022-04-05 21:48:07 +00:00
bool hasComponent(std::string name);
bool hasBus(std::string name);
2022-03-31 21:20:41 +00:00
std::map<std::string, std::string> getMessages();
AddressSpace &getAddressSpace(std::string name);
Component &getComponent(std::string name);
Bus &getBus(std::string bus);
std::string getMessage(std::string key);
2022-04-09 17:44:02 +00:00
bool hasConnection(ConnectionComponent component, std::string bus);
std::optional<Connection> getConnection(ConnectionComponent component, std::string bus);
2022-04-05 21:48:07 +00:00
2022-04-09 17:44:02 +00:00
bool hasConnection(ConnectionComponent component, std::string bus, ConnectionComponent secondComponent);
std::optional<Connection> getConnection(ConnectionComponent component, std::string bus, ConnectionComponent secondComponent);
2022-03-31 21:20:41 +00:00
};
} // namespace domain
#endif // DOMAIN_LIBRARY_H