Salome HOME
Updated copyright comment
[modules/shaper.git] / src / SketchSolver / PlaneGCSSolver / PlaneGCSSolver_BooleanWrapper.cpp
index 225c4344f73e98ce386bafce57f52bed100774a6..55c1ba32edc08404b9b17a52f95d69071cbb4c26 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 
 #include <PlaneGCSSolver_BooleanWrapper.h>
 
+#include <ModelAPI_AttributeBoolean.h>
+
 PlaneGCSSolver_BooleanWrapper::PlaneGCSSolver_BooleanWrapper(bool theParam)
   : myValue(theParam)
 {
 }
+
+bool PlaneGCSSolver_BooleanWrapper::update(AttributePtr theAttribute)
+{
+  bool isUpdated = false;
+  AttributeBooleanPtr aBoolean =
+      std::dynamic_pointer_cast<ModelAPI_AttributeBoolean>(theAttribute);
+  if (aBoolean) {
+    isUpdated = value() != aBoolean->value();
+    setValue(aBoolean->value());
+  }
+  return isUpdated;
+}