#ifndef DOMAIN_SCHEMA_H #define DOMAIN_SCHEMA_H #include "connection_instance.h" #include "instance.h" #include "library.h" #include #include namespace domain { struct ConnectionEntry { enum Type { BUS, COMPONENT }; Type type; std::optional busInstance; std::optional componentInstance; std::optional pin; Connection connection; }; class Schema { private: Library library; public: Schema(Library library): library(std::move(library)) {} std::vector> busInstances; std::vector> componentInstances; std::vector> connections; BusInstance *getBusInstance(std::string &name); ComponentInstance *getComponentInstance(std::string &name); bool hasConnection(string &component, string &pin); ConnectionInstance *getConnection(string &component, string &pin); std::vector availableConnections(std::string instance, std::string pin, bool onlyConnectable); vector getConnections(string &component, string &pin); }; } // namespace domain #endif // DOMAIN_SCHEMA_H