+MODELAPI_EXPORT std::shared_ptr<ModelAPI_CompositeFeature> compositeOwner(
+ const std::shared_ptr<ModelAPI_Feature>& theFeature);
+
+/*!
+ * 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<ModelAPI_ResultBody>
+ bodyOwner(const std::shared_ptr<ModelAPI_Result>& 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
+ */
+MODELAPI_EXPORT int bodyIndex(const std::shared_ptr<ModelAPI_Result>& theSub);
+
+/*!
+* Returns true if the result contains a not empty list of sub results.
+* It processes result compsolid.
+* \param theResult a result object
+* \returns boolean value
+*/
+MODELAPI_EXPORT bool hasSubResults(const std::shared_ptr<ModelAPI_Result>& theResult);
+
+/*!
+* collects recursively all subs of the given result
+*/
+MODELAPI_EXPORT void allSubs(const std::shared_ptr<ModelAPI_ResultBody>& theResult,
+ std::list<std::shared_ptr<ModelAPI_Result> >& theResults,
+ const bool theLowerOnly = false);
+
+/*!
+* Adds the results of the given feature to theResults list: including disabled and sub-results
+*/
+MODELAPI_EXPORT void allResults(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ std::list<std::shared_ptr<ModelAPI_Result> >& theResults);
+
+/*!
+ Returns true if there are no parts in the document, which are not activated
+ \param theNotActivatedNames out string which contains not activated names
+ \return a boolean value
+ */
+MODELAPI_EXPORT bool allDocumentsActivated(std::string& theNotActivatedNames);
+
+/*! Removes features from the document
+* \param theFeatures a list of features to be removed
+* \param theFlushRedisplay a boolean value if the redisplay signal should be flushed
+* \return true if at least one feature is removed
+*/
+MODELAPI_EXPORT bool removeFeaturesAndReferences(
+ const std::set<std::shared_ptr<ModelAPI_Feature> >& theFeatures,
+ const bool theFlushRedisplay = false,
+ const bool theUseComposite = false,
+ const bool theUseRecursion = true);
+
+/*! Removes features from the document
+* \param theFeatures a list of features to be removed
+* \param theFlushRedisplay a boolean value if the redisplay signal should be flushed
+* \return true if at least one feature is removed
+*/
+MODELAPI_EXPORT bool removeFeatures(
+ const std::set<std::shared_ptr<ModelAPI_Feature> >& theFeatures,
+ const bool theFlushRedisplay);
+
+/*! Build a map of references for the given set of features
+* \param theFeatures a list of features
+* \param theReferences a map of all references to the features
+* \param theUseComposite state if the composite features of the reference should be in the map
+* \param theUseRecursion state if references for features out of the sources feature
+ list are put into the result container. E.g. if theFeatures contains "Sketch_2", map will
+ contain references to this feature also.
+*/
+MODELAPI_EXPORT void findAllReferences(
+ const std::set<std::shared_ptr<ModelAPI_Feature> >& theFeatures,
+ std::map<std::shared_ptr<ModelAPI_Feature>,
+ std::set<std::shared_ptr<ModelAPI_Feature> > >& theReferences,
+ const bool theUseComposite = true,
+ const bool theUseRecursion = true);
+
+/*! In the map of references find all features referenced to the source feature
+* \param theFeatures a list of features to find references
+* \param theReferences a map of all references to the features
+* \param theFeaturesRefsTo an out list of referenced features
+*/
+MODELAPI_EXPORT void findRefsToFeatures(
+ const std::set<std::shared_ptr<ModelAPI_Feature> >& aFeatures,
+ const std::map<std::shared_ptr<ModelAPI_Feature>,
+ std::set<std::shared_ptr<ModelAPI_Feature> > >& aReferences,
+ std::set<std::shared_ptr<ModelAPI_Feature> >& aFeaturesRefsTo);
+
+/*! Finds referenced of the feature to objects and collects concealed results.
+* \param theFeatures a model feature
+* \param theResults container for concealed results. It has no duplications
+*/
+MODELAPI_EXPORT void getConcealedResults(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ std::list<std::shared_ptr<ModelAPI_Result> >& theResults);
+
+/*! Return the default name of the result according the features it depends or name of the feature.
+ * Return also whether the name is get from the concealing result of parent object
+ * (means that concealing result has user-defined name).
+ */
+MODELAPI_EXPORT std::pair<std::string, bool> getDefaultName(
+ const std::shared_ptr<ModelAPI_Result>& theResult, const bool theInherited = true);
+
+/*! Collect all parents for the given feature, including the Part
+ */
+MODELAPI_EXPORT std::set<std::shared_ptr<ModelAPI_Feature> >
+ getParents(const std::shared_ptr<ModelAPI_Feature>& theFeature);