Salome HOME
Correct misprint
[modules/shaper.git] / src / SketchSolver / SolveSpaceSolver / SolveSpaceSolver_Storage.h
index a6646caa05dc5a198e9964c12a0fbed0300a83ea..c80763fb02e9c6b70150e0ee0f7d8971b0c3deb2 100644 (file)
@@ -1,8 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:    SolveSpaceSolver_Storage.h
-// Created: 18 Mar 2015
-// Author:  Artem ZHIDKOV
+// Copyright (C) 2014-2017  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
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
 
 #ifndef SolveSpaceSolver_Storage_H_
 #define SolveSpaceSolver_Storage_H_
@@ -19,7 +33,8 @@ typedef std::list< std::set<ConstraintWrapperPtr> >             SameConstraintMa
 
 /** \class   SolveSpaceSolver_Storage
  *  \ingroup Plugins
- *  \brief   Contains all necessary data in SolveSpace format to solve a single group of constraints
+ *  \brief   Contains all necessary data in SolveSpace format to solve a single 
+ *  group of constraints
  */
 class SolveSpaceSolver_Storage : public SketchSolver_Storage
 {
@@ -64,9 +79,6 @@ protected:
   /// \return \c true if the parameter has been removed
   virtual bool remove(ParameterWrapperPtr theParameter);
 
-  /// \brief Remove point-point coincidence
-  bool removeCoincidence(ConstraintWrapperPtr theConstraint);
-
   /// \brief Update the group for the given entity, its sub-entities and parameters
   virtual void changeGroup(EntityWrapperPtr theEntity, const GroupID& theGroup);
   /// \brief Update the group for the given parameter
@@ -112,17 +124,8 @@ public:
    *  \return \c true if the entity was successfully removed
    */
   bool removeEntity(const Slvs_hEntity& theEntityID);
-  /** \brief Remove all entities, which are not used in constraints
-   */
-  void removeUnusedEntities();
   /// \brief Returns the entity by its ID
   const Slvs_Entity& getEntity(const Slvs_hEntity& theEntityID) const;
-  /// \brief Makes a full copy of the given entity
-  Slvs_hEntity copyEntity(const Slvs_hEntity& theCopied);
-  /// \brief Copy one entity to another
-  void copyEntity(const Slvs_hEntity& theFrom, const Slvs_hEntity& theTo);
-  /// \brief Check the entity is used in constraints
-  bool isUsedByConstraints(const Slvs_hEntity& theEntityID) const;
   /// \brief Returns maximal ID of entities in this storage
   const Slvs_hEntity& entityMaxID() const
   { return myEntityMaxID; }
@@ -170,7 +173,8 @@ private:
   ///
   ///        These constraints may be different and become the same after the substitution
   ///        of point coincidence.
-  void addSameConstraints(ConstraintWrapperPtr theConstraint1, ConstraintWrapperPtr theConstraint2);
+  void addSameConstraints(ConstraintWrapperPtr theConstraint1,
+                          ConstraintWrapperPtr theConstraint2);
 
   /// \brief Search constraint equal to the given in terms of SolveSpace notation
   bool findSameConstraint(ConstraintWrapperPtr theConstraint);
@@ -178,16 +182,23 @@ private:
 private:
   Slvs_hEntity myWorkplaneID; ///< identifier of workplane
 
-  Slvs_hParam myParamMaxID; ///< current parameter index (may differs with the number of parameters)
-  std::vector<Slvs_Param> myParameters; ///< list of parameters used in the current group of constraints (sorted by the identifier)
+  /// current parameter index (may differs with the number of parameters)
+  Slvs_hParam myParamMaxID;
+
+  /// list of parameters used in the current group of constraints (sorted by the identifier)
+  std::vector<Slvs_Param> myParameters;
   Slvs_hEntity myEntityMaxID; ///< current entity index (may differs with the number of entities)
-  std::vector<Slvs_Entity> myEntities; ///< list of entities used in the current group of constraints (sorted by the identifier)
-  Slvs_hConstraint myConstrMaxID; ///< current constraint index (may differs with the number of constraints)
-  std::vector<Slvs_Constraint> myConstraints; ///< list of constraints used in the current group (sorted by the identifier)
 
-  bool myDuplicatedConstraint; ///< shows the storage has same constraint twice
+  /// list of entities used in the current group of constraints (sorted by the identifier)
+  std::vector<Slvs_Entity> myEntities;
+
+  /// current constraint index (may differs with the number of constraints)
+  Slvs_hConstraint myConstrMaxID;
 
-  std::set<Slvs_hParam> myUpdatedParameters; ///< list of just updated parameters (cleared when isNeedToResolve() called)
+  /// list of constraints used in the current group (sorted by the identifier)
+  std::vector<Slvs_Constraint> myConstraints;
+
+  bool myDuplicatedConstraint; ///< shows the storage has same constraint twice
 
   SameConstraintMap myEqualConstraints; ///< list of groups of equal constraints
 };