Salome HOME
Remove 'override' keyword due to non-supported by old version of GCC
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintMirror.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:    SketchSolver_ConstraintMirror.h
4 // Created: 1 Apr 2015
5 // Author:  Artem ZHIDKOV
6
7 #ifndef SketchSolver_ConstraintMirror_H_
8 #define SketchSolver_ConstraintMirror_H_
9
10 #include "SketchSolver.h"
11 #include <SketchSolver_Constraint.h>
12
13 /** \class   SketchSolver_ConstraintMirror
14  *  \ingroup Plugins
15  *  \brief   Convert fillet constraint to SolveSpace structure
16  */
17 class SketchSolver_ConstraintMirror : public SketchSolver_Constraint
18 {
19 public:
20   /// Constructor based on SketchPlugin constraint
21   SketchSolver_ConstraintMirror(ConstraintPtr theConstraint) :
22       SketchSolver_Constraint(theConstraint),
23       myNumberOfObjects(0)
24   {}
25
26   /// \brief Update constraint
27   virtual void update();
28
29   /// \brief Notify this object about the feature is changed somewhere
30   virtual void notify(const FeaturePtr& theFeature, PlaneGCSSolver_Update*);
31
32   /// \brief Block or unblock events from this constraint
33   virtual void blockEvents(bool isBlocked);
34
35 protected:
36   /// \brief Converts SketchPlugin constraint to a list of SolveSpace constraints
37   virtual void process();
38
39   /// \brief Generate list of entities of mirror constraint
40   virtual void getAttributes(EntityWrapperPtr&, std::vector<EntityWrapperPtr>&);
41
42   /// \brief This method is used in derived objects to check consistence of constraint.
43   ///        E.g. the distance between line and point may be signed.
44   virtual void adjustConstraint();
45
46 private:
47   size_t myNumberOfObjects;  ///< number of previously mirrored objects
48   std::set<FeaturePtr> myFeatures; ///< mirror line, original and mirrored features
49 };
50
51 #endif