]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_Tools.h
Salome HOME
Issue #1037 Time performance on a big model: do not perform validating for objects...
[modules/shaper.git] / src / ModuleBase / ModuleBase_Tools.h
index fd70f33fbfa0a94618b87a3e5eab12e765231387..a9b38bd8055a11c701f88a01f9cbfd789ad48ddd 100755 (executable)
@@ -187,10 +187,25 @@ MODULEBASE_EXPORT std::string findGreedAttribute(ModuleBase_IWorkshop* theWorksh
 /// \param theWorkshop to find an attribute for the given shape for attribute reference
 /// \param theTemporarily if it is true, do not store and name the added in the data framework
 ///        It is useful for attribute selection
+MODULEBASE_EXPORT bool hasObject(const AttributePtr& theAttribute, const ObjectPtr& theObject,
+                                 const std::shared_ptr<GeomAPI_Shape>& theShape,
+                                 ModuleBase_IWorkshop* theWorkshop,
+                                 const bool theTemporarily);
+
+/// Set the object to the attribute depending on the attribute type. If it is a list,
+/// the values are appended if they are not in the list yet.
+/// \param theAttribute an attribute where the object and shape are set
+/// \param theObject an object
+/// \param theShape a shape
+/// \param theWorkshop to find an attribute for the given shape for attribute reference
+/// \param theTemporarily if it is true, do not store and name the added in the data framework
+/// \param theCheckIfAttributeHasObject if it is true, the check isInList is called
+///        It is useful for attribute selection
 MODULEBASE_EXPORT void setObject(const AttributePtr& theAttribute, const ObjectPtr& theObject,
                                  const std::shared_ptr<GeomAPI_Shape>& theShape,
                                  ModuleBase_IWorkshop* theWorkshop,
-                                 const bool theTemporarily = false);
+                                 const bool theTemporarily,
+                                 const bool theCheckIfAttributeHasObject);
 
 /// Returns the shape of the attribute. If the attribute is AttributeRefAttrPtr, the shape is found
 /// using current module of the given workshop.