1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: ParametersPlugin_ParametersMgr.h
4 // Created: 07 April 2016
7 #ifndef PARAMETERSPLUGIN_PARAMETERSMGR_H_
8 #define PARAMETERSPLUGIN_PARAMETERSMGR_H_
10 #include "ParametersPlugin.h"
11 #include <ModelAPI_Feature.h>
14 * \class ParametersPlugin_ParametersMgr
16 * \brief A macro feature which manages list of parameters in the current document.
19 class ParametersPlugin_ParametersMgr : public ModelAPI_Feature
23 inline static const std::string& ID()
25 static const std::string MY_PARAMSMGR_ID("ParametersMgr");
26 return MY_PARAMSMGR_ID;
29 /// Use plugin manager for features creation
30 ParametersPlugin_ParametersMgr();
33 virtual ~ParametersPlugin_ParametersMgr();
35 /// Request for initialization of data model of the feature: adding all attributes
36 PARAMETERSPLUGIN_EXPORT virtual void initAttributes();
38 /// Returns the unique kind of a feature
39 PARAMETERSPLUGIN_EXPORT virtual const std::string& getKind()
41 static std::string MY_KIND = ParametersPlugin_ParametersMgr::ID();
45 /// Computes or recomputes the results
46 PARAMETERSPLUGIN_EXPORT virtual void execute();
48 /// Reimplemented from ModelAPI_Feature::isMacro(). Returns true.
49 PARAMETERSPLUGIN_EXPORT virtual bool isMacro() const { return true; }
51 /// Reimplemented from ModelAPI_Feature::isPreviewNeeded(). Returns false.
52 PARAMETERSPLUGIN_EXPORT virtual bool isPreviewNeeded() const { return false; }
54 /// Returns true if result is persistent (stored in document) and on undo-redo, save-open
55 /// it is not needed to recompute it.
56 PARAMETERSPLUGIN_EXPORT virtual bool isPersistentResult() {return false;}
58 /// Returns true if this feature must not be created: this is just an action
59 /// that is not stored in the features history and data model (like "delete part").
60 virtual bool isInHistory() { return false; }