+/// \class FeaturesPlugin_ValidatorCanBeEmpty
+/// \ingroup Validators
+/// \brief A validator for extrusion direction attribute and bounding planes for extrusion and
+/// revolution. Allows them to be empty if base objects are planar and do not contain
+/// vertices and edges.
+class FeaturesPlugin_ValidatorCanBeEmpty: public ModelAPI_FeatureValidator
+{
+public:
+ //! Returns true if attribute listed in the parameter arguments are planar.
+ //! \param[in] theFeature the checked feature.
+ //! \param[in] theArguments arguments of the attribute.
+ //! \param[out] theError error message.
+ virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<std::string>& theArguments,
+ std::string& 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);
+
+private:
+ bool isShapesCanBeEmpty(const AttributePtr& theAttribute,
+ std::string& theError) const;
+};
+