Salome HOME
Fix compilation on Linux
[modules/shaper.git] / src / SketchSolver / PlaneGCSSolver / PlaneGCSSolver_PointWrapper.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:    PlaneGCSSolver_PointWrapper.h
4 // Created: 16 Dec 2015
5 // Author:  Artem ZHIDKOV
6
7 #ifndef PlaneGCSSolver_PointWrapper_H_
8 #define PlaneGCSSolver_PointWrapper_H_
9
10 #include <PlaneGCSSolver_Defs.h>
11 #include <SketchSolver_IEntityWrapper.h>
12
13 /**
14  *  Wrapper providing operations with PlaneGCS points.
15  */
16 class PlaneGCSSolver_PointWrapper : public SketchSolver_IEntityWrapper
17 {
18 public:
19   PlaneGCSSolver_PointWrapper(const AttributePtr theAttribute, const GCSPointPtr thePoint);
20
21   /// \brief Return PlaneGCS point
22   const GCSPointPtr& point() const
23   { return myPoint; }
24   /// \brief Return PlaneGCS point to change
25   GCSPointPtr& changeEntity()
26   { return myPoint; }
27
28   /// \brief Return ID of current entity
29   virtual EntityID id() const
30   { return myID; }
31   /// \brief Change ID of the entity
32   void setId(EntityID theID)
33   { myID = theID; }
34
35   /// \brief Change group for the entity
36   virtual void setGroup(const GroupID& theGroup);
37   /// \brief Return identifier of the group the entity belongs to
38   virtual GroupID group() const
39   { return myGroup; }
40
41   /// \brief Return type of current entity
42   virtual SketchSolver_EntityType type() const
43   { return ENTITY_POINT; }
44
45   /// \brief Verify the feature is used in the entity
46   virtual bool isUsed(FeaturePtr theFeature) const
47   { return false; }
48   /// \brief Verify the attribute is used in the entity
49   virtual bool isUsed(AttributePtr theAttribute) const;
50
51   /// \brief Compare current entity with other
52   virtual bool isEqual(const EntityWrapperPtr& theOther);
53
54   /// \brief Update values of parameters of this entity by the parameters of given one
55   /// \return \c true if some parameters change their values
56   virtual bool update(const EntityWrapperPtr& theOther);
57
58 private:
59   EntityID    myID;
60   GroupID     myGroup;
61   GCSPointPtr myPoint;
62 };
63
64 #endif