X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_Filter.h;h=e7a1a639bf486472b99f4dca491f80599c9084e7;hb=854902e275b0daab546cbe4517b8bb71badad4a1;hp=210d9db0d525b6c025afdd57c9f9a5e5a46a82f6;hpb=24d4e1ff00e9d7fa972e06ed325122550a12d450;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_Filter.h b/src/ModuleBase/ModuleBase_Filter.h index 210d9db0d..e7a1a639b 100644 --- a/src/ModuleBase/ModuleBase_Filter.h +++ b/src/ModuleBase/ModuleBase_Filter.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: ModuleBase_Filter.h // Created: 10 Dec 2014 // Author: Natalia ERMOLAEVA @@ -9,7 +11,10 @@ #include +#include + /** + * \ingroup GUI * This object is assigned by the name * in the XML file to the specific attribute or to the whole feature. * If isOK method of the filter returns "false", it is signalized in user interface @@ -17,15 +22,33 @@ * Filterss must be registered in the filters factory to be * correctly identified by the XML string-ID. */ -DEFINE_STANDARD_HANDLE(ModuleBase_Filter, SelectMgr_Filter); -class ModuleBase_Filter: public SelectMgr_Filter +class ModuleBase_Filter { public: - Standard_EXPORT ModuleBase_Filter(): SelectMgr_Filter() {} + /// Constructor + MODULEBASE_EXPORT ModuleBase_Filter() {} + + /** + * Returns an OCC selection filter. It can be appended into the context of a viewer + * It creates a filter if it has not be created yet. + * \return the selection filter + */ + MODULEBASE_EXPORT Handle(SelectMgr_Filter) getFilter(); - Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const; + /** + * Sets the arguments to the filter. + * \param theArguments a list of arguments + */ + MODULEBASE_EXPORT virtual void setArguments(const std::list& theArguments) = 0; +protected: + /** + * It creates an internal instance of the OCC filter + */ + virtual void createFilter() = 0; - DEFINE_STANDARD_RTTI(ModuleBase_Filter) +protected: + /// current instance of the OCC selection filter + Handle(SelectMgr_Filter) myFilter; }; #endif //ModuleBase_Filter