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