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_Plugin : public ModelAPI_Plugin, public Events_Listener
23 /// Creates the feature object of this plugin by the feature string ID
24 SKETCHPLUGIN_EXPORT virtual FeaturePtr createFeature(std::string theFeatureID);
26 /// Constructor that registers features and other plugin elements.
27 SKETCHPLUGIN_EXPORT SketchPlugin_Plugin();
29 //! Redefinition of Events_Listener method
30 SKETCHPLUGIN_EXPORT virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
33 //! Returns the state of the feature in the WorkBench: enabled or disabled for the moment.
34 std::shared_ptr<ModelAPI_FeatureStateMessage> getFeaturesState(
35 const std::shared_ptr<ModelAPI_Feature>& theFeature) const;