Salome HOME
Reanud's patch for modern Cpp11 compilers applied
[modules/shaper.git] / src / ModuleBase / ModuleBase_Filter.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModuleBase_Filter.h
4 // Created:     10 Dec 2014
5 // Author:      Natalia ERMOLAEVA
6
7 #ifndef ModuleBase_Filter_H
8 #define ModuleBase_Filter_H
9
10 #include "ModuleBase.h"
11
12 #include <SelectMgr_Filter.hxx>
13
14 #include <list>
15
16 /**
17  * This object is assigned by the name
18  * in the XML file to the specific attribute or to the whole feature.
19  * If isOK method of the filter returns "false", it is signalized in user interface
20  * that the processed entity should not be selected.
21  * Filterss must be registered in the filters factory to be
22  * correctly identified by the XML string-ID.
23  */
24 class ModuleBase_Filter
25 {
26 public:
27   MODULEBASE_EXPORT ModuleBase_Filter() {}
28
29   /**
30    * Returns an OCC selection filter. It can be appended into the context of a viewer
31    * It creates a filter if it has not be created yet.
32    * \return the selection filter
33    */
34   MODULEBASE_EXPORT Handle(SelectMgr_Filter) getFilter();
35
36   /**
37    * Sets the arguments to the filter.
38    * \param theArguments a list of arguments
39    */
40   MODULEBASE_EXPORT virtual void setArguments(const std::list<std::string>& theArguments) = 0;
41 protected:
42   /**
43    * It creates an internal instance of the OCC filter
44    */
45   virtual void createFilter() = 0;
46
47 protected:
48   Handle(SelectMgr_Filter) myFilter; // current instance of the OCC selection filter
49 };
50
51 #endif //ModuleBase_Filter