Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom into Dev_1.1.0
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Validators.h
index 38ba0291698ce31d9ca27e8251f5a2c6e6a55018..ff2183425529a7e001e9b3978497afee51154bf4 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+
 // File:        SketchPlugin_Validators.h
 // Created:     01 Aug 2014
 // Author:      Vitaly SMETANNIKOV
@@ -6,15 +8,45 @@
 #define SketchPlugin_Validators_H
 
 #include "SketchPlugin.h"
-//#include <ModuleBase_FeatureValidator.h>
 #include <ModelAPI_AttributeValidator.h>
 
+/**\class SketchPlugin_DistanceAttrValidator
+ * \ingroup Validators
+ * \brief Validator for the distance input.
+ *
+ * It just checks that distance is greater than zero.
+ */
 class SketchPlugin_DistanceAttrValidator : public ModelAPI_AttributeValidator
 {
  public:
-  virtual bool isValid(const FeaturePtr& theFeature, const std::list<std::string>& theArguments,
-                       const ObjectPtr& theObject) const;
-
+  //! returns true if attribute is valid
+  //! \param theAttribute the checked attribute
+  //! \param theArguments arguments of the attribute
+  virtual bool isValid(
+    const AttributePtr& theAttribute, const std::list<std::string>& theArguments) const;
 };
 
+/**\class SketchPlugin_DifferentObjectsValidator
+ * \ingroup Validators
+ *
+ * Check that there is no same object was already selected in the feature.
+ * For an example: to avoid perpendicularity on line and the same line.
+ */
+// Use PartSet_DifferentObjectsValidator
+//class SketchPlugin_DifferentObjectsValidator : public ModelAPI_RefAttrValidator
+//{
+// public:
+//  //! returns true if attribute is valid
+//  //! \param theAttribute the checked attribute
+//  //! \param theArguments arguments of the attribute
+//  virtual bool isValid(
+//    const AttributePtr& theAttribute, const std::list<std::string>& theArguments) const;
+//  //! Returns true if object is good for the feature attribute
+//  virtual bool isValid(const FeaturePtr& theFeature, const std::list<std::string>& theArguments,
+//                       const ObjectPtr& theObject) const;
+//  //! Returns true if the attribute is good for the feature attribute
+//  virtual bool isValid(const FeaturePtr& theFeature, const std::list<std::string>& theArguments,
+//                       const AttributePtr& theAttribute) const;
+//};
+
 #endif