Salome HOME
Pipe validator fix
[modules/shaper.git] / src / SketchSolver / PlaneGCSSolver / PlaneGCSSolver_EntityWrapper.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:    PlaneGCSSolver_EntityWrapper.h
4 // Created: 14 Dec 2015
5 // Author:  Artem ZHIDKOV
6
7 #ifndef PlaneGCSSolver_EntityWrapper_H_
8 #define PlaneGCSSolver_EntityWrapper_H_
9
10 #include <PlaneGCSSolver_Defs.h>
11 #include <SketchSolver_IEntityWrapper.h>
12
13 /**
14  *  Wrapper providing operations with PlaneGCS entities.
15  */
16 class PlaneGCSSolver_EntityWrapper : public SketchSolver_IEntityWrapper
17 {
18 public:
19   PlaneGCSSolver_EntityWrapper(const FeaturePtr theFeature, const GCSCurvePtr theEntity = GCSCurvePtr());
20
21   /// \brief Return PlaneGCS geometric entity
22   const GCSCurvePtr& entity() const
23   { return myEntity; }
24   /// \brief Return PlaneGCS geometric entity to change
25   GCSCurvePtr& changeEntity()
26   { return myEntity; }
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 myType; }
44
45   /// \brief Verify the feature is used in the entity
46   virtual bool isUsed(FeaturePtr theFeature) const;
47   /// \brief Verify the attribute is used in the entity
48   virtual bool isUsed(AttributePtr theAttribute) const;
49
50   /// \brief Compare current entity with other
51   virtual bool isEqual(const EntityWrapperPtr& theOther);
52
53   /// \brief Update values of parameters of this entity by the parameters of given one
54   /// \return \c true if some parameters change their values
55   virtual bool update(const EntityWrapperPtr& theOther);
56
57 private:
58   EntityID    myID;
59   GroupID     myGroup;
60   SketchSolver_EntityType myType;
61   GCSCurvePtr myEntity;
62 };
63
64 #endif