#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; Instance *getInstance(std::string& name) { for(auto& instance: busInstances) { if (instance.name == name) { return &instance; } } for(auto& instance: componentInstances) { if (instance.name == name) { return &instance; } } return nullptr; } }; } // namespace domain #endif // DOMAIN_SCHEMA_H