| 97 | } |
| 98 | |
| 99 | Valdi::ViewNodePath parseNodePath(std::string_view nodePath) { |
| 100 | auto result = Valdi::ViewNodePath::parse(nodePath); |
| 101 | if (!result) { |
| 102 | throw Valdi::Exception(result.error().toStringBox()); |
| 103 | } |
| 104 | return result.value(); |
| 105 | } |
| 106 | |
| 107 | Valdi::Ref<Valdi::ViewNode> getViewNodeForId(const Valdi::SharedViewNodeTree& viewNodeTree, std::string id) { |
| 108 | return viewNodeTree->getViewNodeForNodePath(parseNodePath(id)); |
no test coverage detected