X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FModel%2FModel_Events.cpp;h=7847f99b10a4fca3e4a00a30ba3ed87f84637df6;hb=530f5aff42069e844c4a4ef164088ea23ba0e2dd;hp=a87fc9fb8a320d05b9569d0953b20fd624a22997;hpb=9e869ede4d8c56262bb20534543c2bf56cd6a91b;p=modules%2Fshaper.git diff --git a/src/Model/Model_Events.cpp b/src/Model/Model_Events.cpp index a87fc9fb8..7847f99b1 100644 --- a/src/Model/Model_Events.cpp +++ b/src/Model/Model_Events.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: Model_Events.cxx // Created: 10 Apr 2014 // Author: Mikhail PONIKAROV @@ -25,6 +27,14 @@ void Model_EventCreator::sendDeleted(const std::shared_ptr& t Events_Loop::loop()->send(aMsg, true); } +void Model_EventCreator::sendReordered(const std::shared_ptr& theDoc, + const std::string& theGroup) const +{ + std::shared_ptr aMsg( + new Model_OrderUpdatedMessage(theDoc, theGroup)); + Events_Loop::loop()->send(aMsg, true); +} + Model_EventCreator::Model_EventCreator() { ModelAPI_EventCreator::set(this); @@ -92,3 +102,17 @@ void Model_ObjectDeletedMessage::Join(const std::shared_ptr myGroups.insert(*aGIter); } } + +/////////////////////// REORDERED MESSAGE ///////////////////////////// +Model_OrderUpdatedMessage::Model_OrderUpdatedMessage( + const std::shared_ptr& theDoc, const std::string& theGroup) + : ModelAPI_OrderUpdatedMessage(messageId(), 0), + myDoc(theDoc), myGroup(theGroup) +{ +} + +const Events_ID Model_OrderUpdatedMessage::messageId() +{ + static Events_ID MY_ID = Events_Loop::eventByName(EVENT_ORDER_UPDATED); + return MY_ID; +}