Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_RefAttr.cpp
index ad32819b320aa9528358a2228f7daf5366328466..d018517e23f8262bff3c073c0f4e05bc7dd673e0 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <ModelAPI_AttributeRefAttr.h>
 #include <ModelAPI_AttributeRefAttrList.h>
+#include <ModelAPI_Events.h>
 #include <ModelAPI_Feature.h>
 #include <ModelAPI_Result.h>
 #include "ModelHighAPI_Interface.h"
@@ -81,3 +82,13 @@ bool ModelHighAPI_RefAttr::isEmpty() const
 {
   return !(myAttribute && myObject);
 }
+
+//--------------------------------------------------------------------------------------
+void ModelHighAPI_RefAttr::fillMessage(
+    const std::shared_ptr<ModelAPI_ObjectMovedMessage>& theMessage) const
+{
+  switch (myVariantType) {
+  case VT_ATTRIBUTE: theMessage->setMovedAttribute(myAttribute); return;
+  case VT_OBJECT: theMessage->setMovedObject(myObject); return;
+  }
+}