diff --git a/include/ncpp/Plane.hh b/include/ncpp/Plane.hh index 728107068..d4e190848 100644 --- a/include/ncpp/Plane.hh +++ b/include/ncpp/Plane.hh @@ -321,6 +321,25 @@ namespace ncpp return reparent (const_cast(&newparent)); } + Plane* reparent_family (Plane *newparent = nullptr) const noexcept + { + ncplane *ret = ncplane_reparent_family (plane, newparent == nullptr ? nullptr : newparent->plane); + if (ret == nullptr) + return nullptr; + + return map_plane (ret); + } + + Plane* reparent_family (const Plane *newparent) const noexcept + { + return reparent_family (const_cast(newparent)); + } + + Plane* reparent_family (const Plane &newparent) const noexcept + { + return reparent_family (const_cast(&newparent)); + } + void home () const noexcept { ncplane_home (plane);