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