X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_Tools.h;h=0b21a3c2eace9a55a4c442259fd127a57fee550e;hb=dc1f458b1518baeab0479275e47fd60d50bc18b7;hp=0646e23eb4865f7f3474f635f9f9e6e32f6f9781;hpb=5a82acff74697623112b76b67c0200945a3e9976;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_Tools.h b/src/ModelAPI/ModelAPI_Tools.h index 0646e23eb..0b21a3c2e 100755 --- a/src/ModelAPI/ModelAPI_Tools.h +++ b/src/ModelAPI/ModelAPI_Tools.h @@ -103,10 +103,11 @@ MODELAPI_EXPORT std::shared_ptr compositeOwner( /*! * Returns the result - parent of this result. * \param theSub the sub-element of composit result + * \param theRoot if it is true, returns the root father * \returns null if it is not sub-element of composite */ MODELAPI_EXPORT std::shared_ptr - bodyOwner(const std::shared_ptr& theSub); + bodyOwner(const std::shared_ptr& theSub, const bool theRoot = false); /*! * Returns index of this result in parent (if parent exists, returned by bodyOwner) * \returns zero-base index, or -1 if not found @@ -198,7 +199,12 @@ MODELAPI_EXPORT void getConcealedResults(const std::shared_ptr * (means that concealing result has user-defined name). */ MODELAPI_EXPORT std::pair getDefaultName( - const std::shared_ptr& theResult); + const std::shared_ptr& theResult, const bool theInherited = true); + +/*! Collect all parents for the given feature, including the Part + */ +MODELAPI_EXPORT std::set > + getParents(const std::shared_ptr& theFeature); } #endif