1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: Model_ResultValidators.h
4 // Created: 27 Feb 2015
5 // Author: Natalia ERMOLAEVA
7 #ifndef SketchPlugin_ExternalValidator_H
8 #define SketchPlugin_ExternalValidator_H
10 #include <SketchPlugin.h>
11 #include <ModelAPI_AttributeValidator.h>
13 /**\class SketchPlugin_ExternalValidator
15 * \brief Validator for the points selection
17 * Allows to select points only.
19 class SketchPlugin_ExternalValidator : public ModelAPI_AttributeValidator
22 /// returns true if the feature of attribute do not contain external features
23 /// in the given attribute and
24 /// among attributes listed in the arguments
25 /// \param theAttribute an attribute to check
26 /// \param theArguments a filter parameters
27 /// \param theError error message
28 SKETCHPLUGIN_EXPORT virtual bool isValid(const AttributePtr& theAttribute,
29 const std::list<std::string>& theArguments,
30 Events_InfoMessage& theError) const;
33 /// returns true if the feature of the attribute is external
34 /// \param theAttribute an attribute to check
35 bool isExternalAttribute(const AttributePtr& theAttribute) const;