Salome HOME
Fix compilation errors (part 2)
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Validators.h
index 49854af5e11f9d1ce32f11219c310a2283227ad8..70120d614a640331a6f65fc1800d725591c2d710 100644 (file)
@@ -26,7 +26,7 @@ class SketchPlugin_DistanceAttrValidator : public ModelAPI_AttributeValidator
   //! \param theError error message
   virtual bool isValid(const AttributePtr& theAttribute,
                        const std::list<std::string>& theArguments,
-                       std::string& theError) const;
+                       Events_InfoMessage& theError) const;
 };
 
 /**\class SketchPlugin_TangentAttrValidator
@@ -44,7 +44,7 @@ class SketchPlugin_TangentAttrValidator : public ModelAPI_AttributeValidator
   //! \param theError error message
   virtual bool isValid(const AttributePtr& theAttribute,
                        const std::list<std::string>& theArguments,
-                       std::string& theError) const;
+                       Events_InfoMessage& theError) const;
 };
 
 
@@ -63,7 +63,7 @@ class SketchPlugin_NotFixedValidator : public ModelAPI_AttributeValidator
   //! \param theError error message
   virtual bool isValid(const AttributePtr& theAttribute,
                        const std::list<std::string>& theArguments,
-                       std::string& theError) const;
+                       Events_InfoMessage& theError) const;
 };
 
 /**\class SketchPlugin_EqualAttrValidator
@@ -81,7 +81,7 @@ class SketchPlugin_EqualAttrValidator : public ModelAPI_AttributeValidator
   //! \param theError error message
   virtual bool isValid(const AttributePtr& theAttribute,
                        const std::list<std::string>& theArguments,
-                       std::string& theError) const;
+                       Events_InfoMessage& theError) const;
 };
 
 /**\class SketchPlugin_MirrorAttrValidator
@@ -99,7 +99,7 @@ class SketchPlugin_MirrorAttrValidator : public ModelAPI_AttributeValidator
   //! \param theError error message
   virtual bool isValid(const AttributePtr& theAttribute,
                        const std::list<std::string>& theArguments,
-                       std::string& theError) const;
+                       Events_InfoMessage& theError) const;
 };
 
 
@@ -118,7 +118,7 @@ class SketchPlugin_CoincidenceAttrValidator : public ModelAPI_AttributeValidator
   //! \param theError error message
   virtual bool isValid(const AttributePtr& theAttribute,
                        const std::list<std::string>& theArguments,
-                       std::string& theError) const;
+                       Events_InfoMessage& theError) const;
 };
 
 
@@ -138,7 +138,7 @@ class SketchPlugin_CopyValidator : public ModelAPI_AttributeValidator
   //! \param theError error message
   virtual bool isValid(const AttributePtr& theAttribute,
                        const std::list<std::string>& theArguments,
-                       std::string& theError) const;
+                       Events_InfoMessage& theError) const;
 };
 
 /**\class SketchPlugin_SolverErrorValidator
@@ -156,7 +156,7 @@ class SketchPlugin_SolverErrorValidator : public ModelAPI_FeatureValidator
   //! \param theError error message
   virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                        const std::list<std::string>& theArguments,
-                       std::string& theError) const;
+                       Events_InfoMessage& theError) const;
 
   /// Returns true if the attribute in feature is not obligatory for the feature execution
   virtual bool isNotObligatory(std::string theFeature, std::string theAttribute);
@@ -177,7 +177,7 @@ public:
   //! \param theError error message
   virtual bool isValid(const AttributePtr& theAttribute,
                        const std::list<std::string>& theArguments,
-                       std::string& theError) const;
+                       Events_InfoMessage& theError) const;
 };
 
 
@@ -196,7 +196,7 @@ class SketchPlugin_MiddlePointAttrValidator : public ModelAPI_AttributeValidator
   //! \param theError error message
   virtual bool isValid(const AttributePtr& theAttribute,
                        const std::list<std::string>& theArguments,
-                       std::string& theError) const;
+                       Events_InfoMessage& theError) const;
 };
 
 
@@ -215,7 +215,28 @@ class SketchPlugin_ArcTangentPointValidator : public ModelAPI_AttributeValidator
   //! \param theError error message
   virtual bool isValid(const AttributePtr& theAttribute,
                        const std::list<std::string>& theArguments,
-                       std::string& theError) const;
+                       Events_InfoMessage& theError) const;
+};
+
+/**\class SketchPlugin_SplitValidator
+ * \ingroup Validators
+ * \brief Validator for the entity of the following type:
+ * - Linear segment with point(s) coinident to this line
+ * - Arc with point(s) coincident to the arc
+ * - Circle with at least 2 split-points on this circle
+ *
+ * Checks that there are coincident point on selected feature.
+ */
+class SketchPlugin_SplitValidator : public ModelAPI_AttributeValidator
+{
+ public:
+  //! returns true if attribute is valid
+  //! \param theAttribute the checked attribute
+  //! \param theArguments arguments of the attribute
+  //! \param theError error message
+  virtual bool isValid(const AttributePtr& theAttribute,
+                       const std::list<std::string>& theArguments,
+                       Events_InfoMessage& theError) const;
 };
 
 /**\class SketchPlugin_IntersectionValidator
@@ -231,7 +252,23 @@ class SketchPlugin_IntersectionValidator : public ModelAPI_AttributeValidator
   //! \param theError error message
   virtual bool isValid(const AttributePtr& theAttribute,
                        const std::list<std::string>& theArguments,
-                       std::string& theError) const;
+                       Events_InfoMessage& theError) const;
+};
+
+/**\class SketchPlugin_ProjectionValidator
+ * \ingroup Validators
+ * \brief Validator for the attribute to be projected onto the sketch plane.
+ */
+class SketchPlugin_ProjectionValidator : public ModelAPI_AttributeValidator
+{
+ public:
+  //! returns true if attribute is valid
+  //! \param theAttribute the checked attribute
+  //! \param theArguments arguments of the attribute
+  //! \param theError error message
+  virtual bool isValid(const AttributePtr& theAttribute,
+                       const std::list<std::string>& theArguments,
+                       Events_InfoMessage& theError) const;
 };
 
 #endif