Salome HOME
Update Split feature and corresponding unit test
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Plugin.h
index dab7e9b1c19f5bf718604066f9c55e3691404c0b..3b9de25ef6941f1ec63831c3a2aec82e8c0b0c03 100644 (file)
@@ -4,22 +4,33 @@
 // Created:     31 Mar 2014
 // Author:      Mikhail PONIKAROV
 
-#ifndef SketchPlugin_Plugin_H_
-#define SketchPlugin_Plugin_H_
+#ifndef SKETCHPLUGIN_PLUGIN_H_
+#define SKETCHPLUGIN_PLUGIN_H_
 
-#include "SketchPlugin.h"
-#include "ModelAPI_Plugin.h"
-#include "ModelAPI_Feature.h"
+#include <SketchPlugin.h>
+#include <Events_Listener.h>
+#include <ModelAPI_Plugin.h>
+#include <ModelAPI_Feature.h>
+#include <ModelAPI_Events.h>
 
-class SKETCHPLUGIN_EXPORT SketchPlugin_Plugin : public ModelAPI_Plugin
+/**\class SketchPlugin_Plugin
+ * \ingroup Plugins
+ * \brief Interface common for any plugin: allows to use plugin by the plugins manager.
+ */
+class SKETCHPLUGIN_EXPORT SketchPlugin_Plugin : public ModelAPI_Plugin, public Events_Listener
 {
- public:
+public:
   /// Creates the feature object of this plugin by the feature string ID
   virtual FeaturePtr createFeature(std::string theFeatureID);
 
  public:
-  /// Is needed for python wrapping by swig
   SketchPlugin_Plugin();
+  //! Redefinition of Events_Listener method
+  virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
+protected:
+  //! Returns the state of the feature in the WorkBench: enabled or disabled for the moment.
+  std::shared_ptr<ModelAPI_FeatureStateMessage> getFeaturesState(
+      const std::shared_ptr<ModelAPI_Feature>& theFeature) const;
 };
 
 #endif