X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_Filter.h;h=4adeec43261d103ce4a0d486916ed2b1781f6145;hb=2e0f664e66dc2b46796df2953f52871b10799173;hp=0e5d5b9dfa232f831cbef219ee8f4b769688884b;hpb=bae2c0f9a9f1c1adbaa371b938feb25ccdfd61ac;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_Filter.h b/src/ModelAPI/ModelAPI_Filter.h index 0e5d5b9df..4adeec432 100644 --- a/src/ModelAPI/ModelAPI_Filter.h +++ b/src/ModelAPI/ModelAPI_Filter.h @@ -21,6 +21,7 @@ #define ModelAPI_Filter_H_ #include "ModelAPI_FiltersArgs.h" +#include "ModelAPI_ResultBody.h" #include @@ -32,6 +33,8 @@ class ModelAPI_Filter { public: + virtual ~ModelAPI_Filter() {} + /// Returns name of the filter to represent it in GUI virtual const std::string& name() const = 0; @@ -41,7 +44,11 @@ public: /// This method should contain the filter logic. It returns true if the given shape /// is accepted by the filter. /// \param theShape the given shape - virtual bool isOk(const GeomShapePtr& theShape, const ModelAPI_FiltersArgs& theArgs) const = 0; + /// \param theResult parent result of the shape to be checked + /// \param theArgs arguments of the filter + virtual bool isOk(const GeomShapePtr& theShape, + const ResultPtr& theResult, + const ModelAPI_FiltersArgs& theArgs) const = 0; /// Returns XML string which represents GUI of the filter /// By default it returns nothing (no GUI) @@ -51,6 +58,10 @@ public: /// not redefined. virtual void initAttributes(ModelAPI_FiltersArgs& theArguments) {} + /// Returns XML string which represents GUI of the filter + /// by reading corresponding XML file. + MODELAPI_EXPORT virtual std::string xmlFromFile(const std::string& theConfigFile) const; + private: bool myIsReverse; };