MCPcopy Create free account
hub / github.com/KDE/kdevelop / match

Method match

kdevplatform/language/duchain/ducontext.cpp:1569–1593  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1567}
1568
1569bool DUContext::SearchItem::match(const QualifiedIdentifier& id, int offset) const
1570{
1571 if (id.isEmpty()) {
1572 if (identifier.isEmpty() && next.isEmpty())
1573 return true;
1574 else
1575 return false;
1576 }
1577
1578 if (id.at(offset) != identifier) //The identifier is different
1579 return false;
1580
1581 if (offset == id.count() - 1) {
1582 if (next.isEmpty())
1583 return true; //match
1584 else
1585 return false; //id is too short
1586 }
1587
1588 for (int a = 0; a < next.size(); ++a)
1589 if (next[a]->match(id, offset + 1))
1590 return true;
1591
1592 return false;
1593}
1594
1595bool DUContext::SearchItem::isEmpty() const
1596{

Callers

nothing calls this directly

Calls 4

isEmptyMethod · 0.45
atMethod · 0.45
countMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected