#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 instances; std::vector connections; std::vector wires; WireInstance *getWire(std::string name) { for(auto wire: wires) { if (wire->name == name) { return wire; } } return nullptr; } bool hasWire(std::string name) { return getWire(name) != NULL; } Instance *getInstance(std::string name) { for(auto instance: instances) { if (instance->name == name) { return instance; } } return nullptr; } }; } // namespace domain #endif // DOMAIN_SCHEMA_H