Salome HOME
Using validator in multi selector control for the "type_choice" key.
[modules/shaper.git] / src / GeomValidators / GeomValidators_ShapeType.h
index ce3232d61b5074674f621dbff70dcc28a26d23b1..c55c4535b5402caf14f37ae58c30771d19c8c572 100644 (file)
@@ -10,6 +10,8 @@
 #include "GeomValidators.h"
 #include "ModelAPI_AttributeValidator.h"
 
+#include <GeomAPI_Shape.h>
+
 #include <string>
 
 /**
@@ -26,8 +28,11 @@ class GeomValidators_ShapeType : public ModelAPI_AttributeValidator
   {
     AnyShape,
     Vertex,
+    Edge,
     Line,
-    Circle
+    Circle,
+    Solid,
+    Face
   };
 
  public:
@@ -45,6 +50,24 @@ protected:
   bool isValidArgument(const AttributePtr& theAttribute,
                        const std::string& theArgument) const;
 
+  /// Returns true if the attibute's object type satisfies the argument value
+  /// \param theAttribute a checked attribute
+  /// \param theArgument a parameter
+  bool isValidAttribute(const AttributePtr& theAttribute,
+                        const TypeOfShape theShapeType) const;
+
+  /// Returns true if the attibute's object type satisfies the argument value
+  /// \param theAttribute a checked object
+  /// \param theShapeType a shape type
+  bool isValidObject(const ObjectPtr& theObject,
+                     const TypeOfShape theShapeType) const;
+
+  /// Returns true if the attibute's object type satisfies the argument value
+  /// \param theShape a checked shape
+  /// \param theShapeType a shape type
+  bool isValidShape(const GeomShapePtr theShape,
+                    const TypeOfShape theShapeType) const;
+
 };
 
 #endif