CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
DDCompareEPV Struct Reference

#include <DDCompareTools.h>

Inheritance diagram for DDCompareEPV:

Public Member Functions

 DDCompareEPV ()
 
 DDCompareEPV (const DDCompOptions &ddco)
 
bool operator() (DDExpandedView &lhs, DDExpandedView &rhs) const
 

Public Attributes

DDCompOptions ddco_
 

Detailed Description

Definition at line 27 of file DDCompareTools.h.

Constructor & Destructor Documentation

DDCompareEPV::DDCompareEPV ( )

Definition at line 4 of file DDCompareTools.cc.

4 : ddco_() { }
DDCompOptions ddco_
DDCompareEPV::DDCompareEPV ( const DDCompOptions ddco)

Definition at line 6 of file DDCompareTools.cc.

6 : ddco_(ddco) { }
DDCompOptions ddco_

Member Function Documentation

bool DDCompareEPV::operator() ( DDExpandedView lhs,
DDExpandedView rhs 
) const

Definition at line 8 of file DDCompareTools.cc.

References DDExpandedView::copyno(), gather_cfg::cout, DDExpandedView::depth(), DDExpandedView::firstChild(), DDExpandedView::logicalPart(), DDName::name(), DDBase< N, C >::name(), DDExpandedView::next(), DDExpandedView::nextSibling(), DDExpandedView::parent(), and run_regression::ret.

8  {
9  bool ret(true);
10  /* struct DDCompareCPVGraph : public std::binary_function<DDCompactView::graph_type, DDCompactView::graph_type, bool> { */
11  /* bool operator()(const DDCompactView::graph_type& lhs, const DDCompactView::graph_type& rhs) const { */
12  /* bool ret; */
13  // const graph<DDLogicalPart, DDPosData*>& g1= lhs;
14  // graph<DDLogicalPart, DDPosData*>::const_iterator beg1 = g1.begin();
15  //DDCompactView::graph_type::const_iterator beg1 = lhs.begin();
16  /* std::cout << "size of lhs = " << lhs.edge_size() << std::endl; */
17  /* std::cout << "size of rhs = " << rhs.edge_size() << std::endl; */
18  /* std::cout << "iterating over lhs edges?" << std::endl; */
19  /* graph<DDLogicalPart, DDPosData*>::const_iterator beg1(lhs), end1(lhs); */
20  /* beg1 = lhs.begin_iter(); */
21  /* end1 = lhs.end_iter(); */
22  /* size_t countem(0); */
23  /* for ( ; beg1 != end1 ; ++beg1 ) { */
24  /* ++countem; */
25  /* } */
26  /* std::cout << "between lhs.begin_iter() and lhs.end_iter() there are " << countem << std::endl; */
27  /* graph<DDLogicalPart,DDPosData*>::const_edge_range cer = lhs.graph().edges(lhs.root()); */
28  /* graph<DDLogicalPart,DDPosData*>::adj_iterator i = const_edge_range.first */
29  // DDExpandedView v1(lhs), v2(rhs);
30  // if (v1.next()) std::cout << "v1 is true" << std::endl;
31  // if (v2.next()) std::cout << "v2 is true" << std::endl;
32  // DDNodeComparator ddnc;
33  //if ( ddnc (v1, v2) ) {
34  // ret = true;
35  //}
36  /* while (v1.next()) { */
37  /* if (v2.next()) { */
38  /* std::cout << v1.logicalPart().name().name() << ":" << v1.copyno() */
39  /* << " !=? " << v2.logicalPart().name().name() << ":" << v2.copyno() */
40  /* << std::endl; */
41 
42  /* if ( v1.logicalPart().name().name() != v2.logicalPart().name().name() ) { */
43  /* std::cout << v1.logicalPart().name().name() << ":" << v1.copyno() */
44  /* << " !=? " << v2.logicalPart().name().name() << ":" << v2.copyno() */
45  /* << std::endl; */
46  /* // std::cout << v1.logicalPart().name().name() << " !=? " << v2.logicalPart().name().name() << std::endl; */
47  /* ret=false; */
48  /* break; */
49  /* } */
50  /* } */
51  /* } */
52  std::cout <<"*********FIRST BY firstChild, firstChild, nextSibling, nextSibling*********" << std::endl;
53  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
54  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
55  << std::endl;
56  lhs.firstChild();
57  rhs.firstChild();
58  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
59  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
60  << std::endl;
61  lhs.firstChild();
62  rhs.firstChild();
63  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
64  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
65  << std::endl;
66  lhs.nextSibling();
67  rhs.nextSibling();
68  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
69  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
70  << std::endl;
71  lhs.nextSibling();
72  rhs.nextSibling();
73  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
74  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
75  << std::endl;
76  lhs.parent();
77  rhs.parent();
78  std::cout <<"*********THEN BY next, next, next, next*********" << std::endl;
79  lhs.parent();
80  rhs.parent();
81  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
82  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
83  << std::endl;
84  lhs.next();
85  rhs.next();
86  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
87  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
88  << std::endl;
89  lhs.next();
90  rhs.next();
91  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
92  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
93  << std::endl;
94  std::cout << lhs.depth() << " depth " << rhs.depth() << std::endl;
95  lhs.next();
96  rhs.next();
97  std::cout << lhs.depth() << " depth " << rhs.depth() << std::endl;
98  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
99  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
100  << std::endl;
101  return ret;
102 }
bool next()
set current node to the next node in the expanded tree
bool parent()
set the current node to the parent node ...
const N & name() const
Definition: DDBase.h:78
int depth() const
depth of the scope. 0 means unrestricted depth.
int copyno() const
Copy number associated with the current node.
bool firstChild()
set the current node to the first child ...
bool nextSibling()
set the current node to the next sibling ...
tuple cout
Definition: gather_cfg.py:121
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the expanded-view.
const std::string & name() const
Returns the name.
Definition: DDName.cc:87

Member Data Documentation

DDCompOptions DDCompareEPV::ddco_

Definition at line 31 of file DDCompareTools.h.