Salome HOME
Boost has been removed from code
[modules/shaper.git] / src / SketchSolver / SketchSolver_Constraint.h
1 // File:    SketchSolver_Constraint.h
2 // Created: 27 May 2014
3 // Author:  Artem ZHIDKOV
4
5 #ifndef SketchSolver_Constraint_H_
6 #define SketchSolver_Constraint_H_
7
8 #include "SketchSolver.h"
9
10 #include <SketchPlugin_Constraint.h>
11
12 #include <string>
13 #include <vector>
14
15 /** \class   SketchSolver_Constraint
16  *  \ingroup DataModel
17  *  \brief   Obtain information about SketchPlugin's constraint
18  */
19 class SketchSolver_Constraint
20 {
21  public:
22   SketchSolver_Constraint();
23   SketchSolver_Constraint(std::shared_ptr<SketchPlugin_Constraint> theConstraint);
24
25   /** \brief Compute constraint type according to SolveSpace identifiers
26    *         and verify that constraint parameters are correct
27    *  \param[in]  theConstraint constraint which type should be determined
28    *  \return identifier of constraint type or SLVS_C_UNKNOWN if the type is wrong
29    */
30   const int& getType(std::shared_ptr<SketchPlugin_Constraint> theConstraint);
31   /// \brief Returns the type of myConstraint member
32   inline const int& getType() const
33   {
34     return myType;
35   }
36
37   /// \brief Returns list of attributes names in the correct order required by SolveSpace
38   inline const std::vector<std::string>& getAttributes() const
39   {
40     return myAttributesList;
41   }
42
43  private:
44   std::shared_ptr<SketchPlugin_Constraint> myConstraint;
45   int myType;
46   std::vector<std::string> myAttributesList;
47 };
48
49 #endif