X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_Plugin.h;h=822eeea51b1745803badcf392bf74db1bee378e3;hb=07889bdf129940bf25021b91aa58902e634a64ce;hp=dab7e9b1c19f5bf718604066f9c55e3691404c0b;hpb=38afbd899a8645c83e17f2c24a17a2b7414911b4;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Plugin.h b/src/SketchPlugin/SketchPlugin_Plugin.h index dab7e9b1c..822eeea51 100644 --- a/src/SketchPlugin/SketchPlugin_Plugin.h +++ b/src/SketchPlugin/SketchPlugin_Plugin.h @@ -4,22 +4,35 @@ // 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 +#include +#include +#include +#include -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_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); + SKETCHPLUGIN_EXPORT virtual FeaturePtr createFeature(std::string theFeatureID); - public: - /// Is needed for python wrapping by swig - SketchPlugin_Plugin(); + /// Constructor that registers features and other plugin elements. + SKETCHPLUGIN_EXPORT SketchPlugin_Plugin(); + + //! Redefinition of Events_Listener method + SKETCHPLUGIN_EXPORT virtual void processEvent(const std::shared_ptr& theMessage); + +protected: + //! Returns the state of the feature in the WorkBench: enabled or disabled for the moment. + std::shared_ptr getFeaturesState( + const std::shared_ptr& theFeature) const; }; #endif