CMS 3D CMS Logo

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

#include <TinyDomTest2.h>

Public Member Functions

unsigned int allNodes (const Node2 &n2, std::vector< const AttList2 * > &at2)
 
 TinyDomTest2 (const TinyDom2 &td2)
 

Private Attributes

const TinyDom2dom_
 

Detailed Description

some tests for TinyDom and TinyDomWalker

Definition at line 8 of file TinyDomTest2.h.

Constructor & Destructor Documentation

◆ TinyDomTest2()

TinyDomTest2::TinyDomTest2 ( const TinyDom2 td2)
explicit

Definition at line 12 of file TinyDomTest2.cc.

12 : dom_(td2) {}

Member Function Documentation

◆ allNodes()

unsigned int TinyDomTest2::allNodes ( const Node2 n2,
std::vector< const AttList2 * > &  at2 
)

Definition at line 14 of file TinyDomTest2.cc.

14  {
16  cout << "Size of graph: " << TinyDomTest2::dom_.size() << endl;
17  while (it++ != dom_.end()) {
18  if (n2.first.sameName(dom_.nodeData(it).first)) {
19  at2.emplace_back(&(dom_.nodeData(it).second));
20  }
21  }
22  return at2.size();
23 }

References math::Graph< N, E >::begin(), gather_cfg::cout, dom_, math::Graph< N, E >::end(), callgraph::n2, math::Graph< N, E >::nodeData(), and math::Graph< N, E >::size().

Member Data Documentation

◆ dom_

const TinyDom2& TinyDomTest2::dom_
private

Definition at line 15 of file TinyDomTest2.h.

Referenced by allNodes().

TinyDomTest2::dom_
const TinyDom2 & dom_
Definition: TinyDomTest2.h:15
gather_cfg.cout
cout
Definition: gather_cfg.py:144
callgraph.n2
n2
Definition: callgraph.py:50
math::Graph::size
auto size() const -> adj_list::size_type
Definition: Graph.h:176
math::Graph::begin
adj_iterator begin()
Definition: Graph.h:172
math::Graph::end
adj_iterator end()
Definition: Graph.h:174
math::Graph::nodeData
const N & nodeData(const edge_type &) const
Definition: Graph.h:272
math::Graph< Node2, AnotherDummy2 >::const_adj_iterator
adj_list::const_iterator const_adj_iterator
Definition: Graph.h:105