X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FSketchSolver_Storage.h;h=8017703488077d7add53fd5d4859fd7eb992a3e6;hb=e675b9eb8df755fff9763560ddf36d5bfeb6fe35;hp=8c227cba5e23f8e0c4bc893bf00e5da6b6aeb86f;hpb=e066abaa17e20d15934c0c83cdd8de07ffd93122;p=modules%2Fshaper.git diff --git a/src/SketchSolver/SketchSolver_Storage.h b/src/SketchSolver/SketchSolver_Storage.h index 8c227cba5..801770348 100644 --- a/src/SketchSolver/SketchSolver_Storage.h +++ b/src/SketchSolver/SketchSolver_Storage.h @@ -1,17 +1,30 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: SketchSolver_Storage.h -// Created: 30 Nov 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 +// #ifndef SketchSolver_Storage_H_ #define SketchSolver_Storage_H_ -#include -#include -#include -#include +#include +#include +#include #include #include @@ -44,10 +57,10 @@ public: virtual void addConstraint(ConstraintPtr theConstraint, ConstraintWrapperPtr theSolverConstraint); - /// \brief Add list of temporary constraints which will be destroyed + /// \brief Add a movement constraint which will be destroyed /// after the next solving of the set of constraints. /// \param theSolverConstraint [in] solver's constraint - virtual void addTemporaryConstraint(const ConstraintWrapperPtr& theSolverConstraint) = 0; + virtual void addMovementConstraint(const ConstraintWrapperPtr& theSolverConstraint) = 0; /// \brief Change mapping feature from SketchPlugin and /// the entity applicable for corresponding solver. @@ -83,6 +96,11 @@ public: /// \brief Returns entity related to corresponding attribute const EntityWrapperPtr& entity(const AttributePtr& theAttribute) const; + /// \brief Make entity external + virtual void makeExternal(const EntityWrapperPtr& theEntity) = 0; + /// \brief Make entity non-external + virtual void makeNonExternal(const EntityWrapperPtr& theEntity) = 0; + /// \brief Removes constraint from the storage /// \return \c true if the constraint and all its parameters are removed successfully virtual bool removeConstraint(ConstraintPtr theConstraint) = 0; @@ -94,11 +112,11 @@ public: /// \brief Remove all features became invalid virtual void removeInvalidEntities() = 0; - /// \brief Check the features is not removed - bool isConsistent() const; + /// \brief Check the features have not been removed + bool areFeaturesValid() const; /// \brief Check the storage has constraints - bool isEmpty() const + virtual bool isEmpty() const { return myConstraintMap.empty(); } /// \brief Shows the sketch should be resolved @@ -108,8 +126,6 @@ public: void setNeedToResolve(bool theFlag) { myNeedToResolve = theFlag; } - /// \brief Initialize solver by constraints, entities and parameters - virtual void initializeSolver() = 0; /// \brief Return list of conflicting constraints std::set getConflictingConstraints(SolverPtr theSolver) const;