* \brief Return whether the there is a path upwards to the given aspect * * This also returns true if other==this. */
| 484 | * This also returns true if other==this. |
| 485 | */ |
| 486 | bool 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. |
no test coverage detected