| 667 | |
| 668 | template <typename PREDICATE> |
| 669 | MetadataNode find(PREDICATE p) const |
| 670 | { |
| 671 | if (p(*this)) |
| 672 | return *this; |
| 673 | auto nodes = children(); |
| 674 | for (auto ai = nodes.begin(); ai != nodes.end(); ++ai) |
| 675 | { |
| 676 | MetadataNode n = ai->find(p); |
| 677 | if (!n.empty()) |
| 678 | return n; |
| 679 | } |
| 680 | return MetadataNode(); |
| 681 | } |
| 682 | |
| 683 | template <typename PREDICATE> |
| 684 | MetadataNodeList findChildren(PREDICATE p) |