X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_Filter.h;h=cfd0dc6c6544f256a3392909101eabd8137c8d92;hb=06e7f5859095193fc7f498bd89a7d28009794f53;hp=05b85f6b60a033ddc5bce267afd02294b1901f4b;hpb=d4230889a1c3107f165746d0e73fc276444a4396;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_Filter.h b/src/ModelAPI/ModelAPI_Filter.h index 05b85f6b6..cfd0dc6c6 100644 --- a/src/ModelAPI/ModelAPI_Filter.h +++ b/src/ModelAPI/ModelAPI_Filter.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// Copyright (C) 2014-2023 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -33,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; @@ -48,18 +50,20 @@ public: const ResultPtr& theResult, const ModelAPI_FiltersArgs& theArgs) const = 0; + /// Returns True if the filter can be used several times within one filtering + virtual bool isMultiple() const { return false; } + /// Returns XML string which represents GUI of the filter /// By default it returns nothing (no GUI) virtual std::string xmlRepresentation() const { return ""; } /// Initializes arguments of a filter. If a filter has no arguments, this method may be /// not redefined. - virtual void initAttributes(ModelAPI_FiltersArgs& theArguments) {} + virtual void initAttributes(ModelAPI_FiltersArgs& /*theArguments*/) {} -protected: /// Returns XML string which represents GUI of the filter /// by reading corresponding XML file. - MODELAPI_EXPORT std::string xmlFromFile(const std::string& theConfigFile) const; + MODELAPI_EXPORT virtual std::string xmlFromFile(const std::string& theConfigFile) const; private: bool myIsReverse;