Salome HOME
Resolve batch runtime errors on debian squeeze
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Plugin.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        SketchPlugin_Plugin.hxx
4 // Created:     31 Mar 2014
5 // Author:      Mikhail PONIKAROV
6
7 #ifndef SKETCHPLUGIN_PLUGIN_H_
8 #define SKETCHPLUGIN_PLUGIN_H_
9
10 #include <SketchPlugin.h>
11 #include <Events_Listener.h>
12 #include <ModelAPI_Plugin.h>
13 #include <ModelAPI_Feature.h>
14 #include <ModelAPI_Events.h>
15
16 /**\class SketchPlugin_Plugin
17  * \ingroup Plugins
18  * \brief Interface common for any plugin: allows to use plugin by the plugins manager.
19  */
20 class SKETCHPLUGIN_EXPORT SketchPlugin_Plugin : public ModelAPI_Plugin, public Events_Listener
21 {
22 public:
23   /// Creates the feature object of this plugin by the feature string ID
24   virtual FeaturePtr createFeature(std::string theFeatureID);
25
26  public:
27   SketchPlugin_Plugin();
28   //! Redefinition of Events_Listener method
29   virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
30 protected:
31   //! Returns the state of the feature in the WorkBench: enabled or disabled for the moment.
32   std::shared_ptr<ModelAPI_FeatureStateMessage> getFeaturesState(
33       const std::shared_ptr<ModelAPI_Feature>& theFeature) const;
34 };
35
36 #endif