MCPcopy Create free account
hub / github.com/KDE/labplot / isDescendantOf

Method isDescendantOf

src/backend/core/AbstractAspect.cpp:486–496  ·  view source on GitHub ↗

* \brief Return whether the there is a path upwards to the given aspect * * This also returns true if other==this. */

Source from the content-addressed store, hash-verified

484 * This also returns true if other==this.
485 */
486bool AbstractAspect::isDescendantOf(AbstractAspect* other) {
487 if (other == this)
488 return true;
489 AbstractAspect* parent_aspect = parentAspect();
490 while (parent_aspect) {
491 if (parent_aspect == other)
492 return true;
493 parent_aspect = parent_aspect->parentAspect();
494 }
495 return false;
496}
497
498/**
499 * \brief Return the Project this Aspect belongs to, or 0 if it is currently not part of one.

Callers 1

Calls 1

parentAspectMethod · 0.80

Tested by

no test coverage detected