]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModuleBase/ModuleBase_ValidatorLinearEdge.h
Salome HOME
Union of validator and filter functionalities.
[modules/shaper.git] / src / ModuleBase / ModuleBase_ValidatorLinearEdge.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModuleBase_ValidatorLinearEdge.h
4 // Created:     19 Mar 2015
5 // Author:      Natalia ERMOLAEVA
6
7 #ifndef ModuleBase_ValidatorLinearEdge_H
8 #define ModuleBase_ValidatorLinearEdge_H
9
10 #include "ModuleBase.h"
11 #include "ModelAPI_AttributeValidator.h"
12
13 /**
14 * \ingroup Validators
15 * A validator of selection
16 */
17 class ModuleBase_ValidatorLinearEdge : public ModelAPI_AttributeValidator
18 {
19  public:
20   //  the edge type
21   enum TypeOfEdge
22   {
23     AnyEdge,
24     Line,
25     Circle
26   };
27
28  public:
29    MODULEBASE_EXPORT ModuleBase_ValidatorLinearEdge() {}
30   //! returns true if attribute is valid
31   //! \param theAttribute the checked attribute
32   //! \param theArguments arguments of the attribute
33   MODULEBASE_EXPORT virtual bool isValid(const AttributePtr& theAttribute,
34                                          const std::list<std::string>& theArguments) const;
35 protected:
36   /// Convert string to TypeOfEdge value
37   /// \param theType a string value
38   static TypeOfEdge edgeType(const std::string& theType);
39 };
40
41 #endif