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

Method folder

src/backend/core/AbstractAspect.cpp:472–479  ·  view source on GitHub ↗

* \brief Return the folder the Aspect is contained in or 0 if there is none. * * The returned folder may be the aspect itself if it inherits Folder. */

Source from the content-addressed store, hash-verified

470 * The returned folder may be the aspect itself if it inherits Folder.
471 */
472Folder* AbstractAspect::folder() {
473 if (inherits(AspectType::Folder))
474 return static_cast<class Folder*>(this);
475 AbstractAspect* parent_aspect = parentAspect();
476 while (parent_aspect && !parent_aspect->inherits(AspectType::Folder))
477 parent_aspect = parent_aspect->parentAspect();
478 return static_cast<class Folder*>(parent_aspect);
479}
480
481/**
482 * \brief Return whether the there is a path upwards to the given aspect

Callers 3

addAspectToProjectMethod · 0.80

Calls 2

inheritsMethod · 0.80
parentAspectMethod · 0.80

Tested by

no test coverage detected