65 lines
1.6 KiB
C++
65 lines
1.6 KiB
C++
#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();
|
|
|
|
bool hasComponent(std::string name);
|
|
bool hasBus(std::string name);
|
|
bool hasConnection(std::string component, std::string pin, std::string bus);
|
|
|
|
std::map<std::string, std::string> getMessages();
|
|
|
|
AddressSpace &getAddressSpace(std::string name);
|
|
Component &getComponent(std::string name);
|
|
Bus &getBus(std::string bus);
|
|
std::optional<Connection> getConnection(std::string component, std::string pin, std::string bus);
|
|
std::string getMessage(std::string key);
|
|
|
|
|
|
|
|
};
|
|
|
|
} // namespace domain
|
|
|
|
#endif // DOMAIN_LIBRARY_H
|