Salome HOME
Validator for partition
[modules/shaper.git] / src / GeomValidators / GeomValidators_PartitionArguments.h
diff --git a/src/GeomValidators/GeomValidators_PartitionArguments.h b/src/GeomValidators/GeomValidators_PartitionArguments.h
new file mode 100644 (file)
index 0000000..8233cbf
--- /dev/null
@@ -0,0 +1,34 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+// File:        GeomValidators_PartitionArguments.h
+// Created:     17 September 2015
+// Author:      Dmitry Bobylev
+
+#ifndef GeomValidators_PartitionArguments_H
+#define GeomValidators_PartitionArguments_H
+
+#include <GeomValidators.h>
+#include <ModelAPI_Feature.h>
+#include <ModelAPI_FeatureValidator.h>
+
+/** \class GeomValidators_PartitionArguments
+ *  \ingroup Validators
+ *  \brief Validates that partition operation have enough arguments.
+ */
+class GeomValidators_PartitionArguments : public ModelAPI_FeatureValidator
+{
+public:
+  /** \brief Returns true if feature and/or attributes are valid.
+   *  \param[in] theFeature the validated feature.
+   *  \param[in] theArguments the arguments in the configuration file for this validator.
+   *  \returns true if feature is valid.
+   */
+  GEOMVALIDATORS_EXPORT virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                                             const std::list<std::string>& theArguments,
+                                             std::string& theError) const;
+
+  /// \return true if the attribute in feature is not obligatory for the feature execution.
+  GEOMVALIDATORS_EXPORT virtual bool isNotObligatory(std::string theFeature, std::string theAttribute);
+};
+
+#endif