1 // Copyright (C) 2014-2019 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef FILTERSAPI_FILTER_H_
21 #define FILTERSAPI_FILTER_H_
23 #include "FiltersAPI.h"
25 #include <ModelHighAPI_Dumper.h>
26 #include <ModelHighAPI_Selection.h>
28 class ModelAPI_Attribute;
30 /**\class FiltersAPI_Filter
32 * \brief Interface for the Filter
34 class FiltersAPI_Filter
39 const std::string& theName,
40 const bool theRevertFilter = false,
41 const std::list<ModelHighAPI_Selection>& theArguments = std::list<ModelHighAPI_Selection>());
43 // Internal constructor based on filter arguments
45 FiltersAPI_Filter(const std::string& theName,
46 const std::list<std::shared_ptr<ModelAPI_Attribute> >& theArguments);
50 virtual ~FiltersAPI_Filter();
52 const std::string& name() const { return myName; }
53 bool isReversed() const { return myReversed; }
55 /// Dump wrapped feature
57 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
62 std::list<ModelHighAPI_Selection> myFilterArguments;
65 typedef std::shared_ptr<FiltersAPI_Filter> FilterAPIPtr;
67 /// Create list of filters
68 FILTERSAPI_EXPORT FilterAPIPtr
69 addFilter(const std::string& name = std::string(),
70 const bool exclude = false,
71 const std::list<ModelHighAPI_Selection>& args = std::list<ModelHighAPI_Selection>());