Salome HOME
Deleted check after build for transformations.
[modules/shaper.git] / src / SketchSolver / SketchSolver_IEntityWrapper.h
index 15735e73358a4ea15a7d4ae2da0a4a4950349c52..41f561ababe49b81ddf23ef6ce9a9734d699f9f2 100644 (file)
@@ -8,7 +8,6 @@
 #define SketchSolver_IEntityWrapper_H_
 
 #include <SketchSolver.h>
-#include <SketchSolver_IParameterWrapper.h>
 
 #include <ModelAPI_Attribute.h>
 #include <ModelAPI_Feature.h>
@@ -22,11 +21,9 @@ enum SketchSolver_EntityType {
   ENTITY_SCALAR,
   ENTITY_ANGLE,
   ENTITY_POINT,
-  ENTITY_NORMAL,
   ENTITY_LINE,
   ENTITY_CIRCLE,
-  ENTITY_ARC,
-  ENTITY_SKETCH
+  ENTITY_ARC
 };
 
 /**
@@ -35,65 +32,19 @@ enum SketchSolver_EntityType {
 class SketchSolver_IEntityWrapper
 {
 public:
+  SketchSolver_IEntityWrapper() : myExternal(false) {}
   virtual ~SketchSolver_IEntityWrapper() {}
 
-  /// \brief Return base feature
-  const FeaturePtr& baseFeature() const
-  { return myBaseFeature; }
-  /// \brief Return base attribute
-  const AttributePtr& baseAttribute() const
-  { return myBaseAttribute; }
-
-  /// \brief Check the feature is basis for this wrapper
-  bool isBase(FeaturePtr theFeature) const
-  { return myBaseFeature && myBaseFeature == theFeature; }
-  /// \brief Check the attribute is basis for this wrapper
-  bool isBase(AttributePtr theAttribute) const
-  { return myBaseAttribute && myBaseAttribute == theAttribute; }
-
-  /// \brief Assign list of parameters for this entity
-  void setParameters(const std::list<ParameterWrapperPtr>& theParams)
-  { myParameters = theParams; }
-  /// \brief Return list of parameters
-  const std::list<ParameterWrapperPtr>& parameters() const
-  { return myParameters; }
-
-  /// \brief Assign list of sub-entities
-  void setSubEntities(const std::list<std::shared_ptr<SketchSolver_IEntityWrapper> >& theEntities)
-  { mySubEntities = theEntities; }
-  /// \brief Return list of sub-entities
-  const std::list<std::shared_ptr<SketchSolver_IEntityWrapper> >& subEntities() const
-  { return mySubEntities; }
-
-  /// \brief Return ID of current entity
-  virtual EntityID id() const = 0;
-
-  /// \brief Change group for the entity
-  virtual void setGroup(const GroupID& theGroup) = 0;
-  /// \brief Return identifier of the group the entity belongs to
-  virtual GroupID group() const = 0;
-
   /// \brief Return type of current entity
   virtual SketchSolver_EntityType type() const = 0;
 
-  /// \brief Verify the feature is used in the entity
-  virtual bool isUsed(FeaturePtr theFeature) const = 0;
-  /// \brief Verify the attribute is used in the entity
-  virtual bool isUsed(AttributePtr theAttribute) const = 0;
-
-  /// \brief Compare current entity with other
-  virtual bool isEqual(const std::shared_ptr<SketchSolver_IEntityWrapper>& theOther) = 0;
-
-  /// \brief Update values of parameters of this entity by the parameters of given one
-  /// \return \c true if some parameters change their values
-  virtual bool update(const std::shared_ptr<SketchSolver_IEntityWrapper>& theOther) = 0;
-
-protected:
-  FeaturePtr   myBaseFeature;
-  AttributePtr myBaseAttribute;
+  /// \brief Change flag indicating the entity cannot be changed in the solver
+  void setExternal(bool theExternal) { myExternal = theExternal; }
+  /// \brief Return the External flag
+  bool isExternal() const { return myExternal; }
 
-  std::list<ParameterWrapperPtr>                            myParameters;
-  std::list<std::shared_ptr<SketchSolver_IEntityWrapper> >  mySubEntities;
+private:
+  bool myExternal;
 };
 
 typedef std::shared_ptr<SketchSolver_IEntityWrapper> EntityWrapperPtr;