SHAPER  9.12.0
Events_Listener Class Referenceabstract

Base interface for any event listener. More...

Inheritance diagram for Events_Listener:
Inheritance graph

Public Member Functions

virtual EVENTS_EXPORT void processEvent (const std::shared_ptr< Events_Message > &theMessage)=0
 This method is called by loop when the event is started to process. More...
 
virtual EVENTS_EXPORT bool groupMessages ()
 Listener that needs mostly grouped messages received returns true in this method. More...
 

Protected Member Functions

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...
 

Friends

class Events_Loop
 

Detailed Description

Base interface for any event listener.

If some object wants to listen some events it must inherit this class and register in the Loop.

Member Function Documentation

◆ processEvent()

◆ groupMessages()

virtual EVENTS_EXPORT bool Events_Listener::groupMessages ( )
inlinevirtual

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)
protected

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

◆ flushGrouped()

void Events_Listener::flushGrouped ( const Events_ID theID)
protected

Sends myGroups on flush finish.