X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_Events.cpp;h=2260ce1fb2ae925fc94028915f88ee53d93e4109;hb=5303dd1fa6ad4411e38f8d36103c72109957e05c;hp=447019a2af949ecef3a45409556b9af53d4bf6c9;hpb=3efd29f07fa128246690fd24a3439048b5e95878;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_Events.cpp b/src/ModelAPI/ModelAPI_Events.cpp index 447019a2a..2260ce1fb 100644 --- a/src/ModelAPI/ModelAPI_Events.cpp +++ b/src/ModelAPI/ModelAPI_Events.cpp @@ -84,3 +84,102 @@ std::list ModelAPI_FeatureStateMessage::features() const return result; } + +ModelAPI_DocumentCreatedMessage::ModelAPI_DocumentCreatedMessage(const Events_ID theID, + const void* theSender) +: Events_Message(theID, theSender) +{ + +} + +ModelAPI_DocumentCreatedMessage::~ModelAPI_DocumentCreatedMessage() +{ + +} + +DocumentPtr ModelAPI_DocumentCreatedMessage::document() const +{ + return myDocument; +} + +void ModelAPI_DocumentCreatedMessage::setDocument(DocumentPtr theDocument) +{ + myDocument = theDocument; +} + +ModelAPI_AttributeEvalMessage::ModelAPI_AttributeEvalMessage(const Events_ID theID, + const void* theSender) +: Events_Message(theID, theSender) +{ + +} + +ModelAPI_AttributeEvalMessage::~ModelAPI_AttributeEvalMessage() +{ + +} + +AttributePtr ModelAPI_AttributeEvalMessage::attribute() const +{ + return myAttribute; +} + +void ModelAPI_AttributeEvalMessage::setAttribute(AttributePtr theDocument) +{ + myAttribute = theDocument; +} + +ModelAPI_ObjectRenamedMessage::ModelAPI_ObjectRenamedMessage(const Events_ID theID, + const void* theSender) +: Events_Message(theID, theSender) +{ + +} + +ModelAPI_ObjectRenamedMessage::~ModelAPI_ObjectRenamedMessage() +{ + +} + +void ModelAPI_ObjectRenamedMessage::send(ObjectPtr theObject, + const std::string& theOldName, + const std::string& theNewName, + const void* theSender) +{ + std::shared_ptr aMessage( + new ModelAPI_ObjectRenamedMessage(eventId(), theSender)); + aMessage->setObject(theObject); + aMessage->setOldName(theOldName); + aMessage->setNewName(theNewName); + Events_Loop::loop()->send(aMessage); +} + +ObjectPtr ModelAPI_ObjectRenamedMessage::object() const +{ + return myObject; +} + +void ModelAPI_ObjectRenamedMessage::setObject(ObjectPtr theObject) +{ + myObject = theObject; +} + +std::string ModelAPI_ObjectRenamedMessage::oldName() const +{ + return myOldName; +} + +void ModelAPI_ObjectRenamedMessage::setOldName(const std::string& theOldName) +{ + myOldName = theOldName; +} + +std::string ModelAPI_ObjectRenamedMessage::newName() const +{ + return myNewName; +} + +void ModelAPI_ObjectRenamedMessage::setNewName(const std::string& theNewName) +{ + myNewName = theNewName; +}