]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EntityWrapper.h
Salome HOME
updated copyright message
[modules/shaper.git] / src / SketchSolver / PlaneGCSSolver / PlaneGCSSolver_EntityWrapper.h
index 0d224cbdb017bdd434389665fa2e8abb3e66263b..b0f35735eaca30c11683d209b5ca74233c88ae8f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 
 #include <PlaneGCSSolver_Defs.h>
 
-#include <ModelAPI_Attribute.h>
-#include <ModelAPI_Feature.h>
-
-#include <list>
+#include <map>
 #include <memory>
 
+class ModelAPI_Attribute;
+
+class PlaneGCSSolver_EntityWrapper;
+typedef std::shared_ptr<PlaneGCSSolver_EntityWrapper> EntityWrapperPtr;
+
 /**
  *  Wrapper providing operations with entities regardless the solver.
  */
@@ -45,10 +47,24 @@ public:
   /// \brief Return the External flag
   bool isExternal() const { return myExternal; }
 
+  /// \brief Store names of attributes and their values if necessary
+  void setAdditionalAttributes(const std::map<std::string, EntityWrapperPtr>& theAttribues)
+  { myAdditionalAttributes = theAttribues; }
+  /// \brief Return the list of additional attributes
+  const std::map<std::string, EntityWrapperPtr>& additionalAttributes() const
+  { return myAdditionalAttributes; }
+
+protected:
+  /// \brief Update entity by the values of theAttribute
+  /// \return \c true if any value of attribute is not equal to the stored in the entity
+  virtual bool update(std::shared_ptr<ModelAPI_Attribute> theAttribute)
+  { return false; }
+
+  friend class PlaneGCSSolver_AttributeBuilder;
+
 private:
   bool myExternal;
+  std::map<std::string, EntityWrapperPtr> myAdditionalAttributes;
 };
 
-typedef std::shared_ptr<PlaneGCSSolver_EntityWrapper> EntityWrapperPtr;
-
 #endif