1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: SketchPlugin_Plugin.hxx
4 // Created: 31 Mar 2014
5 // Author: Mikhail PONIKAROV
7 #ifndef SKETCHPLUGIN_PLUGIN_H_
8 #define SKETCHPLUGIN_PLUGIN_H_
10 #include <SketchPlugin.h>
11 #include <Events_Listener.h>
12 #include <ModelAPI_Plugin.h>
13 #include <ModelAPI_Feature.h>
14 #include <ModelAPI_Events.h>
16 /**\class SketchPlugin_Plugin
18 * \brief Interface common for any plugin: allows to use plugin by the plugins manager.
20 class SKETCHPLUGIN_EXPORT SketchPlugin_Plugin : public ModelAPI_Plugin, public Events_Listener
23 /// Creates the feature object of this plugin by the feature string ID
24 virtual FeaturePtr createFeature(std::string theFeatureID);
27 SketchPlugin_Plugin();
28 //! Redefinition of Events_Listener method
29 virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
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;