SHAPER  9.12.0
SketchPlugin_Plugin Class Reference

Interface common for any plugin: allows to use plugin by the plugins manager. More...

Inheritance diagram for SketchPlugin_Plugin:
Inheritance graph

Public Member Functions

virtual SKETCHPLUGIN_EXPORT FeaturePtr createFeature (std::string theFeatureID)
 Creates the feature object of this plugin by the feature string ID. More...
 
SKETCHPLUGIN_EXPORT SketchPlugin_Plugin ()
 Constructor that registers features and other plugin elements. More...
 
virtual SKETCHPLUGIN_EXPORT void processEvent (const std::shared_ptr< Events_Message > &theMessage)
 Redefinition of Events_Listener method. More...
 
virtual EVENTS_EXPORT bool groupMessages ()
 Listener that needs mostly grouped messages received returns true in this method. More...
 

Protected Member Functions

std::shared_ptr< ModelAPI_FeatureStateMessagegetFeaturesState (const std::shared_ptr< ModelAPI_Feature > &theFeature) const
 Returns the state of the feature in the WorkBench: enabled or disabled for the moment. More...
 
void groupWhileFlush (const std::shared_ptr< Events_Message > &theMessage)
 Allows to group messages while they are flushed (for flush for groupMessages=true listeners) More...
 
EVENTS_EXPORT void flushGrouped (const Events_ID &theID)
 Sends myGroups on flush finish. More...
 

Detailed Description

Interface common for any plugin: allows to use plugin by the plugins manager.

Constructor & Destructor Documentation

◆ SketchPlugin_Plugin()

SketchPlugin_Plugin::SketchPlugin_Plugin ( )

Constructor that registers features and other plugin elements.

Member Function Documentation

◆ createFeature()

FeaturePtr SketchPlugin_Plugin::createFeature ( std::string  theFeatureID)
virtual

Creates the feature object of this plugin by the feature string ID.

Implements ModelAPI_Plugin.

◆ processEvent()

void SketchPlugin_Plugin::processEvent ( const std::shared_ptr< Events_Message > &  theMessage)
virtual

Redefinition of Events_Listener method.

Implements Events_Listener.

◆ getFeaturesState()

std::shared_ptr< ModelAPI_FeatureStateMessage > SketchPlugin_Plugin::getFeaturesState ( const std::shared_ptr< ModelAPI_Feature > &  theFeature) const
protected

Returns the state of the feature in the WorkBench: enabled or disabled for the moment.

◆ groupMessages()

virtual EVENTS_EXPORT bool Events_Listener::groupMessages ( )
inlinevirtualinherited

Listener that needs mostly grouped messages received returns true in this method.

In this case during the message is flushed, all the new messages are grouped, not sended immideately and then sent in the end of flush.

Reimplemented in SketchSolver_Manager, and SketchPlugin_OverConstraintsResolver.

◆ groupWhileFlush()

void Events_Listener::groupWhileFlush ( const std::shared_ptr< Events_Message > &  theMessage)
protectedinherited

Allows to group messages while they are flushed (for flush for groupMessages=true listeners)

◆ flushGrouped()

void Events_Listener::flushGrouped ( const Events_ID theID)
protectedinherited

Sends myGroups on flush finish.