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"
15 //--------------------------------------------------------------------------------------
16 class ModelAPI_Feature;
17 //--------------------------------------------------------------------------------------
18 /**\class ModelHighAPI_Interface
20 * \brief Base class for feature interfaces
22 class ModelHighAPI_Interface
26 MODELHIGHAPI_EXPORT explicit ModelHighAPI_Interface(const std::shared_ptr<ModelAPI_Feature> & theFeature);
28 MODELHIGHAPI_EXPORT virtual ~ModelHighAPI_Interface();
30 /// Return ModelAPI_Feature
31 MODELHIGHAPI_EXPORT std::shared_ptr<ModelAPI_Feature> feature() const;
33 /// Shortcut for feature()->getKind()
34 MODELHIGHAPI_EXPORT const std::string& getKind();
36 /// Shortcut for feature()->execute()
37 MODELHIGHAPI_EXPORT void execute();
39 /// Throw exception to event loop
40 MODELHIGHAPI_EXPORT void throwException(const std::string & theDescription);
43 std::shared_ptr<ModelAPI_Feature> myFeature;
46 //--------------------------------------------------------------------------------------
47 //--------------------------------------------------------------------------------------
48 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_INTERFACE_H_ */