CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TinyDomTest Class Reference

#include <TinyDomTest.h>

Public Member Functions

unsigned int allNodes (const NodeName &, std::vector< const AttList * > &)
 
 TinyDomTest (const TinyDom &)
 

Private Attributes

const TinyDomdom_
 

Detailed Description

some tests for TinyDom and TinyDomWalker

Definition at line 9 of file TinyDomTest.h.

Constructor & Destructor Documentation

TinyDomTest::TinyDomTest ( const TinyDom d)
explicit

Definition at line 9 of file TinyDomTest.cc.

10  : dom_(d)
11  { }
const TinyDom & dom_
Definition: TinyDomTest.h:17

Member Function Documentation

unsigned int TinyDomTest::allNodes ( const NodeName tagName,
std::vector< const AttList * > &  result 
)

Definition at line 13 of file TinyDomTest.cc.

References graph< N, E >::begin(), dom_, graph< N, E >::edgeData(), graph< N, E >::end(), and graph< N, E >::nodeData().

14 {
15  result.clear();
18  for (; it != ed; ++it) {
19  const TinyDom::edge_list & el = *it;
20  TinyDom::edge_list::const_iterator el_it = el.begin();
21  TinyDom::edge_list::const_iterator el_ed = el.end();
22  for (; el_it != el_ed; ++el_it) {
23  if ( dom_.nodeData(el_it->first).sameName(tagName) ) {
24  result.push_back(& dom_.edgeData(el_it->second));
25  }
26  }
27  }
28  return result.size();
29 }
const N & nodeData(const edge_type &) const
Definition: adjgraph.h:317
const E & edgeData(index_type i) const
Definition: adjgraph.h:183
std::vector< edge_type > edge_list
Definition: adjgraph.h:19
bool sameName(const TagName &tn) const
Definition: TagName.h:25
const TinyDom & dom_
Definition: TinyDomTest.h:17
adj_list::const_iterator const_adj_iterator
Definition: adjgraph.h:125
adj_iterator begin()
Definition: adjgraph.h:197
adj_iterator end()
Definition: adjgraph.h:199

Member Data Documentation

const TinyDom& TinyDomTest::dom_
private

Definition at line 17 of file TinyDomTest.h.

Referenced by allNodes().