| 42 | } |
| 43 | |
| 44 | NodeInstance* GraphFunction::entryNode() const noexcept { |
| 45 | auto matching = nodesWithType("lang", "entry"); |
| 46 | |
| 47 | if (matching.size() == 1) { |
| 48 | auto& vec = matching[0]->type().dataOutputs(); |
| 49 | // make sure it has the same signature as the method |
| 50 | if (!std::equal(dataInputs().begin(), dataInputs().end(), vec.begin(), vec.end())) { |
| 51 | return nullptr; |
| 52 | } |
| 53 | // make sure it has the same exec names and size |
| 54 | auto foundExecOutputs = matching[0]->type().execOutputs(); |
| 55 | if (!std::equal(execInputs().begin(), execInputs().end(), foundExecOutputs.begin(), |
| 56 | foundExecOutputs.end())) { |
| 57 | return nullptr; |
| 58 | } |
| 59 | return matching[0]; |
| 60 | } |
| 61 | return nullptr; |
| 62 | } |
| 63 | |
| 64 | Result GraphFunction::insertNode(std::unique_ptr<NodeType> type, float x, float y, |
| 65 | boost::uuids::uuid id, NodeInstance** toFill) { |
no test coverage detected