#include "GeomValidators.h"
#include "ModelAPI_AttributeValidator.h"
+#include <GeomAPI_Shape.h>
+
#include <string>
/**
// the edge type
enum TypeOfShape
{
- AnyShape,
+ Empty,
Vertex,
+ Edge,
Line,
- Circle
+ Circle,
+ Face,
+ Solid,
+ Compound,
+ Plane,
+ AnyShape
};
public:
//! \param theAttribute the checked attribute
//! \param theArguments arguments of the attribute
GEOMVALIDATORS_EXPORT virtual bool isValid(const AttributePtr& theAttribute,
- const std::list<std::string>& theArguments) const;
+ const std::list<std::string>& theArguments,
+ std::string& theError) const;
protected:
/// Convert string to TypeOfShape value
/// \param theType a string value
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