1 // Name : ModelHighAPI_Interface.h
5 // 17/05/16 - Sergey POKHODENKO - Creation of the file
7 #ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_INTERFACE_H_
8 #define SRC_MODELHIGHAPI_MODELHIGHAPI_INTERFACE_H_
10 //--------------------------------------------------------------------------------------
11 #include "ModelHighAPI.h"
16 //--------------------------------------------------------------------------------------
17 class ModelAPI_Feature;
18 class ModelHighAPI_Selection;
19 //--------------------------------------------------------------------------------------
20 /**\class ModelHighAPI_Interface
22 * \brief Base class for feature interfaces
24 class ModelHighAPI_Interface
29 explicit ModelHighAPI_Interface(const std::shared_ptr<ModelAPI_Feature> & theFeature);
32 virtual ~ModelHighAPI_Interface();
34 /// Return ModelAPI_Feature
36 std::shared_ptr<ModelAPI_Feature> feature() const;
38 /// Shortcut for feature()->getKind()
40 const std::string& getKind() const;
42 /// Shortcut for feature()->execute()
46 /// Return all objects of the feature
48 virtual std::list<ModelHighAPI_Selection> result() const;
50 /// Throw exception to event loop
52 void throwException(const std::string & theDescription);
55 std::shared_ptr<ModelAPI_Feature> myFeature;
58 //--------------------------------------------------------------------------------------
59 //--------------------------------------------------------------------------------------
60 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_INTERFACE_H_ */