| 117 | } |
| 118 | |
| 119 | void Clear() { |
| 120 | for (NodeViewMatch& child : children) { |
| 121 | child.Clear(); // child is an object. |
| 122 | } |
| 123 | children.clear(); // children is a vector. |
| 124 | if (node_view != nullptr) { |
| 125 | node_view = nullptr; |
| 126 | } |
| 127 | } |
| 128 | }; |
| 129 | |
| 130 | template <MatchingDirection DIRECTION = MatchingDirection::kFollowInputs> |