1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: SketchSolver_Error.h
4 // Created: 29 Mar 2015
5 // Author: Artem ZHIDKOV
7 #ifndef SketchSolver_Error_H_
8 #define SketchSolver_Error_H_
12 /** \class SketchSolver_Error
14 * \brief Collects all sketch solver error' codes
15 * as inline static functions
17 class SketchSolver_Error
20 /// The value parameter for the constraint
21 inline static const std::string& CONSTRAINTS()
23 static const std::string MY_ERROR_VALUE("Conflicting constraints");
24 return MY_ERROR_VALUE;
26 /// Constraints should use objects instead of features as attributes
27 inline static const std::string& NEED_OBJECT_NOT_FEATURE()
29 static const std::string MY_ERROR_VALUE("Constraint should be based on object instead of feature");
30 return MY_ERROR_VALUE;
32 /// The entities need to have shared point, but they have not
33 inline static const std::string& NO_COINCIDENT_POINTS()
35 static const std::string MY_ERROR_VALUE("Objects should have coincident point");
36 return MY_ERROR_VALUE;
38 /// Attribute of a feature is not initialized
39 inline static const std::string& NOT_INITIALIZED()
41 static const std::string MY_ERROR_VALUE("Attribute is not initialized");
42 return MY_ERROR_VALUE;
44 /// Constraint has wrong attributes
45 inline static const std::string& INCORRECT_ATTRIBUTE()
47 static const std::string MY_ERROR_VALUE("Incorrect attribute");
48 return MY_ERROR_VALUE;
50 /// Tangency constraint has wrong attributes
51 inline static const std::string& INCORRECT_TANGENCY_ATTRIBUTE()
53 static const std::string MY_ERROR_VALUE("An arc should be an attribute of tangency constraint");
54 return MY_ERROR_VALUE;
56 /// Mirror constraint has wrong attributes
57 inline static const std::string& INCORRECT_MIRROR_ATTRIBUTE()
59 static const std::string MY_ERROR_VALUE("Mirror constraint has wrong attributes");
60 return MY_ERROR_VALUE;
62 /// Entity is already fixed
63 inline static const std::string& ALREADY_FIXED()
65 static const std::string MY_ERROR_VALUE("Entity already fixed");
66 return MY_ERROR_VALUE;
68 /// Crash in SolveSpace
69 inline static const std::string& SOLVESPACE_CRASH()
71 static const std::string MY_ERROR_VALUE("Caution: SolveSpace crash! Constraints are wrong");
72 return MY_ERROR_VALUE;