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