X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFiltersPlugin%2FFiltersPlugin_OnShapeName.h;fp=src%2FFiltersPlugin%2FFiltersPlugin_OnShapeName.h;h=85556ae5b2c06002c906b51a2819bda1f6cc85b9;hb=cf856efc73193392c635d21694abf44a314db419;hp=0000000000000000000000000000000000000000;hpb=28d8344b06d71fd4878181bc1909084923cba4cb;p=modules%2Fshaper.git diff --git a/src/FiltersPlugin/FiltersPlugin_OnShapeName.h b/src/FiltersPlugin/FiltersPlugin_OnShapeName.h new file mode 100644 index 000000000..85556ae5b --- /dev/null +++ b/src/FiltersPlugin/FiltersPlugin_OnShapeName.h @@ -0,0 +1,59 @@ +// 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 +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef FILTERSPLUGIN_ONSHAPENAME_H_ +#define FILTERSPLUGIN_ONSHAPENAME_H_ + +#include "FiltersPlugin.h" + +#include + +/**\class FiltersPlugin_OnPlaneSide +* \ingroup DataModel +* \brief Filter for objects which lying on the side of selected plane +*/ +class FiltersPlugin_OnShapeName : public ModelAPI_Filter +{ +public: + FiltersPlugin_OnShapeName() : ModelAPI_Filter() {} + + virtual const std::string& name() const + { + static const std::string kName("On shape name"); + return kName; + } + + /// Returns true for face type + virtual bool isSupported(GeomAPI_Shape::ShapeType theType) const override; + + /// This method should contain the filter logic. It returns true if the given shape + /// is accepted by the filter. + /// \param theShape the given shape + /// \param theArgs arguments of the filter + virtual bool isOk(const GeomShapePtr& theShape,const ResultPtr& theResult, + const ModelAPI_FiltersArgs& theArgs) const override; + + /// Returns XML string which represents GUI of the filter + virtual std::string xmlRepresentation() const override; + + /// Initializes arguments of a filter. + virtual void initAttributes(ModelAPI_FiltersArgs& theArguments) override; +}; + +#endif