MCPcopy Create free account
hub / github.com/KLayout/klayout / equals

Method equals

src/laybasic/laybasic/gtf.cc:527–558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

525 }
526
527 bool equals (const LogEventBase &b) const
528 {
529 const LogTargetedEvent *be = dynamic_cast <const LogTargetedEvent *> (&b);
530 if (! be) {
531 return false;
532 }
533
534 std::string name1, name2, cls1, cls2;
535 int nwidget1, nwidget2;
536 bool more1, more2;
537
538 tl::Extractor ex1 (m_target.c_str ());
539 tl::Extractor ex2 (be->m_target.c_str ());
540 do {
541
542 more1 = extract_widget_path (ex1, name1, cls1, nwidget1);
543 more2 = extract_widget_path (ex2, name2, cls2, nwidget2);
544
545 if (name1 != name2) {
546 return false;
547 }
548
549 // transition from non-class to class-based spec.:
550 if (cls1.empty () == cls2.empty ()) {
551 if (nwidget1 != nwidget2) {
552 return false;
553 }
554 }
555
556 } while (more1 && more2);
557 return !more1 && !more2;
558 }
559
560 QWidget *target_widget () const
561 {

Callers

nothing calls this directly

Calls 3

extract_widget_pathFunction · 0.85
c_strMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected