1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: SketchSolver_Constraint.h
4 // Created: 27 May 2014
5 // Author: Artem ZHIDKOV
7 #ifndef SketchSolver_Constraint_H_
8 #define SketchSolver_Constraint_H_
10 #include "SketchSolver.h"
12 #include <SketchPlugin_Constraint.h>
17 /** \class SketchSolver_Constraint
19 * \brief Obtain information about SketchPlugin's constraint
21 class SketchSolver_Constraint
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);
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
34 const int& getType(std::shared_ptr<SketchPlugin_Constraint> theConstraint);
35 /// \brief Returns the type of myConstraint member
36 inline const int& getType() const
41 /// \brief Returns list of attributes names in the correct order required by SolveSpace
42 inline const std::vector<std::string>& getAttributes() const
44 return myAttributesList;
48 std::shared_ptr<SketchPlugin_Constraint> myConstraint;
50 std::vector<std::string> myAttributesList;