1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: FeaturesAPI_Recover.h
4 // Created: 04 August 2016
5 // Author: Mikhail Ponikarov
7 #ifndef FeaturesAPI_Recover_H_
8 #define FeaturesAPI_Recover_H_
10 #include "FeaturesAPI.h"
12 #include <FeaturesPlugin_Recover.h>
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
17 class ModelHighAPI_Dumper;
18 class ModelHighAPI_Reference;
20 /// \class FeaturesAPI_Recover
21 /// \ingroup CPPHighAPI
22 /// \brief Interface for Recover feature.
23 class FeaturesAPI_Recover: public ModelHighAPI_Interface
26 /// Constructor without values.
28 explicit FeaturesAPI_Recover(const std::shared_ptr<ModelAPI_Feature>& theFeature);
30 /// Constructor with values.
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);
39 virtual ~FeaturesAPI_Recover();
41 INTERFACE_2(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*/)
49 void setBaseFeature(const ModelHighAPI_Reference& theBaseFeature);
51 /// Set recovered list of the base feature
53 void setRecoveredList(const std::list<ModelHighAPI_Selection>& theRecoverList);
55 /// Dump wrapped feature
57 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
60 /// Pointer on Recover object.
61 typedef std::shared_ptr<FeaturesAPI_Recover> RecoverPtr;
63 /// \ingroup CPPHighAPI
64 /// \brief Create Recover feature.
66 RecoverPtr addRecover(const std::shared_ptr<ModelAPI_Document>& thePart,
67 const ModelHighAPI_Reference& theBaseFeature,
68 const std::list<ModelHighAPI_Selection>& theRecoveredList,
69 const bool thePersistent = false);
71 #endif // FeaturesAPI_Recover_H_