Salome HOME
Parameters manager implementation
[modules/shaper.git] / src / ParametersPlugin / ParametersPlugin_ParametersMgr.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        ParametersPlugin_ParametersMgr.h
4 // Created:     07 April 2016
5 // Author:      vsv
6
7 #ifndef PARAMETERSPLUGIN_PARAMETERSMGR_H_
8 #define PARAMETERSPLUGIN_PARAMETERSMGR_H_
9
10 #include "ParametersPlugin.h"
11 #include <ModelAPI_Feature.h>
12
13 /**
14  * \class ParametersPlugin_ParametersMgr
15  * \ingroup Plugins
16  * \brief A macro feature which manages list of parameters in the current document.
17  */
18
19 class ParametersPlugin_ParametersMgr : public ModelAPI_Feature
20 {
21 public:
22   /// Feature kind
23   inline static const std::string& ID()
24   {
25     static const std::string MY_PARAMSMGR_ID("ParametersMgr");
26     return MY_PARAMSMGR_ID;
27   }
28
29   /// Use plugin manager for features creation
30   ParametersPlugin_ParametersMgr();
31
32   /// Destructor
33   virtual ~ParametersPlugin_ParametersMgr();
34
35   /// Request for initialization of data model of the feature: adding all attributes
36   PARAMETERSPLUGIN_EXPORT virtual void initAttributes();
37
38   /// Returns the unique kind of a feature
39   PARAMETERSPLUGIN_EXPORT virtual const std::string& getKind()
40   {
41     static std::string MY_KIND = ParametersPlugin_ParametersMgr::ID();
42     return MY_KIND;
43   };
44
45   /// Computes or recomputes the results
46   PARAMETERSPLUGIN_EXPORT virtual void execute();
47
48   /// Reimplemented from ModelAPI_Feature::isMacro(). Returns true.
49   PARAMETERSPLUGIN_EXPORT virtual bool isMacro() const { return true; }
50
51   /// Reimplemented from ModelAPI_Feature::isPreviewNeeded(). Returns false.
52   PARAMETERSPLUGIN_EXPORT virtual bool isPreviewNeeded() const { return false; }
53 };
54
55
56 #endif