Salome HOME
7e6c41d257081652746f4819fd9fb7cce89dcc60
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Interface.cpp
1 // Name   : ModelHighAPI_Interface.cpp
2 // Purpose: 
3 //
4 // History:
5 // 17/05/16 - Sergey POKHODENKO - Creation of the file
6
7 //--------------------------------------------------------------------------------------
8 #include "ModelHighAPI_Interface.h"
9 //--------------------------------------------------------------------------------------
10 #include <Events_Error.h>
11
12 #include <ModelAPI_Feature.h>
13 //--------------------------------------------------------------------------------------
14 ModelHighAPI_Interface::ModelHighAPI_Interface(const std::shared_ptr<ModelAPI_Feature> & theFeature)
15 : myFeature(theFeature)
16 {
17
18 }
19
20 ModelHighAPI_Interface::~ModelHighAPI_Interface()
21 {
22
23 }
24
25 //--------------------------------------------------------------------------------------
26 std::shared_ptr<ModelAPI_Feature> ModelHighAPI_Interface::feature() const
27 {
28   return myFeature;
29 }
30
31 const std::string& ModelHighAPI_Interface::getKind() const
32 {
33   return feature()->getKind();
34 }
35
36 void ModelHighAPI_Interface::execute()
37 {
38   feature()->execute();
39 }
40
41 void ModelHighAPI_Interface::throwException(const std::string & theDescription)
42 {
43   Events_Error::send(theDescription);
44 }