Salome HOME
Improve angle measurement
[modules/shaper.git] / src / ModelAPI / ModelAPI_Tools.h
index ca3a1d1d8fc8eb55df3b1b687d04e8d37c6dcadb..907cc7b974a9df0f996c51c699a4024566878418 100755 (executable)
@@ -107,6 +107,11 @@ MODELAPI_EXPORT std::shared_ptr<ModelAPI_CompositeFeature> compositeOwner(
  */
 MODELAPI_EXPORT std::shared_ptr<ModelAPI_ResultCompSolid> compSolidOwner(
                                             const std::shared_ptr<ModelAPI_Result>& theSub);
+/*!
+ * Returns index of this result in parent (if parent exists, returned by compSolidOwner)
+ * \returns zero-base index, or -1 if not found
+ */
+MODELAPI_EXPORT int compSolidIndex(const std::shared_ptr<ModelAPI_Result>& theSub);
 
 /*!
 * Returns true if the result contains a not empty list of sub results.
@@ -181,6 +186,18 @@ MODELAPI_EXPORT void findRefsToFeatures(
 */
 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.
+ *  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 int theResultIndex);
+
+/*! Return the default name of the result according to name of the feature.
+ */
+MODELAPI_EXPORT std::string getDefaultName(const std::shared_ptr<ModelAPI_Result>& theResult);
 }
 
 #endif