/// \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.