Salome HOME
Remove extra files
[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, 
20                                const GCSCurvePtr theEntity = GCSCurvePtr());
21
22   /// \brief Return PlaneGCS geometric entity
23   const GCSCurvePtr& entity() const
24   { return myEntity; }
25   /// \brief Return PlaneGCS geometric entity to change
26   GCSCurvePtr& changeEntity()
27   { return myEntity; }
28
29   /// \brief Return ID of current entity
30   virtual EntityID id() const
31   { return myID; }
32   /// \brief Change ID of the entity
33   void setId(EntityID theID)
34   { myID = theID; }
35
36   /// \brief Change group for the entity
37   virtual void setGroup(const GroupID& theGroup);
38   /// \brief Return identifier of the group the entity belongs to
39   virtual GroupID group() const
40   { return myGroup; }
41
42   /// \brief Return type of current entity
43   virtual SketchSolver_EntityType type() const
44   { return myType; }
45
46   /// \brief Verify the feature is used in the entity
47   virtual bool isUsed(FeaturePtr theFeature) const;
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   SketchSolver_EntityType myType;
62   GCSCurvePtr myEntity;
63 };
64
65 #endif