| 697 | |
| 698 | template <typename PREDICATE> |
| 699 | MetadataNode findChild(PREDICATE p) const |
| 700 | { |
| 701 | auto nodes = children(); |
| 702 | for (auto ai = nodes.begin(); ai != nodes.end(); ++ai) |
| 703 | { |
| 704 | MetadataNode& n = *ai; |
| 705 | if (p(n)) |
| 706 | return n; |
| 707 | } |
| 708 | return MetadataNode(); |
| 709 | } |
| 710 | |
| 711 | MetadataNode findChild(const char *s) const |
| 712 | { return findChild(std::string(s)); } |