]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModelAPI/ModelAPI_Tools.h
Salome HOME
Merge branch 'cadbld'
[modules/shaper.git] / src / ModelAPI / ModelAPI_Tools.h
index 29f6554845cfe8a9b6bda6dea97a4756d95992d2..904b82132671fdd1dc329b2ed8d697ff6fcf7f40 100644 (file)
@@ -21,6 +21,7 @@
 #define ModelAPI_Tools_HeaderFile
 
 #include "ModelAPI.h"
+#include <ModelAPI_AttributeSelectionList.h>
 
 class ModelAPI_CompositeFeature;
 class ModelAPI_Document;
@@ -324,6 +325,13 @@ MODELAPI_EXPORT void setTransparency(std::shared_ptr<ModelAPI_Result> theResult,
 MODELAPI_EXPORT void copyVisualizationAttrs(std::shared_ptr<ModelAPI_Result> theSource,
                                             std::shared_ptr<ModelAPI_Result> theDest);
 
+/*! Copies image attribute from one result to another.
+* \param theSource a result that contains the image data
+* \param theDest a destination result that takes the image data
+*/
+MODELAPI_EXPORT void copyImageAttribute(std::shared_ptr<ModelAPI_Result> theSource,
+                                        std::shared_ptr<ModelAPI_Result> theDest);
+
 /*! Produces list of features that reference to the given target (directly or through sub-results)
 * \param theTarget the referenced result
 * \param theFeatureKind the resulting features filter: the feature kind or all for the empty string
@@ -333,6 +341,12 @@ MODELAPI_EXPORT std::list<std::shared_ptr<ModelAPI_Feature> > referencedFeatures
   std::shared_ptr<ModelAPI_Result> theTarget, const std::string& theFeatureKind,
   const bool theSortResults);
 
+/*!
+ * Returns true if something in selection is presented in the results list
+ */
+MODELAPI_EXPORT bool isInResults(AttributeSelectionListPtr theSelection,
+                                 const std::list<ResultPtr>& theResults,
+                                 std::set<ResultPtr>& theCashedResults);
 
 /*! Returns a container with the current color value.
 *   These are tree int values for RGB definition.