1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: FeaturesPlugin_Recover.h
4 // Created: 29 Jul 2016
5 // Author: Natalia ERMOLAEVA
7 #ifndef FEATURESPLUGIN_RECOVER_H_
8 #define FEATURESPLUGIN_RECOVER_H_
10 #include "FeaturesPlugin.h"
11 #include <ModelAPI_Feature.h>
12 #include <GeomAPI_Shape.h>
14 /**\class FeaturesPlugin_Recover
16 * \brief Feature for display of concealed attributes of some feature.
18 class FeaturesPlugin_Recover : public ModelAPI_Feature
20 /// List of already registered unconcealed pairs of unconcealed result and feature that caused
21 /// concealment. If attributes of this feature were changed, this list helps to synchronise
22 /// the current state with validators.
23 std::set<std::shared_ptr<ModelAPI_Object> > myRegistered;
24 /// The last stored Base to unregister Unconcealed when even attributes are already erased.
25 FeaturePtr myCurrentBase;
26 /// previous state of persistent flag
30 inline static const std::string& ID()
32 static const std::string MY_RECOVER_ID("Recover");
35 /// Attribute name of base feature.
36 inline static const std::string& BASE_FEATURE()
38 static const std::string MY_BASE_FEATURE("base_feature");
39 return MY_BASE_FEATURE;
42 /// Attribute name of recovered results list.
43 inline static const std::string& RECOVERED_ENTITIES()
45 static const std::string MY_RECOVERED_ENTITIES_ID("recovered");
46 return MY_RECOVERED_ENTITIES_ID;
49 /// Returns the kind of a feature
50 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
52 static std::string MY_KIND = FeaturesPlugin_Recover::ID();
56 /// Creates a new part document if needed
57 FEATURESPLUGIN_EXPORT virtual void execute();
59 /// Request for initialization of data model of the feature: adding all attributes
60 FEATURESPLUGIN_EXPORT virtual void initAttributes();
62 /// Use plugin manager for features creation
63 FeaturesPlugin_Recover();