1 // Copyright (C) 2017-20xx CEA/DEN, EDF R&D
3 // File: PlaneGCSSolver_UpdateCoincidence.h
4 // Created: 17 Feb 2017
5 // Author: Artem ZHIDKOV
7 #ifndef PlaneGCSSolver_UpdateCoincidence_H_
8 #define PlaneGCSSolver_UpdateCoincidence_H_
10 #include <PlaneGCSSolver_Update.h>
11 #include <SketchSolver_IEntityWrapper.h>
13 /** \class PlaneGCSSolver_UpdateCoincidence
15 * \brief Send events to listeners about changing a constraint
17 class PlaneGCSSolver_UpdateCoincidence : public PlaneGCSSolver_Update
20 PlaneGCSSolver_UpdateCoincidence(UpdaterPtr theNext = UpdaterPtr())
21 : PlaneGCSSolver_Update(theNext)
24 virtual ~PlaneGCSSolver_UpdateCoincidence() {}
26 /// \brief Group of entities, processed by this kind of updater
27 static const std::string& GROUP()
29 static const std::string TYPE("Coincidence");
33 /// \brief Attach listener
34 /// \param theObserver [in] object which want to receive notifications
35 /// \param theType [in] receive notifications about changing objects
36 /// of theType and their derivatives
37 virtual void attach(SketchSolver_Constraint* theObserver, const std::string& theType) override;
39 /// \brief Send notification about update of the feature to all interested
40 virtual void update(const FeaturePtr& theFeature) override;
42 /// \brief Verifies the entities are not coincident yet
43 /// \return \c true if the entities does not coincident
44 bool checkCoincidence(const EntityWrapperPtr& theEntity1, const EntityWrapperPtr& theEntity2);
47 std::list<std::set<EntityWrapperPtr> > myCoincident; ///< list of coincidences