#include <TinyDomTest.h>
Public Member Functions | |
unsigned int | allNodes (const NodeName &, std::vector< const AttList * > &) |
TinyDomTest (const TinyDom &) | |
Private Attributes | |
const TinyDom & | dom_ |
some tests for TinyDom and TinyDomWalker
Definition at line 9 of file TinyDomTest.h.
TinyDomTest::TinyDomTest | ( | const TinyDom & | d | ) | [explicit] |
Definition at line 4 of file TinyDomTest.cc.
: dom_(d) { }
unsigned int TinyDomTest::allNodes | ( | const NodeName & | tagName, |
std::vector< const AttList * > & | result | ||
) |
Definition at line 8 of file TinyDomTest.cc.
References graph< N, E >::begin(), dom_, graph< N, E >::edgeData(), graph< N, E >::end(), graph< N, E >::nodeData(), and TagName::sameName().
{ result.clear(); TinyDom::const_adj_iterator it = dom_.begin(); TinyDom::const_adj_iterator ed = dom_.end(); for (; it != ed; ++it) { const TinyDom::edge_list & el = *it; TinyDom::edge_list::const_iterator el_it = el.begin(); TinyDom::edge_list::const_iterator el_ed = el.end(); for (; el_it != el_ed; ++el_it) { if ( dom_.nodeData(el_it->first).sameName(tagName) ) { result.push_back(& dom_.edgeData(el_it->second)); } } } return result.size(); }
const TinyDom& TinyDomTest::dom_ [private] |
Definition at line 17 of file TinyDomTest.h.
Referenced by allNodes().