1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomValidators_MinObjectsSelected.h
4 // Created: 30 June 2015
5 // Author: Dmitry Bobylev
7 #ifndef GeomValidators_MinObjectsSelected_H
8 #define GeomValidators_MinObjectsSelected_H
10 #include <GeomValidators.h>
11 #include <ModelAPI_Feature.h>
12 #include <ModelAPI_FeatureValidator.h>
14 /// \class GeomValidators_MinObjectsSelected
15 /// \ingroup Validators
16 /// \brief Validates number of objects in selection list.
17 class GeomValidators_MinObjectsSelected : public ModelAPI_FeatureValidator
20 /// \return true if selection list has enough objects.
21 /// \param[in] theFeature the validated feature.
22 /// \param[in] theArguments the arguments in the configuration file for this validator.
23 /// \param[out] theError error message.
24 /// \returns true if feature is valid.
25 GEOMVALIDATORS_EXPORT virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
26 const std::list<std::string>& theArguments,
27 Events_InfoMessage& theError) const;
29 /// \return true if the attribute in feature is not obligatory for the feature execution.
30 GEOMVALIDATORS_EXPORT virtual bool isNotObligatory(std::string theFeature,
31 std::string theAttribute);