#ifndef DOMAIN_SCHEMA_H #define DOMAIN_SCHEMA_H #include "connectioninstance.h" #include "instance.h" #include "wireinstance.h" #include namespace domain { class Schema { public: Schema(); std::vector> busInstances; std::vector> componentInstances; std::vector> connections; BusInstance *getBusInstance(std::string& name) { for(auto& instance: busInstances) { if (instance->name == name) { return instance.get(); } } return nullptr; } ComponentInstance *getComponentInstance(std::string& name) { for(auto& instance: componentInstances) { if (instance->name == name) { return instance.get(); } } return nullptr; } bool hasConnection(string& component, string& pin); ConnectionInstance* getConnection(string& component, string& pin); }; } // namespace domain #endif // DOMAIN_SCHEMA_H