Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom into Dev_1.1.0
[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 #include <StdSelect_TypeOfEdge.hxx>
14
15 /**
16 * \ingroup Validators
17 * A validator of selection
18 */
19 class ModuleBase_ValidatorLinearEdge : public ModelAPI_AttributeValidator
20 {
21  public:
22   //  the edge type
23   enum TypeOfEdge
24   {
25     AnyEdge,
26     Line,
27     Circle
28   };
29
30  public:
31    MODULEBASE_EXPORT ModuleBase_ValidatorLinearEdge() {}
32   //! returns true if attribute is valid
33   //! \param theAttribute the checked attribute
34   //! \param theArguments arguments of the attribute
35   MODULEBASE_EXPORT virtual bool isValid(const AttributePtr& theAttribute,
36                                          const std::list<std::string>& theArguments) const;
37 protected:
38   /// Convert string to StdSelect_TypeOfFace value
39   /// \param theType a string value
40   static TypeOfEdge edgeType(const std::string& theType);
41 };
42
43 #endif