CMS 3D CMS Logo

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 37 of file DDCompareTools.h.

Constructor & Destructor Documentation

DDCompareEPV::DDCompareEPV ( )

Definition at line 17 of file DDCompareTools.cc.

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

Definition at line 19 of file DDCompareTools.cc.

19 : ddco_(ddco) { }
DDCompOptions ddco_

Member Function Documentation

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

Definition at line 21 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(), and DDExpandedView::parent().

21  {
22  bool ret(true);
23  /* struct DDCompareCPVGraph : public std::binary_function<DDCompactView::graph_type, DDCompactView::graph_type, bool> { */
24  /* bool operator()(const DDCompactView::graph_type& lhs, const DDCompactView::graph_type& rhs) const { */
25  /* bool ret; */
26  // const graph<DDLogicalPart, DDPosData*>& g1= lhs;
27  // graph<DDLogicalPart, DDPosData*>::const_iterator beg1 = g1.begin();
28  //DDCompactView::graph_type::const_iterator beg1 = lhs.begin();
29  /* std::cout << "size of lhs = " << lhs.edge_size() << std::endl; */
30  /* std::cout << "size of rhs = " << rhs.edge_size() << std::endl; */
31  /* std::cout << "iterating over lhs edges?" << std::endl; */
32  /* graph<DDLogicalPart, DDPosData*>::const_iterator beg1(lhs), end1(lhs); */
33  /* beg1 = lhs.begin_iter(); */
34  /* end1 = lhs.end_iter(); */
35  /* size_t countem(0); */
36  /* for ( ; beg1 != end1 ; ++beg1 ) { */
37  /* ++countem; */
38  /* } */
39  /* std::cout << "between lhs.begin_iter() and lhs.end_iter() there are " << countem << std::endl; */
40  /* graph<DDLogicalPart,DDPosData*>::const_edge_range cer = lhs.graph().edges(lhs.root()); */
41  /* graph<DDLogicalPart,DDPosData*>::adj_iterator i = const_edge_range.first */
42  // DDExpandedView v1(lhs), v2(rhs);
43  // if (v1.next()) std::cout << "v1 is true" << std::endl;
44  // if (v2.next()) std::cout << "v2 is true" << std::endl;
45  // DDNodeComparator ddnc;
46  //if ( ddnc (v1, v2) ) {
47  // ret = true;
48  //}
49  /* while (v1.next()) { */
50  /* if (v2.next()) { */
51  /* std::cout << v1.logicalPart().name().name() << ":" << v1.copyno() */
52  /* << " !=? " << v2.logicalPart().name().name() << ":" << v2.copyno() */
53  /* << std::endl; */
54 
55  /* if ( v1.logicalPart().name().name() != v2.logicalPart().name().name() ) { */
56  /* std::cout << v1.logicalPart().name().name() << ":" << v1.copyno() */
57  /* << " !=? " << v2.logicalPart().name().name() << ":" << v2.copyno() */
58  /* << std::endl; */
59  /* // std::cout << v1.logicalPart().name().name() << " !=? " << v2.logicalPart().name().name() << std::endl; */
60  /* ret=false; */
61  /* break; */
62  /* } */
63  /* } */
64  /* } */
65  std::cout <<"*********FIRST BY firstChild, firstChild, nextSibling, nextSibling*********" << std::endl;
66  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
67  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
68  << std::endl;
69  lhs.firstChild();
70  rhs.firstChild();
71  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
72  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
73  << std::endl;
74  lhs.firstChild();
75  rhs.firstChild();
76  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
77  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
78  << std::endl;
79  lhs.nextSibling();
80  rhs.nextSibling();
81  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
82  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
83  << std::endl;
84  lhs.nextSibling();
85  rhs.nextSibling();
86  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
87  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
88  << std::endl;
89  lhs.parent();
90  rhs.parent();
91  std::cout <<"*********THEN BY next, next, next, next*********" << std::endl;
92  lhs.parent();
93  rhs.parent();
94  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
95  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
96  << std::endl;
97  lhs.next();
98  rhs.next();
99  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
100  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
101  << std::endl;
102  lhs.next();
103  rhs.next();
104  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
105  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
106  << std::endl;
107  std::cout << lhs.depth() << " depth " << rhs.depth() << std::endl;
108  lhs.next();
109  rhs.next();
110  std::cout << lhs.depth() << " depth " << rhs.depth() << std::endl;
111  std::cout << lhs.logicalPart().name().name() << ":" << lhs.copyno()
112  << " !=? " << rhs.logicalPart().name().name() << ":" << rhs.copyno()
113  << std::endl;
114  return ret;
115 }
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 ...
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:90

Member Data Documentation

DDCompOptions DDCompareEPV::ddco_

Definition at line 41 of file DDCompareTools.h.