20 #ifndef MODELAPI_EVENTS_H_
21 #define MODELAPI_EVENTS_H_
24 #include <ModelAPI_Object.h>
25 #include <ModelAPI_Feature.h>
26 #include <ModelAPI_Attribute.h>
27 #include <Events_MessageGroup.h>
28 #include <Events_Loop.h>
41 #if defined __GNUC__ || defined __clang__
42 #define MAYBE_UNUSED __attribute__((unused))
48 MAYBE_UNUSED
static const char * EVENT_OBJECT_CREATED =
"ObjectCreated";
50 MAYBE_UNUSED
static const char * EVENT_OBJECT_UPDATED =
"ObjectUpdated";
52 MAYBE_UNUSED
static const char * EVENT_OBJECT_DELETED =
"ObjectDeleted";
54 MAYBE_UNUSED
static const char * EVENT_OBJECT_RENAMED =
"ObjectRenamed";
56 MAYBE_UNUSED
static const char * EVENT_OBJECT_MOVED =
"ObjectsMoved";
58 MAYBE_UNUSED
static const char * EVENT_OBJECT_TO_REDISPLAY =
"ObjectsToRedisplay";
60 MAYBE_UNUSED
static const char * EVENT_PLUGIN_LOADED =
"PluginLoaded";
62 MAYBE_UNUSED
static const char * EVENT_DOCUMENT_CHANGED =
"CurrentDocumentChanged";
64 MAYBE_UNUSED
static const char * EVENT_DOCUMENTS_CLOSED =
"AllDocumentsClosed";
68 MAYBE_UNUSED
static const char * EVENT_ORDER_UPDATED =
"OrderUpdated";
70 MAYBE_UNUSED
static const char * EVENT_UPDATE_SELECTION =
"UpdateSelection";
73 MAYBE_UNUSED
static const char * EVENT_FEATURE_STATE_REQUEST =
"FeatureStateRequest";
75 MAYBE_UNUSED
static const char * EVENT_FEATURE_STATE_RESPONSE =
"FeatureStateResponse";
78 MAYBE_UNUSED
static const char * EVENT_UPDATE_VIEWER_BLOCKED =
"UpdateViewerBlocked";
80 MAYBE_UNUSED
static const char * EVENT_UPDATE_VIEWER_UNBLOCKED =
"UpdateViewerUnblocked";
83 MAYBE_UNUSED
static const char * EVENT_EMPTY_AIS_PRESENTATION =
"EmptyAISPresentation";
85 MAYBE_UNUSED
static const char * EVENT_EMPTY_OPERATION_PRESENTATION =
"EmptyOperationPresentation";
87 MAYBE_UNUSED
static const char * EVENT_PREVIEW_BLOCKED =
"PreviewBlocked";
89 MAYBE_UNUSED
static const char * EVENT_PREVIEW_REQUESTED =
"PreviewRequested";
91 MAYBE_UNUSED
static const char * EVENT_AUTOMATIC_RECOMPUTATION_DISABLE
92 =
"DisableAutomaticRecomputation";
94 MAYBE_UNUSED
static const char * EVENT_AUTOMATIC_RECOMPUTATION_ENABLE
95 =
"EnableAutomaticRecomputation";
98 MAYBE_UNUSED
static const char * EVENT_SOLVER_FAILED =
"SolverFailed";
100 MAYBE_UNUSED
static const char * EVENT_SOLVER_REPAIRED =
"SolverRepaired";
103 MAYBE_UNUSED
static const char * EVENT_SKETCH_FULLY_CONSTRAINED =
"SketchFullyConstrainted";
105 MAYBE_UNUSED
static const char * EVENT_SKETCH_UNDER_CONSTRAINED =
"SketchUnderConstrainted";
107 MAYBE_UNUSED
static const char * EVENT_SKETCH_OVER_CONSTRAINED =
"SketchOverConstrainted";
110 MAYBE_UNUSED
static const char * EVENT_STABILITY_CHANGED =
"StabilityChanged";
113 MAYBE_UNUSED
static const char * EVENT_SKETCH_PREPARED =
"SketchPrepared";
116 MAYBE_UNUSED
static const char * EVENT_GET_DOF_OBJECTS =
"GetDoFObjects";
119 MAYBE_UNUSED
static const char * EVENT_DOF_OBJECTS =
"DoFObjects";
122 MAYBE_UNUSED
static const char * EVENT_VISUAL_ATTRIBUTES =
"UpdateVisualAttributes";
125 MAYBE_UNUSED
static const char * EVENT_OPERATION_SHAPES_FAILED =
"OperationShapesFailed";
127 MAYBE_UNUSED
static const char * EVENT_CHECK_CONSTRAINTS =
"CheckConstrains";
129 MAYBE_UNUSED
static const char * EVENT_REMOVE_CONSTRAINTS =
"RemoveConstrains";
132 MAYBE_UNUSED
static const char * EVENT_FEATURE_LICENSE_VALID =
"FeaturesLicenseValid";
135 MAYBE_UNUSED
static const char * EVENT_CREATE_PART_ON_START =
"CreatePartOnStart";
149 virtual const std::set<ObjectPtr>&
objects()
const = 0;
152 virtual std::shared_ptr<Events_MessageGroup>
newEmpty() = 0;
155 virtual void Join(
const std::shared_ptr<Events_MessageGroup>& theJoined) = 0;
169 virtual const std::list<std::pair<std::shared_ptr<ModelAPI_Document>, std::string> >&
173 virtual std::shared_ptr<Events_MessageGroup>
newEmpty() = 0;
179 virtual void Join(
const std::shared_ptr<Events_MessageGroup>& theJoined) = 0;
193 virtual std::shared_ptr<ModelAPI_Feature>
reordered() = 0;
207 const bool isGroupped =
true)
const = 0;
210 const bool isGroupped =
true)
const = 0;
212 virtual void sendDeleted(
const std::shared_ptr<ModelAPI_Document>& theDoc,
213 const std::string& theGroup)
const = 0;
215 virtual void sendReordered(
const std::shared_ptr<ModelAPI_Feature>& theReordered)
const = 0;
234 MODELAPI_EXPORT std::shared_ptr<ModelAPI_Feature>
feature()
const;
236 MODELAPI_EXPORT
void setFeature(std::shared_ptr<ModelAPI_Feature>& theFeature);
239 MODELAPI_EXPORT
bool hasState(
const std::string& theFeatureId)
const;
241 MODELAPI_EXPORT
bool state(
const std::string& theFeatureId,
bool theDefault =
false)
const;
243 MODELAPI_EXPORT
void setState(
const std::string& theFeatureId,
bool theValue);
245 MODELAPI_EXPORT std::list<std::string>
features()
const;
249 std::shared_ptr<ModelAPI_Feature> myCurrentFeature;
251 std::map<std::string, bool> myFeatureState;
257 DocumentPtr myDocument;
267 static const char * MY_DOCUMENT_CREATED_EVENT_ID(
"DocumentCreated");
272 MODELAPI_EXPORT DocumentPtr
document()
const;
274 MODELAPI_EXPORT
void setDocument(DocumentPtr theDocument);
280 AttributePtr myAttribute;
286 static const char * MY_ATTRIBUTE_EVALUATION_EVENT_ID(
"AttributeEvaluationRequest");
292 MODELAPI_EXPORT
static void send(AttributePtr theAttribute,
const void* theSender)
294 std::shared_ptr<ModelAPI_AttributeEvalMessage> aMessage =
295 std::shared_ptr<ModelAPI_AttributeEvalMessage>(
297 aMessage->setAttribute(theAttribute);
307 MODELAPI_EXPORT AttributePtr
attribute()
const;
309 MODELAPI_EXPORT
void setAttribute(AttributePtr theAttribute);
318 std::list<std::shared_ptr<ModelAPI_ResultParameter> > myParamsList;
326 static const char * MY_PARAMETER_EVALUATION_EVENT_ID(
"ParameterEvaluationRequest");
333 MODELAPI_EXPORT
static std::shared_ptr<ModelAPI_ParameterEvalMessage>
334 send(FeaturePtr theParameter,
const void* theSender)
336 std::shared_ptr<ModelAPI_ParameterEvalMessage> aMessage =
337 std::shared_ptr<ModelAPI_ParameterEvalMessage>(
339 aMessage->setParameter(theParameter);
350 MODELAPI_EXPORT FeaturePtr
parameter()
const;
355 const std::list<std::shared_ptr<ModelAPI_ResultParameter> >& theParamsList,
356 const double theResult,
const std::string& theError);
360 MODELAPI_EXPORT
const std::list<std::shared_ptr<ModelAPI_ResultParameter> >&
params()
const;
362 MODELAPI_EXPORT
const double&
result()
const;
364 MODELAPI_EXPORT
const std::string&
error()
const;
369 std::string myFilename;
376 static const char* MY_PARAMETER_EVALUATION_EVENT_ID(
"ImportParametersMessage");
383 MODELAPI_EXPORT
static std::shared_ptr<ModelAPI_ImportParametersMessage>
384 send(std::string theParameter,
const void* theSender)
386 std::shared_ptr<ModelAPI_ImportParametersMessage> aMessage =
387 std::shared_ptr<ModelAPI_ImportParametersMessage>(
389 aMessage->setFilename(theParameter);
396 const void* theSender = 0);
401 MODELAPI_EXPORT std::string
filename()
const;
403 MODELAPI_EXPORT
void setFilename(std::string theFilename);
412 std::list<std::shared_ptr<ModelAPI_ResultParameter> > myParamsList;
418 static const char * MY_BUILD_EVALUATION_EVENT_ID(
"BuildEvaluationRequest");
425 MODELAPI_EXPORT
static std::shared_ptr<ModelAPI_BuildEvalMessage>
426 send(FeaturePtr theParameter,
const void* theSender)
428 std::shared_ptr<ModelAPI_BuildEvalMessage> aMessage =
429 std::shared_ptr<ModelAPI_BuildEvalMessage>(
431 aMessage->setParameter(theParameter);
442 MODELAPI_EXPORT FeaturePtr
parameter()
const;
447 const std::list<std::shared_ptr<ModelAPI_ResultParameter> >& theParamsList,
448 const std::string& theError);
450 MODELAPI_EXPORT
const std::list<std::shared_ptr<ModelAPI_ResultParameter> >&
params()
const;
455 MODELAPI_EXPORT
const std::string&
error()
const;
461 std::wstring myExpression;
462 std::wstring myParamName;
463 std::list<std::pair<int, int> > myPositions;
469 static const char * MY_COMPUTE_POSITIOND_EVENT_ID(
"ComputePositionsRequest");
476 MODELAPI_EXPORT
static std::shared_ptr<ModelAPI_ComputePositionsMessage>
477 send(
const std::wstring& theExpression,
const std::wstring& theParameter,
const void* theSender)
479 std::shared_ptr<ModelAPI_ComputePositionsMessage> aMessage =
480 std::shared_ptr<ModelAPI_ComputePositionsMessage>(
482 aMessage->set(theExpression, theParameter);
489 const Events_ID theID,
const void* theSender = 0);
494 MODELAPI_EXPORT
const std::wstring&
expression()
const;
496 MODELAPI_EXPORT
const std::wstring&
parameter()
const;
498 MODELAPI_EXPORT
void set(
const std::wstring& theExpression,
const std::wstring& theParameter);
500 MODELAPI_EXPORT
void setPositions(
const std::list<std::pair<int, int> >& thePositions);
502 MODELAPI_EXPORT
const std::list<std::pair<int, int> >&
positions()
const;
509 std::wstring myOldName;
510 std::wstring myNewName;
516 static const char * MY_OBJECT_RENAMED_EVENT_ID(
"ObjectRenamed");
522 MODELAPI_EXPORT
static void send(ObjectPtr theObject,
523 const std::wstring& theOldName,
524 const std::wstring& theNewName,
525 const void* theSender);
533 MODELAPI_EXPORT ObjectPtr
object()
const;
535 MODELAPI_EXPORT
void setObject(ObjectPtr theObject);
537 MODELAPI_EXPORT std::wstring
oldName()
const;
539 MODELAPI_EXPORT
void setOldName(
const std::wstring& theOldName);
541 MODELAPI_EXPORT std::wstring
newName()
const;
543 MODELAPI_EXPORT
void setNewName(
const std::wstring& theNewName);
555 static const char * MY_EVENT_ID(
"ReplaceParameter");
561 MODELAPI_EXPORT
static void send(ObjectPtr theObject,
562 const void* theSender);
571 MODELAPI_EXPORT ObjectPtr
object()
const;
573 MODELAPI_EXPORT
void setObject(ObjectPtr theObject);
586 MODELAPI_EXPORT
void setObjects(
const std::set<ObjectPtr>& theObjects);
588 MODELAPI_EXPORT
const std::set<ObjectPtr>&
objects()
const;
591 void dof(
const int theDOF) { myDOF = theDOF; }
593 const int&
dof()
const {
return myDOF; }
596 std::set<ObjectPtr> myObjects;
604 ObjectPtr myMovedObject;
605 AttributePtr myMovedAttribute;
606 int myMovedPointIndex;
608 std::shared_ptr<GeomAPI_Pnt2d> myOriginalPosition;
609 std::shared_ptr<GeomAPI_Pnt2d> myCurrentPosition;
615 MODELAPI_EXPORT
void setMovedObject(
const ObjectPtr& theMovedObject);
620 const int thePointIndex = -1);
624 {
return myMovedObject; }
627 {
return myMovedAttribute; }
630 {
return myMovedPointIndex; }
638 {
return myOriginalPosition; }
643 MODELAPI_EXPORT
void setCurrentPosition(
const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
646 {
return myCurrentPosition; }
664 MODELAPI_EXPORT
void setShapes(
const std::list< std::shared_ptr<GeomAPI_Shape> >& theVertices);
666 MODELAPI_EXPORT
const std::list< std::shared_ptr<GeomAPI_Shape> >&
shapes()
const;
669 std::list< std::shared_ptr<GeomAPI_Shape> > myShapes;
678 const Events_ID theID,
const void* theSender = 0);
683 MODELAPI_EXPORT
const std::set<ObjectPtr>&
constraints()
const;
686 MODELAPI_EXPORT
void setConstraints(
const std::set<ObjectPtr>& theConstraints);
689 std::set<ObjectPtr> myConstraints;
709 MODELAPI_EXPORT
void setFeatures(
const std::set<std::string>& theFeatures);
711 MODELAPI_EXPORT
const std::set<std::string>&
features()
const;
714 std::set<std::string> myFeatures;
Identifier of the event kind.
Definition: Events_Message.h:36
static EVENTS_EXPORT Events_Loop * loop()
! Returns the main object of the loop, one per application.
Definition: Events_Loop.cpp:26
EVENTS_EXPORT void send(const std::shared_ptr< Events_Message > &theMessage, bool isGroup=true)
Allows to send an event.
Definition: Events_Loop.cpp:66
static EVENTS_EXPORT Events_ID eventByName(const char *theName)
Returns the unique event by the given name.
Definition: Events_Loop.cpp:33
Message that allows to group messages and send them later as a group of messages.
Definition: Events_MessageGroup.h:34
Message for communication between sender and listener of event.
Definition: Events_Message.h:65
2D point defined by two coordinates
Definition: GeomAPI_Pnt2d.h:36
Interface to the topological shape object.
Definition: GeomAPI_Shape.h:43
Message that attribute text should be evaluated in the attribute value.
Definition: ModelAPI_Events.h:279
static MODELAPI_EXPORT Events_ID & eventId()
Static. Returns EventID of the message.
Definition: ModelAPI_Events.h:284
virtual MODELAPI_EXPORT ~ModelAPI_AttributeEvalMessage()
The virtual destructor.
Definition: ModelAPI_Events.cpp:129
static MODELAPI_EXPORT void send(AttributePtr theAttribute, const void *theSender)
Useful method that creates and sends the AttributeEvalMessage event.
Definition: ModelAPI_Events.h:292
MODELAPI_EXPORT AttributePtr attribute() const
Returns a document stored in the message.
Definition: ModelAPI_Events.cpp:132
MODELAPI_EXPORT void setAttribute(AttributePtr theAttribute)
Sets an attribute to the message.
Definition: ModelAPI_Events.cpp:137
MODELAPI_EXPORT ModelAPI_AttributeEvalMessage(const Events_ID theID, const void *theSender=0)
Creates an empty message.
Definition: ModelAPI_Events.cpp:124
Definition: ModelAPI_Events.h:407
static MODELAPI_EXPORT Events_ID & eventId()
Static. Returns EventID of the message.
Definition: ModelAPI_Events.h:416
MODELAPI_EXPORT const std::list< std::shared_ptr< ModelAPI_ResultParameter > > & params() const
Returns the results of processing: list of parameters found in the expression.
Definition: ModelAPI_Events.cpp:241
static MODELAPI_EXPORT std::shared_ptr< ModelAPI_BuildEvalMessage > send(FeaturePtr theParameter, const void *theSender)
Useful method that creates and sends the event.
Definition: ModelAPI_Events.h:426
MODELAPI_EXPORT void setParameter(FeaturePtr theParam)
Sets a parameter to the message.
Definition: ModelAPI_Events.cpp:226
MODELAPI_EXPORT const std::string & error() const
Returns the interpreter error (empty if no error)
Definition: ModelAPI_Events.cpp:251
MODELAPI_EXPORT FeaturePtr parameter() const
Returns a parameter stored in the message.
Definition: ModelAPI_Events.cpp:221
MODELAPI_EXPORT ModelAPI_BuildEvalMessage(const Events_ID theID, const void *theSender=0)
Creates an empty message.
Definition: ModelAPI_Events.cpp:213
MODELAPI_EXPORT bool isProcessed()
Returns true if the expression is processed.
Definition: ModelAPI_Events.cpp:246
MODELAPI_EXPORT void setResults(const std::list< std::shared_ptr< ModelAPI_ResultParameter > > &theParamsList, const std::string &theError)
Sets the results of processing.
Definition: ModelAPI_Events.cpp:231
virtual MODELAPI_EXPORT ~ModelAPI_BuildEvalMessage()
The virtual destructor.
Definition: ModelAPI_Events.cpp:218
Message that sends the constraints to check or remove.
Definition: ModelAPI_Events.h:674
MODELAPI_EXPORT ModelAPI_CheckConstraintsMessage(const Events_ID theID, const void *theSender=0)
Creates an empty message.
Definition: ModelAPI_Events.cpp:475
MODELAPI_EXPORT const std::set< ObjectPtr > & constraints() const
Get list of constrains.
Definition: ModelAPI_Events.cpp:485
MODELAPI_EXPORT void setConstraints(const std::set< ObjectPtr > &theConstraints)
Set list of constrains.
Definition: ModelAPI_Events.cpp:490
virtual MODELAPI_EXPORT ~ModelAPI_CheckConstraintsMessage()
The virtual destructor.
Definition: ModelAPI_Events.cpp:481
Message to ask compute the positions of parameters in the expression.
Definition: ModelAPI_Events.h:460
MODELAPI_EXPORT void set(const std::wstring &theExpression, const std::wstring &theParameter)
Sets an expression and parameter needed for computation.
Definition: ModelAPI_Events.cpp:274
virtual MODELAPI_EXPORT ~ModelAPI_ComputePositionsMessage()
The virtual destructor.
Definition: ModelAPI_Events.cpp:261
static MODELAPI_EXPORT Events_ID & eventId()
Static. Returns EventID of the message.
Definition: ModelAPI_Events.h:467
static MODELAPI_EXPORT std::shared_ptr< ModelAPI_ComputePositionsMessage > send(const std::wstring &theExpression, const std::wstring &theParameter, const void *theSender)
Useful method that creates and sends the AttributeEvalMessage event Returns the message,...
Definition: ModelAPI_Events.h:477
MODELAPI_EXPORT const std::wstring & parameter() const
Returns a parameter name stored in the message.
Definition: ModelAPI_Events.cpp:269
MODELAPI_EXPORT const std::list< std::pair< int, int > > & positions() const
Returns the results of processing: position start and end indices.
Definition: ModelAPI_Events.cpp:287
MODELAPI_EXPORT ModelAPI_ComputePositionsMessage(const Events_ID theID, const void *theSender=0)
Creates an empty message.
Definition: ModelAPI_Events.cpp:256
MODELAPI_EXPORT const std::wstring & expression() const
Returns an expression stored in the message.
Definition: ModelAPI_Events.cpp:264
MODELAPI_EXPORT void setPositions(const std::list< std::pair< int, int > > &thePositions)
Sets the results of processing.
Definition: ModelAPI_Events.cpp:281
Message that document (Part, PartSet) was created.
Definition: ModelAPI_Events.h:256
MODELAPI_EXPORT DocumentPtr document() const
Returns a document stored in the message.
Definition: ModelAPI_Events.cpp:114
MODELAPI_EXPORT ModelAPI_DocumentCreatedMessage(const Events_ID theID, const void *theSender=0)
Creates an empty message.
Definition: ModelAPI_Events.cpp:106
virtual MODELAPI_EXPORT ~ModelAPI_DocumentCreatedMessage()
The virtual destructor.
Definition: ModelAPI_Events.cpp:111
static MODELAPI_EXPORT Events_ID eventId()
Static. Returns EventID of the message.
Definition: ModelAPI_Events.h:265
MODELAPI_EXPORT void setDocument(DocumentPtr theDocument)
Sets a document to the message.
Definition: ModelAPI_Events.cpp:119
Document for internal data structure of any object storage.
Definition: ModelAPI_Document.h:53
Allows to create ModelAPI messages.
Definition: ModelAPI_Events.h:201
virtual void sendDeleted(const std::shared_ptr< ModelAPI_Document > &theDoc, const std::string &theGroup) const =0
creates deleted message and sends to the loop
virtual void sendReordered(const std::shared_ptr< ModelAPI_Feature > &theReordered) const =0
creates reordered message and sends to the loop
virtual void sendUpdated(const std::list< ObjectPtr > &theObjects, const Events_ID &theEvent, const bool isGroupped=true) const =0
creates created, updated or moved messages with the objects collection and sends to the loop
virtual void sendUpdated(const ObjectPtr &theObject, const Events_ID &theEvent, const bool isGroupped=true) const =0
creates created, updated or moved messages and sends to the loop
Contains the state information about the feature: is it enabled or disabled.
Definition: ModelAPI_Events.h:226
MODELAPI_EXPORT bool hasState(const std::string &theFeatureId) const
Returns true if feature has specific state.
Definition: ModelAPI_Events.cpp:77
MODELAPI_EXPORT ModelAPI_FeatureStateMessage(const Events_ID theID, const void *theSender=0)
Creates an empty message.
Definition: ModelAPI_Events.cpp:57
MODELAPI_EXPORT bool state(const std::string &theFeatureId, bool theDefault=false) const
Returns true if feature is enabled.
Definition: ModelAPI_Events.cpp:82
MODELAPI_EXPORT std::list< std::string > features() const
Returns all feature IDs with states.
Definition: ModelAPI_Events.cpp:95
MODELAPI_EXPORT void setFeature(std::shared_ptr< ModelAPI_Feature > &theFeature)
Stores the feature this message is related to.
Definition: ModelAPI_Events.cpp:72
virtual MODELAPI_EXPORT ~ModelAPI_FeatureStateMessage()
The virtual destructor.
Definition: ModelAPI_Events.cpp:64
MODELAPI_EXPORT void setState(const std::string &theFeatureId, bool theValue)
Stores the feature state.
Definition: ModelAPI_Events.cpp:90
MODELAPI_EXPORT std::shared_ptr< ModelAPI_Feature > feature() const
Returns the feature this message is related to.
Definition: ModelAPI_Events.cpp:67
Message that sends the features which license is checked and valid.
Definition: ModelAPI_Events.h:695
MODELAPI_EXPORT void setFeatures(const std::set< std::string > &theFeatures)
Sets list of features with valid license.
Definition: ModelAPI_Events.cpp:505
MODELAPI_EXPORT const std::set< std::string > & features() const
Returns list of features with valid license.
Definition: ModelAPI_Events.cpp:510
MODELAPI_EXPORT ModelAPI_FeaturesLicenseValidMessage(const Events_ID theID, const void *theSender=0)
Creates an message.
Definition: ModelAPI_Events.cpp:497
virtual MODELAPI_EXPORT ~ModelAPI_FeaturesLicenseValidMessage()
Default destructor.
Definition: ModelAPI_Events.cpp:502
static MODELAPI_EXPORT Events_ID eventId()
Static. Returns EventID of the message.
Definition: ModelAPI_Events.h:703
Definition: ModelAPI_Events.h:368
MODELAPI_EXPORT void setFilename(std::string theFilename)
Sets a filename to the message.
Definition: ModelAPI_Events.cpp:208
virtual MODELAPI_EXPORT ~ModelAPI_ImportParametersMessage()
The virtual destructor.
Definition: ModelAPI_Events.cpp:199
MODELAPI_EXPORT std::string filename() const
Returns a filename stored in the message.
Definition: ModelAPI_Events.cpp:203
MODELAPI_EXPORT ModelAPI_ImportParametersMessage(const Events_ID theID, const void *theSender=0)
Creates an empty message.
Definition: ModelAPI_Events.cpp:192
static MODELAPI_EXPORT Events_ID & eventId()
Static. Returns EventID of the message.
Definition: ModelAPI_Events.h:374
static MODELAPI_EXPORT std::shared_ptr< ModelAPI_ImportParametersMessage > send(std::string theParameter, const void *theSender)
Useful method that creates and sends the event.
Definition: ModelAPI_Events.h:384
Message that feature was deleted (used for Object Browser update)
Definition: ModelAPI_Events.h:160
virtual const std::list< std::pair< std::shared_ptr< ModelAPI_Document >, std::string > > & groups() const =0
Returns the groups where the objects were deleted.
virtual void Join(const std::shared_ptr< Events_MessageGroup > &theJoined)=0
Appends to this message the given one.
virtual const Events_ID messageId()=0
Returns the identifier of the kind of a message.
virtual std::shared_ptr< Events_MessageGroup > newEmpty()=0
Creates the new empty message of this kind.
Message sent when feature or attribute has been moved.
Definition: ModelAPI_Events.h:603
const std::shared_ptr< GeomAPI_Pnt2d > & originalPosition() const
Return original mouse position.
Definition: ModelAPI_Events.h:637
ObjectPtr movedObject() const
Return moved object.
Definition: ModelAPI_Events.h:623
MODELAPI_EXPORT void setMovedAttribute(const AttributePtr &theMovedAttribute, const int thePointIndex=-1)
Set attribute which is being moved (if the message already contains object it will be cleared)
Definition: ModelAPI_Events.cpp:404
const std::shared_ptr< GeomAPI_Pnt2d > & currentPosition() const
Return current mouse position.
Definition: ModelAPI_Events.h:645
AttributePtr movedAttribute() const
Return moved attribute.
Definition: ModelAPI_Events.h:626
MODELAPI_EXPORT void setMovedObject(const ObjectPtr &theMovedObject)
Set object which is being moved (if the message already contains attribute it will be cleared)
Definition: ModelAPI_Events.cpp:398
int movedPointIndex() const
Return index of the moved point.
Definition: ModelAPI_Events.h:629
MODELAPI_EXPORT void setCurrentPosition(double theX, double theY)
Set current mouse position.
Definition: ModelAPI_Events.cpp:431
MODELAPI_EXPORT void setOriginalPosition(double theX, double theY)
Set original mouse position.
Definition: ModelAPI_Events.cpp:412
Message that the object is renamed.
Definition: ModelAPI_Events.h:507
MODELAPI_EXPORT void setObject(ObjectPtr theObject)
Sets an object.
Definition: ModelAPI_Events.cpp:319
MODELAPI_EXPORT void setNewName(const std::wstring &theNewName)
Sets a new name.
Definition: ModelAPI_Events.cpp:339
MODELAPI_EXPORT std::wstring newName() const
Returns a new name.
Definition: ModelAPI_Events.cpp:334
static MODELAPI_EXPORT void send(ObjectPtr theObject, const std::wstring &theOldName, const std::wstring &theNewName, const void *theSender)
Useful method that creates and sends the AttributeEvalMessage event.
Definition: ModelAPI_Events.cpp:301
MODELAPI_EXPORT std::wstring oldName() const
Returns an old name.
Definition: ModelAPI_Events.cpp:324
virtual MODELAPI_EXPORT ~ModelAPI_ObjectRenamedMessage()
The virtual destructor.
Definition: ModelAPI_Events.cpp:298
MODELAPI_EXPORT ModelAPI_ObjectRenamedMessage(const Events_ID theID, const void *theSender=0)
Creates an empty message.
Definition: ModelAPI_Events.cpp:293
MODELAPI_EXPORT void setOldName(const std::wstring &theOldName)
Sets an old name.
Definition: ModelAPI_Events.cpp:329
static MODELAPI_EXPORT Events_ID & eventId()
Static. Returns EventID of the message.
Definition: ModelAPI_Events.h:514
MODELAPI_EXPORT ObjectPtr object() const
Returns an object.
Definition: ModelAPI_Events.cpp:314
Message that feature was changed (used for Object Browser update): moved, updated and deleted.
Definition: ModelAPI_Events.h:140
virtual const std::set< ObjectPtr > & objects() const =0
Returns the feature that has been updated.
virtual void Join(const std::shared_ptr< Events_MessageGroup > &theJoined)=0
Allows to join the given message with the current one.
virtual std::shared_ptr< Events_MessageGroup > newEmpty()=0
Creates a new empty group (to store it in the loop before flush)
Message that order changed (used for Object Browser update)
Definition: ModelAPI_Events.h:184
virtual std::shared_ptr< ModelAPI_Feature > reordered()=0
Returns the document that has been updated.
virtual const Events_ID messageId()=0
Returns the identifier of the kind of a message.
Message that parameter feature expression should be evaluated: value and error producing.
Definition: ModelAPI_Events.h:314
static MODELAPI_EXPORT std::shared_ptr< ModelAPI_ParameterEvalMessage > send(FeaturePtr theParameter, const void *theSender)
Useful method that creates and sends the event.
Definition: ModelAPI_Events.h:334
MODELAPI_EXPORT const double & result() const
Returns the expression result.
Definition: ModelAPI_Events.cpp:181
virtual MODELAPI_EXPORT ~ModelAPI_ParameterEvalMessage()
The virtual destructor.
Definition: ModelAPI_Events.cpp:147
MODELAPI_EXPORT bool isProcessed()
Returns true if the expression is processed.
Definition: ModelAPI_Events.cpp:170
MODELAPI_EXPORT void setParameter(FeaturePtr theParam)
Sets a parameter to the message.
Definition: ModelAPI_Events.cpp:155
MODELAPI_EXPORT const std::list< std::shared_ptr< ModelAPI_ResultParameter > > & params() const
Returns the results of processing: list of parameters found in the expression.
Definition: ModelAPI_Events.cpp:176
MODELAPI_EXPORT FeaturePtr parameter() const
Returns a parameter stored in the message.
Definition: ModelAPI_Events.cpp:150
MODELAPI_EXPORT const std::string & error() const
Returns the interpreter error (empty if no error)
Definition: ModelAPI_Events.cpp:186
MODELAPI_EXPORT ModelAPI_ParameterEvalMessage(const Events_ID theID, const void *theSender=0)
Creates an empty message.
Definition: ModelAPI_Events.cpp:142
MODELAPI_EXPORT void setResults(const std::list< std::shared_ptr< ModelAPI_ResultParameter > > &theParamsList, const double theResult, const std::string &theError)
Sets the results of processing.
Definition: ModelAPI_Events.cpp:160
static MODELAPI_EXPORT Events_ID & eventId()
Static. Returns EventID of the message.
Definition: ModelAPI_Events.h:324
Message that the parameter should be replaced with its value.
Definition: ModelAPI_Events.h:548
virtual MODELAPI_EXPORT ~ModelAPI_ReplaceParameterMessage()
The virtual destructor.
Definition: ModelAPI_Events.cpp:349
static MODELAPI_EXPORT void send(ObjectPtr theObject, const void *theSender)
Useful method that creates and sends the AttributeEvalMessage event.
Definition: ModelAPI_Events.cpp:352
MODELAPI_EXPORT ObjectPtr object() const
Returns an object.
Definition: ModelAPI_Events.cpp:361
static MODELAPI_EXPORT Events_ID & eventId()
Static. Returns EventID of the message.
Definition: ModelAPI_Events.h:553
MODELAPI_EXPORT ModelAPI_ReplaceParameterMessage(const Events_ID theID, const void *theSender=0)
Creates an empty message.
Definition: ModelAPI_Events.cpp:344
MODELAPI_EXPORT void setObject(ObjectPtr theObject)
Sets an object.
Definition: ModelAPI_Events.cpp:366
The construction element result of a feature.
Definition: ModelAPI_ResultParameter.h:34
Message that sends the failed vertices of 1D-fillet to highlight them in 3D viewer.
Definition: ModelAPI_Events.h:651
virtual MODELAPI_EXPORT ~ModelAPI_ShapesFailedMessage()
Default destructor.
Definition: ModelAPI_Events.cpp:461
MODELAPI_EXPORT ModelAPI_ShapesFailedMessage(const Events_ID theID, const void *theSender=0)
Creates an message.
Definition: ModelAPI_Events.cpp:456
MODELAPI_EXPORT void setShapes(const std::list< std::shared_ptr< GeomAPI_Shape > > &theVertices)
Sets list of failed vertices.
Definition: ModelAPI_Events.cpp:464
MODELAPI_EXPORT const std::list< std::shared_ptr< GeomAPI_Shape > > & shapes() const
Returns list of failed vertices.
Definition: ModelAPI_Events.cpp:469
static MODELAPI_EXPORT Events_ID eventId()
Static. Returns EventID of the message.
Definition: ModelAPI_Events.h:658
Message that sends the sketch solver and sketcher GUI processes to show in the property panel.
Definition: ModelAPI_Events.h:578
MODELAPI_EXPORT const std::set< ObjectPtr > & objects() const
Returns list of conflicting constraints.
Definition: ModelAPI_Events.cpp:387
void dof(const int theDOF)
Sets degrees of freedom.
Definition: ModelAPI_Events.h:591
MODELAPI_EXPORT ModelAPI_SolverFailedMessage(const Events_ID theID, const void *theSender=0)
Creates an message.
Definition: ModelAPI_Events.cpp:373
MODELAPI_EXPORT void setObjects(const std::set< ObjectPtr > &theObjects)
Sets list of conflicting constraints.
Definition: ModelAPI_Events.cpp:382
const int & dof() const
Returns degrees of freedom.
Definition: ModelAPI_Events.h:593
virtual MODELAPI_EXPORT ~ModelAPI_SolverFailedMessage()
Default destructor.
Definition: ModelAPI_Events.cpp:379