00001 #include "DetectorDescription/RegressionTest/src/TinyDomTest.h" 00002 00003 00004 TinyDomTest::TinyDomTest(const TinyDom & d) 00005 : dom_(d) 00006 { } 00007 00008 unsigned int TinyDomTest::allNodes(const NodeName & tagName, std::vector<const AttList *> & result) 00009 { 00010 result.clear(); 00011 TinyDom::const_adj_iterator it = dom_.begin(); 00012 TinyDom::const_adj_iterator ed = dom_.end(); 00013 for (; it != ed; ++it) { 00014 const TinyDom::edge_list & el = *it; 00015 TinyDom::edge_list::const_iterator el_it = el.begin(); 00016 TinyDom::edge_list::const_iterator el_ed = el.end(); 00017 for (; el_it != el_ed; ++el_it) { 00018 if ( dom_.nodeData(el_it->first).sameName(tagName) ) { 00019 result.push_back(& dom_.edgeData(el_it->second)); 00020 } 00021 } 00022 } 00023 return result.size(); 00024 }