]> SALOME platform Git repositories - modules/shaper.git/blob - src/FeaturesAPI/FeaturesAPI_Recover.h
Salome HOME
Issue #1834: Fix length of lines
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_Recover.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        FeaturesAPI_Recover.h
4 // Created:     04 August 2016
5 // Author:      Mikhail Ponikarov
6
7 #ifndef FeaturesAPI_Recover_H_
8 #define FeaturesAPI_Recover_H_
9
10 #include "FeaturesAPI.h"
11
12 #include <FeaturesPlugin_Recover.h>
13
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
16
17 class ModelHighAPI_Dumper;
18 class ModelHighAPI_Reference;
19
20 /// \class FeaturesAPI_Recover
21 /// \ingroup CPPHighAPI
22 /// \brief Interface for Recover feature.
23 class FeaturesAPI_Recover: public ModelHighAPI_Interface
24 {
25 public:
26   /// Constructor without values.
27   FEATURESAPI_EXPORT
28   explicit FeaturesAPI_Recover(const std::shared_ptr<ModelAPI_Feature>& theFeature);
29
30   /// Constructor with values.
31   FEATURESAPI_EXPORT
32   FeaturesAPI_Recover(const std::shared_ptr<ModelAPI_Feature>& theFeature,
33                       const ModelHighAPI_Reference& theBaseFeature,
34                       const std::list<ModelHighAPI_Selection>& theRecoveredList,
35                       const bool thePersistent = false);
36
37   /// Destructor.
38   FEATURESAPI_EXPORT
39   virtual ~FeaturesAPI_Recover();
40
41   INTERFACE_3(FeaturesPlugin_Recover::ID(),
42               baseFeature, FeaturesPlugin_Recover::BASE_FEATURE(), 
43               ModelAPI_AttributeReference, /** Concealed feature */,
44               recoveredList, FeaturesPlugin_Recover::RECOVERED_ENTITIES(), 
45               ModelAPI_AttributeRefList, /** Recover list*/,
46               isPersistent, FeaturesPlugin_Recover::PERSISTENT(),
47               ModelAPI_AttributeBoolean, /** Is persistent flag */)
48
49   /// Set base feature.
50   FEATURESAPI_EXPORT
51   void setBaseFeature(const ModelHighAPI_Reference& theBaseFeature);
52
53   /// Set recovered list of the base feature
54   FEATURESAPI_EXPORT
55   void setRecoveredList(const std::list<ModelHighAPI_Selection>& theRecoverList);
56
57   /// Set auxiliary
58   FEATURESAPI_EXPORT
59   void setIsPersistent(bool thePersistent);
60
61   /// Dump wrapped feature
62   FEATURESAPI_EXPORT
63   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
64 };
65
66 /// Pointer on Recover object.
67 typedef std::shared_ptr<FeaturesAPI_Recover> RecoverPtr;
68
69 /// \ingroup CPPHighAPI
70 /// \brief Create Recover feature.
71 FEATURESAPI_EXPORT
72 RecoverPtr addRecover(const std::shared_ptr<ModelAPI_Document>& thePart,
73                       const ModelHighAPI_Reference& theBaseFeature,
74                       const std::list<ModelHighAPI_Selection>& theRecoveredList,
75                       const bool thePersistent = false);
76
77 #endif // FeaturesAPI_Recover_H_