]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_ScalarArrayWrapper.cpp
Salome HOME
updated copyright message
[modules/shaper.git] / src / SketchSolver / PlaneGCSSolver / PlaneGCSSolver_ScalarArrayWrapper.cpp
index b599f8fbda2986e0f801e7ba8d0d9e4ee301bfc3..242e26359d7c4a89cb00d436b687e243f77799cb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2019-2023  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_ScalarArrayWrapper.h>
+#include <PlaneGCSSolver_Tools.h>
 
 PlaneGCSSolver_ScalarArrayWrapper::PlaneGCSSolver_ScalarArrayWrapper(const GCS::VEC_pD& theParam)
   : myValue(theParam)
 {
 }
+
+bool PlaneGCSSolver_ScalarArrayWrapper::update(AttributePtr theAttribute)
+{
+  bool isUpdated = false;
+  PlaneGCSSolver_Tools::AttributeArray anArray(theAttribute);
+  if (anArray.isInitialized() && anArray.size() == (int)myValue.size()) {
+    for (int anIndex = 0; anIndex < anArray.size(); ++anIndex) {
+      isUpdated = PlaneGCSSolver_Tools::updateValue(anArray.value(anIndex), *(myValue[anIndex]))
+          || isUpdated;
+    }
+  }
+  return isUpdated;
+}