MetadataNodeList children(const std::string& name) const { MetadataNodeList outnodes; auto si = m_impl->m_subnodes.find(name); if (si != m_impl->m_subnodes.end()) { const MetadataImplList& l = si->second; for (auto li = l.begin(); li != l.end(); ++li) outnodes.push_back(MetadataNode(*li)); } return outnodes; }
MetadataNodeList findChildren(PREDICATE p) { MetadataNodeList matches; auto nodes = children(); for (auto ai = nodes.begin(); ai != nodes.end(); ++ai) { MetadataNode& n = *ai; if (p(n)) matches.push_back(n); } return matches; }
MetadataNodeList children() const { MetadataNodeList outnodes; const MetadataSubnodes& nodes = m_impl->m_subnodes; for (auto si = nodes.begin(); si != nodes.end(); ++si) { const MetadataImplList& l = si->second; for (auto li = l.begin(); li != l.end(); ++li) outnodes.push_back(MetadataNode(*li)); } return outnodes; }