Salome HOME
28c306244274a6bb8fa61ffc17aad13451a565fb
[modules/shaper.git] / src / SketchSolver / PlaneGCSSolver / PlaneGCSSolver_UpdateFeature.h
1 // Copyright (C) 2014-2021  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef PlaneGCSSolver_UpdateFeature_H_
21 #define PlaneGCSSolver_UpdateFeature_H_
22
23 #include <PlaneGCSSolver_Update.h>
24
25 /** \class   PlaneGCSSolver_UpdateFeature
26  *  \ingroup Plugins
27  *  \brief   Send events to listeners about changing a feature
28  */
29 class PlaneGCSSolver_UpdateFeature : public PlaneGCSSolver_Update
30 {
31 public:
32   PlaneGCSSolver_UpdateFeature(UpdaterPtr theNext = UpdaterPtr())
33     : PlaneGCSSolver_Update(theNext)
34   {}
35
36   /// \brief Group of entities, processed by this kind of updater
37   static const std::string& GROUP()
38   {
39     static const std::string TYPE("Feature");
40     return TYPE;
41   }
42
43   /// \brief Attach listener
44   /// \param theObserver [in]  object which want to receive notifications
45   /// \param theType     [in]  receive notifications about changing objects
46   ///                          of theType and their derivatives
47   virtual void attach(SketchSolver_Constraint* theObserver, const std::string& theType);
48
49   /// \brief Send notification about update of the feature to all interested
50   virtual void update(const FeaturePtr& theFeature);
51 };
52
53 #endif