Salome HOME
SketchSolver Refactoring: Eliminate SolveSpace as a sketch solver.
[modules/shaper.git] / src / SketchSolver / PlaneGCSSolver / PlaneGCSSolver_UpdateFeature.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:    PlaneGCSSolver_UpdateFeature.cpp
4 // Created: 17 Feb 2017
5 // Author:  Artem ZHIDKOV
6
7 #include <PlaneGCSSolver_UpdateFeature.h>
8 #include <SketchSolver_Constraint.h>
9
10 void PlaneGCSSolver_UpdateFeature::attach(SketchSolver_Constraint* theObserver, const std::string& theType)
11 {
12   if (theType == GROUP())
13     myObservers.push_back(theObserver);
14   else
15     myNext->attach(theObserver, theType);
16 }
17
18 void PlaneGCSSolver_UpdateFeature::update(const FeaturePtr& theFeature)
19 {
20   std::list<SketchSolver_Constraint*>::iterator anIt = myObservers.begin();
21   for (; anIt != myObservers.end(); ++anIt)
22     (*anIt)->notify(theFeature, this);
23 }