SHAPER  9.12.0
InitializationPlugin_EvalListener Class Reference

Class which process the events from the event loop. More...

Inheritance diagram for InitializationPlugin_EvalListener:
Inheritance graph

Public Member Functions

virtual INITIALIZATIONPLUGIN_EXPORT void processEvent (const std::shared_ptr< Events_Message > &theMessage)
 Reimplemented from Events_Listener::processEvent(). More...
 
void initDataModel ()
 
virtual EVENTS_EXPORT bool groupMessages ()
 Listener that needs mostly grouped messages received returns true in this method. More...
 

Protected Member Functions

double evaluate (std::shared_ptr< ModelAPI_Feature > theParameter, const std::wstring &theExpression, std::string &theError, std::list< std::shared_ptr< ModelAPI_ResultParameter > > &theParamsList, const bool theIsParameter=false)
 Evaluates theExpression and returns its value. More...
 
double evaluate (std::wstring &theVariable, double theValueVariable, std::shared_ptr< ModelAPI_Feature > theParameter, const std::wstring &theExpression, std::string &theError, std::list< std::shared_ptr< ModelAPI_ResultParameter > > &theParamsList, bool theIsFirstTime)
 Evaluates theExpression with variable local and returns its value. More...
 
void processEvaluationEvent (const std::shared_ptr< Events_Message > &theMessage)
 Processes Evaluation event. 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

Class which process the events from the event loop.

Member Function Documentation

◆ processEvent()

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

Reimplemented from Events_Listener::processEvent().

Implements Events_Listener.

◆ evaluate() [1/2]

double InitializationPlugin_EvalListener::evaluate ( std::shared_ptr< ModelAPI_Feature theParameter,
const std::wstring &  theExpression,
std::string &  theError,
std::list< std::shared_ptr< ModelAPI_ResultParameter > > &  theParamsList,
const bool  theIsParameter = false 
)
protected

Evaluates theExpression and returns its value.

◆ evaluate() [2/2]

double InitializationPlugin_EvalListener::evaluate ( std::wstring &  theVariable,
double  theValueVariable,
std::shared_ptr< ModelAPI_Feature theParameter,
const std::wstring &  theExpression,
std::string &  theError,
std::list< std::shared_ptr< ModelAPI_ResultParameter > > &  theParamsList,
bool  theIsFirstTime 
)
protected

Evaluates theExpression with variable local and returns its value.

◆ processEvaluationEvent()

void InitializationPlugin_EvalListener::processEvaluationEvent ( const std::shared_ptr< Events_Message > &  theMessage)
protected

Processes Evaluation event.

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