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 7 of file TinyDomTest.cc.

8  : dom_(d)
9  { }
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 11 of file TinyDomTest.cc.

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

12 {
13  result.clear();
16  for (; it != ed; ++it) {
17  const TinyDom::edge_list & el = *it;
18  TinyDom::edge_list::const_iterator el_it = el.begin();
19  TinyDom::edge_list::const_iterator el_ed = el.end();
20  for (; el_it != el_ed; ++el_it) {
21  if ( dom_.nodeData(el_it->first).sameName(tagName) ) {
22  result.emplace_back(& dom_.edgeData(el_it->second));
23  }
24  }
25  }
26  return result.size();
27 }
const N & nodeData(const edge_type &) const
Definition: Graph.h:312
const E & edgeData(index_type i) const
Definition: Graph.h:178
adj_iterator end()
Definition: Graph.h:194
std::vector< edge_type > edge_list
Definition: Graph.h:20
bool sameName(const TagName &tn) const
Definition: TagName.h:25
adj_iterator begin()
Definition: Graph.h:192
const TinyDom & dom_
Definition: TinyDomTest.h:17
adj_list::const_iterator const_adj_iterator
Definition: Graph.h:125

Member Data Documentation

const TinyDom& TinyDomTest::dom_
private

Definition at line 17 of file TinyDomTest.h.

Referenced by allNodes().