X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FPlaneGCSSolver%2FPlaneGCSSolver_EntityWrapper.h;h=628344913306d963b1c05ca2bb16bc243796d1b0;hb=87447545000c44e455431ed0d401f850f373374e;hp=b9a3981d075b73570e3bb8b5ccc6f8f70d790c95;hpb=fe3678a85238df2b57ea18b341003ebef176e287;p=modules%2Fshaper.git diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EntityWrapper.h b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EntityWrapper.h index b9a3981d0..628344913 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EntityWrapper.h +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EntityWrapper.h @@ -1,20 +1,35 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: PlaneGCSSolver_EntityWrapper.h -// Created: 30 Nov 2015 -// Author: Artem ZHIDKOV +// Copyright (C) 2014-2020 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 PlaneGCSSolver_EntityWrapper_H_ #define PlaneGCSSolver_EntityWrapper_H_ #include -#include -#include - -#include +#include #include +class ModelAPI_Attribute; + +class PlaneGCSSolver_EntityWrapper; +typedef std::shared_ptr EntityWrapperPtr; + /** * Wrapper providing operations with entities regardless the solver. */ @@ -32,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& theAttribues) + { myAdditionalAttributes = theAttribues; } + /// \brief Return the list of additional attributes + const std::map& 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 theAttribute) + { return false; } + + friend class PlaneGCSSolver_AttributeBuilder; + private: bool myExternal; + std::map myAdditionalAttributes; }; -typedef std::shared_ptr EntityWrapperPtr; - #endif