]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/FeaturesPlugin/FeaturesPlugin_Validators.h
Salome HOME
Meet the coding style (line length <= 100)
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Validators.h
index ce3fe042e3ad7186f09a797555a2c250aa6275da..0efd753d68d2510b44adebae32a870e6da89d549 100644 (file)
@@ -64,6 +64,26 @@ private:
                         Events_InfoMessage& theError) const;
 };
 
+/// \class FeaturesPlugin_ValidatorBaseForGenerationSketchOrSketchObjects
+/// \ingroup Validators
+/// \brief Validator for the base objects for generation. Checks that sketch and it objects
+///        are not selected at the same time.
+class FeaturesPlugin_ValidatorBaseForGenerationSketchOrSketchObjects:
+  public ModelAPI_FeatureValidator
+{
+ public:
+  //! \return true if sketch and it objects not selected at the same time.
+  //! \param theFeature the checked feature
+  //! \param theArguments arguments of the feature (not used)
+  //! \param theError error message
+  virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                       const std::list<std::string>& theArguments,
+                       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);
+};
+
 /// \class FeaturesPlugin_ValidatorCompositeLauncher
 /// \ingroup Validators
 /// \brief A validator for selection at composite feature start
@@ -202,4 +222,19 @@ class FeaturesPlugin_ValidatorUnionArguments: public ModelAPI_FeatureValidator
   virtual bool isNotObligatory(std::string theFeature, std::string theAttribute);
 };
 
+/// \class FeaturesPlugin_ValidatorConcealedResult
+/// \ingroup Validators
+/// \brief Validator for the "Recover" feature.
+class FeaturesPlugin_ValidatorConcealedResult: public ModelAPI_AttributeValidator
+{
+ public:
+  //! \return True if the attribute is valid.
+  //! \param[in] theAttribute the checked attribute.
+  //! \param[in] theArguments arguments of the attribute.
+  //! \param[out] theError error message.
+   virtual bool isValid(const AttributePtr& theAttribute,
+                        const std::list<std::string>& theArguments,
+                        Events_InfoMessage& theError) const;
+};
+
 #endif