Salome HOME
Add ModelHighAPI & ConstructionAPI pachages
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Interface.h
1 // Name   : ModelHighAPI_Interface.h
2 // Purpose: 
3 //
4 // History:
5 // 17/05/16 - Sergey POKHODENKO - Creation of the file
6
7 #ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_INTERFACE_H_
8 #define SRC_MODELHIGHAPI_MODELHIGHAPI_INTERFACE_H_
9
10 //--------------------------------------------------------------------------------------
11 #include <memory>
12 #include <string>
13 //--------------------------------------------------------------------------------------
14 class ModelAPI_Feature;
15 //--------------------------------------------------------------------------------------
16 /*
17  *
18  */
19 class ModelHighAPI_Interface
20 {
21 public:
22   explicit ModelHighAPI_Interface(const std::shared_ptr<ModelAPI_Feature> & theFeature);
23   virtual ~ModelHighAPI_Interface();
24
25   /// Return ModelAPI_Feature
26   std::shared_ptr<ModelAPI_Feature> feature() const;
27
28   /// Shortcut for feature()->execute()
29   void execute();
30
31   /// Throw exception to event loop.
32   void throwException(const std::string & theDescription);
33
34 protected:
35   std::shared_ptr<ModelAPI_Feature> myFeature;
36 };
37
38 //--------------------------------------------------------------------------------------
39 //--------------------------------------------------------------------------------------
40 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_INTERFACE_H_ */