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

Method parent

src/backend/core/AbstractAspect.cpp:445–454  ·  view source on GitHub ↗

* \brief In the parent-child hierarchy, return the first parent of type \param type or null pointer if there is none. */

Source from the content-addressed store, hash-verified

443 * \brief In the parent-child hierarchy, return the first parent of type \param type or null pointer if there is none.
444 */
445AbstractAspect* AbstractAspect::parent(AspectType type) const {
446 AbstractAspect* parent = parentAspect();
447 if (!parent)
448 return nullptr;
449
450 if (parent->inherits(type))
451 return parent;
452
453 return parent->parent(type);
454}
455
456/**
457 * \brief Return my parent Aspect or 0 if I currently don't have one.

Callers

nothing calls this directly

Calls 1

inheritsMethod · 0.80

Tested by

no test coverage detected