}
if (isModified) {
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
- Model_FeatureUpdatedMessage aMsg(myFeature, anEvent);
- Events_Loop::loop()->send(aMsg, false);
+ ModelAPI_EventCreator::get()->sendUpdated(myFeature, anEvent, false);
}
}
{
theAttr->setInitialized();
static const Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
- Model_FeatureUpdatedMessage aMsg(myFeature, anEvent);
- Events_Loop::loop()->send(aMsg);
+ ModelAPI_EventCreator::get()->sendUpdated(myFeature, anEvent);
}
#include <TNaming_Builder.hxx>
// event: feature is added
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_CREATED);
- Model_FeatureUpdatedMessage aMsg(theFeature, anEvent);
- Events_Loop::loop()->send(aMsg);
+ ModelAPI_EventCreator::get()->sendUpdated(theFeature, anEvent);
}
/// Appenad to the array of references a new referenced label.
RemoveFromRefArray(groupLabel(FEATURES_GROUP), aData->label());
// event: feature is added
- Model_FeatureDeletedMessage aMsg(theFeature->document(), theFeature->getGroup());
- Events_Loop::loop()->send(aMsg);
+ ModelAPI_EventCreator::get()->sendDeleted(theFeature->document(), theFeature->getGroup());
}
FeaturePtr Model_Document::feature(TDF_Label& theLabel)
aFIter = myFeatures.erase(aFIter);
// event: model is updated
if (aFeature->isInHistory()) {
- Model_FeatureDeletedMessage aMsg1(aThis, FEATURES_GROUP);
- Events_Loop::loop()->send(aMsg1);
+ ModelAPI_EventCreator::get()->sendDeleted(aThis, FEATURES_GROUP);
}
- Model_FeatureDeletedMessage aMsg2(aThis, aFeature->getGroup());
- Events_Loop::loop()->send(aMsg2);
+ ModelAPI_EventCreator::get()->sendDeleted(aThis, aFeature->getGroup());
} else if (aDSTag < aFeatureTag) { // a new feature is inserted
// create a feature
FeaturePtr aFeature = ModelAPI_PluginManager::get()->createFeature(
// event: model is updated
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_CREATED);
- Model_FeatureUpdatedMessage aMsg1(aFeature, anEvent);
- Events_Loop::loop()->send(aMsg1);
+ ModelAPI_EventCreator::get()->sendUpdated(aFeature, anEvent);
FeaturePtr anObj = objectByFeature(aFeature);
if (anObj) {
- Model_FeatureUpdatedMessage aMsg2(anObj, anEvent);
- Events_Loop::loop()->send(aMsg2);
+ ModelAPI_EventCreator::get()->sendUpdated(anObj, anEvent);
}
// feature for this label is added, so go to the next label
} else { // nothing is changed, both iterators are incremented
if (theMarkUpdated) {
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
- Model_FeatureUpdatedMessage aMsg(*aFIter, anEvent);
- Events_Loop::loop()->send(aMsg);
+ ModelAPI_EventCreator::get()->sendUpdated(*aFIter, anEvent);
}
aFIter++;
aFLabIter.Next();
#include <Model_Events.h>
#include <Events_Loop.h>
-// DELETED methods
-//Events_MessageGroup* Model_FeatureDeletedMessage::newEmpty() {
-// return new Model_FeatureDeletedMessage(myDoc, "");
-//}
-//
-//Model_FeatureDeletedMessage::Model_FeatureDeletedMessage(
-// const boost::shared_ptr<ModelAPI_Document>& theDoc, const std::string& theGroup)
-// : Events_MessageGroup(messageId(), 0), myDoc(theDoc)
-//
-//{
-// if (!theGroup.empty())
-// myGroups.insert(theGroup);
-//}
-//
-//const Events_ID Model_FeatureDeletedMessage::messageId()
-//{
-// static Events_ID MY_ID = Events_Loop::eventByName(EVENT_FEATURE_DELETED);
-// return MY_ID;
-//}
-//
-//void Model_FeatureDeletedMessage::Join(Events_MessageGroup& theJoined)
-//{
-// Model_FeatureDeletedMessage* aJoined = dynamic_cast<Model_FeatureDeletedMessage*>(&theJoined);
-// std::set<std::string>::iterator aGIter = aJoined->myGroups.begin();
-// for(; aGIter != aJoined->myGroups.end(); aGIter++) {
-// myGroups.insert(*aGIter);
-// }
-//}
+/// Alone instance of the creator per application
+Model_EventCreator MY_CREATOR;
+
+/////////////////////// CREATOR /////////////////////////////
+void Model_EventCreator::sendUpdated(
+ const FeaturePtr& theFeature, const Events_ID& theEvent, const bool isGroupped) const
+{
+ Model_FeatureUpdatedMessage aMsg(theFeature, theEvent);
+ Events_Loop::loop()->send(aMsg, isGroupped);
+}
+
+void Model_EventCreator::sendDeleted(
+ const boost::shared_ptr<ModelAPI_Document>& theDoc, const std::string& theGroup) const
+{
+ Model_FeatureDeletedMessage aMsg(theDoc, theGroup);
+ Events_Loop::loop()->send(aMsg, true);
+}
+
+Model_EventCreator::Model_EventCreator()
+{
+ ModelAPI_EventCreator::set(this);
+}
+
+/////////////////////// UPDATED MESSAGE /////////////////////////////
+Model_FeatureUpdatedMessage::Model_FeatureUpdatedMessage(
+ const FeaturePtr& theFeature,
+ const Events_ID& theEvent) : ModelAPI_FeatureUpdatedMessage(theEvent, 0)
+{
+ if (theFeature) myFeatures.insert(theFeature);
+}
+
+std::set<FeaturePtr> Model_FeatureUpdatedMessage::features() const
+{
+ return myFeatures;
+}
+
+Events_MessageGroup* Model_FeatureUpdatedMessage::newEmpty()
+{
+ FeaturePtr anEmptyFeature;
+ return new Model_FeatureUpdatedMessage(anEmptyFeature, eventID());
+}
+
+void Model_FeatureUpdatedMessage::Join(Events_MessageGroup& theJoined)
+{
+ Model_FeatureUpdatedMessage* aJoined = dynamic_cast<Model_FeatureUpdatedMessage*>(&theJoined);
+ std::set<FeaturePtr >::iterator aFIter = aJoined->myFeatures.begin();
+ for(; aFIter != aJoined->myFeatures.end(); aFIter++) {
+ myFeatures.insert(*aFIter);
+ }
+}
+
+/////////////////////// DELETED MESSAGE /////////////////////////////
+Model_FeatureDeletedMessage::Model_FeatureDeletedMessage(
+ const boost::shared_ptr<ModelAPI_Document>& theDoc, const std::string& theGroup)
+ : ModelAPI_FeatureDeletedMessage(messageId(), 0), myDoc(theDoc)
+{
+ if (!theGroup.empty())
+ myGroups.insert(theGroup);
+}
+
+Events_MessageGroup* Model_FeatureDeletedMessage::newEmpty()
+{
+ return new Model_FeatureDeletedMessage(myDoc, "");
+}
+
+const Events_ID Model_FeatureDeletedMessage::messageId()
+{
+ static Events_ID MY_ID = Events_Loop::eventByName(EVENT_FEATURE_DELETED);
+ return MY_ID;
+}
+
+void Model_FeatureDeletedMessage::Join(Events_MessageGroup& theJoined)
+{
+ Model_FeatureDeletedMessage* aJoined = dynamic_cast<Model_FeatureDeletedMessage*>(&theJoined);
+ std::set<std::string>::iterator aGIter = aJoined->myGroups.begin();
+ for(; aGIter != aJoined->myGroups.end(); aGIter++) {
+ myGroups.insert(*aGIter);
+ }
+}
#define Model_Events_HeaderFile
#include <Model.h>
-#include <Events_MessageGroup.h>
-#include <Events_Loop.h>
-#include <boost/shared_ptr.hpp>
-#include <string>
-#include <set>
+#include <ModelAPI_Events.h>
-#include "ModelAPI_Feature.h"
-
-class ModelAPI_Document;
-
-/// Event ID that feature is created (comes with Model_FeatureUpdatedMessage)
-static const char * EVENT_FEATURE_CREATED = "FeatureCreated";
-/// Event ID that data of feature is updated (comes with Model_FeatureUpdatedMessage)
-static const char * EVENT_FEATURE_UPDATED = "FeatureUpdated";
-/// Event ID that data of feature is deleted (comes with Model_FeatureDeletedMessage)
-static const char * EVENT_FEATURE_DELETED = "FeatureDeleted";
-/// Event ID that data of feature is updated (comes with Model_FeaturesMovedMessage)
-static const char * EVENT_FEATURE_MOVED = "FeaturesMoved";
+/// Allovs to create ModelAPI messages
+class Model_EventCreator : public ModelAPI_EventCreator {
+public:
+ /// creates created, updated or moved messages and sends to the loop
+ virtual void sendUpdated(
+ const FeaturePtr& theFeature, const Events_ID& theEvent, const bool isGroupped = true) const;
+ /// creates deleted message and sends to the loop
+ virtual void sendDeleted(
+ const boost::shared_ptr<ModelAPI_Document>& theDoc, const std::string& theGroup) const;
+
+ /// must be one per application, the constructor for internal usage only
+ Model_EventCreator();
+};
/// Message that feature was changed (used for Object Browser update): moved, updated and deleted
-class Model_FeatureUpdatedMessage : public Events_MessageGroup {
- std::set<FeaturePtr > myFeatures; ///< which feature is changed
-public:
- /// sender is not important, all information is located in the feature
+class Model_FeatureUpdatedMessage : public ModelAPI_FeatureUpdatedMessage {
+ std::set<FeaturePtr> myFeatures; ///< which feature is changed
+
+ /// Sender is not important, all information is located in the feature.
+ /// Use ModelAPI for creation of this event. Used for creation, movement and edition events.
Model_FeatureUpdatedMessage(
const FeaturePtr& theFeature,
- const Events_ID& theEvent) : Events_MessageGroup(theEvent, 0)
- {if (theFeature) myFeatures.insert(theFeature);}
+ const Events_ID& theEvent);
+
+ friend class Model_EventCreator;
+public:
/// Returns the feature that has been updated
- std::set<FeaturePtr> features() const {return myFeatures;}
+ virtual std::set<FeaturePtr> features() const;
//! Creates a new empty group (to store it in the loop before flush)
- virtual Events_MessageGroup* newEmpty() {
- FeaturePtr anEmptyFeature;
- return new Model_FeatureUpdatedMessage(anEmptyFeature, eventID());
- }
+ virtual Events_MessageGroup* newEmpty();
//! Allows to join the given message with the current one
- virtual void Join(Events_MessageGroup& theJoined) {
- Model_FeatureUpdatedMessage* aJoined = dynamic_cast<Model_FeatureUpdatedMessage*>(&theJoined);
- std::set<FeaturePtr >::iterator aFIter = aJoined->myFeatures.begin();
- for(; aFIter != aJoined->myFeatures.end(); aFIter++) {
- myFeatures.insert(*aFIter);
- }
- }
+ virtual void Join(Events_MessageGroup& theJoined);
};
/// Message that feature was deleted (used for Object Browser update)
-class Model_FeatureDeletedMessage : public Events_MessageGroup {
+class Model_FeatureDeletedMessage : public ModelAPI_FeatureDeletedMessage {
boost::shared_ptr<ModelAPI_Document> myDoc; ///< document owner of the feature
std::set<std::string> myGroups; ///< group identifiers that contained the deleted feature
-public:
- /// creates a message by initialization of fields
-// Model_FeatureDeletedMessage(const boost::shared_ptr<ModelAPI_Document>& theDoc,
-// const std::string& theGroup);
- /// Returns the ID of this message (EVENT_FEATURE_DELETED)
-// static const Events_ID messageId();
+ /// Use ModelAPI for creation of this event.
+ Model_FeatureDeletedMessage(
+ const boost::shared_ptr<ModelAPI_Document>& theDoc, const std::string& theGroup);
+ friend class Model_EventCreator;
+public:
/// Returns the feature that has been updated
- boost::shared_ptr<ModelAPI_Document> document() const {return myDoc;}
+ virtual boost::shared_ptr<ModelAPI_Document> document() const {return myDoc;}
/// Returns the group where the feature was deleted
- const std::set<std::string >& groups() const {return myGroups;}
+ virtual const std::set<std::string >& groups() const {return myGroups;}
- //! Creates a new empty group (to store it in the loop before flush)
-// virtual Events_MessageGroup* newEmpty();
+ virtual Events_MessageGroup* newEmpty();
- //! Allows to join the given message with the current one
-// virtual void Join(Events_MessageGroup& theJoined);
- Events_MessageGroup* newEmpty() {
- return new Model_FeatureDeletedMessage(myDoc, "");
- }
+ virtual const Events_ID messageId();
- Model_FeatureDeletedMessage(
- const boost::shared_ptr<ModelAPI_Document>& theDoc, const std::string& theGroup)
- : Events_MessageGroup(messageId(), 0), myDoc(theDoc)
-
- {
- if (!theGroup.empty())
- myGroups.insert(theGroup);
- }
-
- const Events_ID messageId()
- {
- static Events_ID MY_ID = Events_Loop::eventByName(EVENT_FEATURE_DELETED);
- return MY_ID;
- }
-
- void Join(Events_MessageGroup& theJoined)
- {
- Model_FeatureDeletedMessage* aJoined = dynamic_cast<Model_FeatureDeletedMessage*>(&theJoined);
- std::set<std::string>::iterator aGIter = aJoined->myGroups.begin();
- for(; aGIter != aJoined->myGroups.end(); aGIter++) {
- myGroups.insert(*aGIter);
- }
- }
+ virtual void Join(Events_MessageGroup& theJoined);
};
#endif
#include <ModelAPI_Feature.h>
#include <ModelAPI_Data.h>
#include <ModelAPI_Document.h>
-#include <Model_Events.h>
+#include <ModelAPI_Events.h>
#include <ModelAPI_AttributeReference.h>
#include <ModelAPI_AttributeRefList.h>
+#include <Events_Loop.h>
using namespace std;
void Model_Update::processEvent(const Events_Message* theMessage)
{
- const Model_FeatureUpdatedMessage* aMsg =
- dynamic_cast<const Model_FeatureUpdatedMessage*>(theMessage);
+ const ModelAPI_FeatureUpdatedMessage* aMsg =
+ dynamic_cast<const ModelAPI_FeatureUpdatedMessage*>(theMessage);
myInitial = aMsg->features();
// collect all documents involved into the update
set<boost::shared_ptr<ModelAPI_Document> > aDocs;
ModelAPI_AttributeRefAttr.h
ModelAPI_AttributeRefList.h
ModelAPI_AttributeBoolean.h
+ ModelAPI_Events.h
)
SET(PROJECT_SOURCES
TARGET_LINK_LIBRARIES(ModelAPI ${PROJECT_LIBRARIES})
INCLUDE_DIRECTORIES(
- ../Config
+ ../Config ../Events
)
SET(CMAKE_SWIG_FLAGS "")
--- /dev/null
+// File: ModelAPI_Events.h
+// Created: 10 Apr 2014
+// Author: Mikhail PONIKAROV
+
+#ifndef ModelAPI_Events_HeaderFile
+#define ModelAPI_Events_HeaderFile
+
+#include <ModelAPI.h>
+#include <Events_MessageGroup.h>
+#include <boost/shared_ptr.hpp>
+#include <string>
+#include <set>
+
+#include "ModelAPI_Feature.h"
+
+class ModelAPI_Document;
+
+/// Event ID that feature is created (comes with Model_FeatureUpdatedMessage)
+static const char * EVENT_FEATURE_CREATED = "FeatureCreated";
+/// Event ID that data of feature is updated (comes with Model_FeatureUpdatedMessage)
+static const char * EVENT_FEATURE_UPDATED = "FeatureUpdated";
+/// Event ID that data of feature is deleted (comes with Model_FeatureDeletedMessage)
+static const char * EVENT_FEATURE_DELETED = "FeatureDeleted";
+/// Event ID that data of feature is updated (comes with Model_FeaturesMovedMessage)
+static const char * EVENT_FEATURE_MOVED = "FeaturesMoved";
+
+/// Message that feature was changed (used for Object Browser update): moved, updated and deleted
+class ModelAPI_FeatureUpdatedMessage : public Events_MessageGroup {
+protected:
+ ModelAPI_FeatureUpdatedMessage(const Events_ID theID, const void* theSender = 0)
+ : Events_MessageGroup(theID, theSender) {}
+
+public:
+ /// Returns the feature that has been updated
+ virtual std::set<FeaturePtr> features() const = 0;
+
+ //! Creates a new empty group (to store it in the loop before flush)
+ virtual Events_MessageGroup* newEmpty() = 0;
+
+ //! Allows to join the given message with the current one
+ virtual void Join(Events_MessageGroup& theJoined) = 0;
+};
+
+/// Message that feature was deleted (used for Object Browser update)
+class ModelAPI_FeatureDeletedMessage : public Events_MessageGroup {
+protected:
+ ModelAPI_FeatureDeletedMessage(const Events_ID theID, const void* theSender = 0)
+ : Events_MessageGroup(theID, theSender) {}
+
+public:
+ /// Returns the feature that has been updated
+ virtual boost::shared_ptr<ModelAPI_Document> document() const = 0;
+
+ /// Returns the group where the feature was deleted
+ virtual const std::set<std::string >& groups() const = 0;
+
+ virtual Events_MessageGroup* newEmpty() = 0;
+
+ virtual const Events_ID messageId() = 0;
+
+ virtual void Join(Events_MessageGroup& theJoined) = 0;
+};
+
+/// Allows to create ModelAPI messages
+class MODELAPI_EXPORT ModelAPI_EventCreator {
+public:
+ /// creates created, updated or moved messages and sends to the loop
+ virtual void sendUpdated(const FeaturePtr& theFeature, const Events_ID& theEvent,
+ const bool isGroupped = true) const = 0;
+ /// creates deleted message and sends to the loop
+ virtual void sendDeleted(
+ const boost::shared_ptr<ModelAPI_Document>& theDoc, const std::string& theGroup) const = 0;
+
+ /// returns the creator instance
+ static const ModelAPI_EventCreator* get();
+
+ /// sets the creator instance
+ static void set(const ModelAPI_EventCreator* theCreator);
+};
+
+#endif
#include <ModelAPI_AttributeReference.h>
#include <ModelAPI_AttributeRefAttr.h>
#include <ModelAPI_AttributeRefList.h>
+#include <ModelAPI_Events.h>
#include <Config_ModuleReader.h>
}
return MY_MANAGER;
}
+
+const ModelAPI_EventCreator* MY_CREATOR = 0; ///< instance of the events creator, one pre application
+
+const ModelAPI_EventCreator* ModelAPI_EventCreator::get()
+{
+ if (!MY_CREATOR) { // import Model library that implements this interface of ModelAPI
+ Config_ModuleReader::loadLibrary("Model");
+ }
+ return MY_CREATOR;
+}
+
+void ModelAPI_EventCreator::set(const ModelAPI_EventCreator* theCreator)
+{
+ MY_CREATOR = theCreator;
+}
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/XGUI
${CMAKE_SOURCE_DIR}/src/Config
${CMAKE_SOURCE_DIR}/src/Events
- ${CMAKE_SOURCE_DIR}/src/Model
${CMAKE_SOURCE_DIR}/src/ModuleBase
${CMAKE_SOURCE_DIR}/src/ModelAPI
${CMAKE_SOURCE_DIR}/src/GeomDataAPI
)
# The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
-TARGET_LINK_LIBRARIES(PartSet ${PROJECT_LIBRARIES} XGUI ModelAPI Model GeomAlgoAPI)
+TARGET_LINK_LIBRARIES(PartSet ${PROJECT_LIBRARIES} XGUI ModelAPI GeomAlgoAPI)
ADD_DEPENDENCIES(PartSet ModuleBase)
#include <XGUI_Displayer.h>
#include <Events_Loop.h>
-#include <Model_Events.h>
+#include <ModelAPI_Events.h>
#include <SketchPlugin_Sketch.h>
if (aType == EVENT_FEATURE_UPDATED ||
aType == EVENT_FEATURE_CREATED)
{
- const Model_FeatureUpdatedMessage* aUpdMsg = dynamic_cast<const Model_FeatureUpdatedMessage*>
- (theMessage);
+ const ModelAPI_FeatureUpdatedMessage* aUpdMsg =
+ dynamic_cast<const ModelAPI_FeatureUpdatedMessage*>(theMessage);
std::set<FeaturePtr > aFeatures = aUpdMsg->features();
std::set<FeaturePtr >::const_iterator anIt = aFeatures.begin(), aLast = aFeatures.end();
for (; anIt != aLast; anIt++) {
}
if (aType == EVENT_FEATURE_DELETED)
{
- const Model_FeatureDeletedMessage* aDelMsg = dynamic_cast<const Model_FeatureDeletedMessage*>(theMessage);
+ const ModelAPI_FeatureDeletedMessage* aDelMsg =
+ dynamic_cast<const ModelAPI_FeatureDeletedMessage*>(theMessage);
boost::shared_ptr<ModelAPI_Document> aDoc = aDelMsg->document();
std::set<std::string> aGroups = aDelMsg->groups();
#include <ModuleBase_OperationDescription.h>
#include <ModuleBase_WidgetEditor.h>
-#include <Model_Events.h>
+#include <ModelAPI_Events.h>
#include <XGUI_ViewerPrs.h>
#include <ModelAPI_Data.h>
#include <ModelAPI_Document.h>
-#include <Model_Events.h>
+#include <ModelAPI_Events.h>
#include <Events_Loop.h>
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_MOVED);
FeaturePtr aFeature = feature();
-
- Model_FeatureUpdatedMessage aMessage(aFeature, anEvent);
- Events_Loop::loop()->send(aMessage);
+ ModelAPI_EventCreator::get()->sendUpdated(aFeature, anEvent);
Events_Loop::loop()->flush(anEvent);
flushUpdated();
#include <PartSet_OperationSketch.h>
#include <ModuleBase_OperationDescription.h>
-#include <Model_Events.h>
+#include <ModelAPI_Events.h>
#include <XGUI_ViewerPrs.h>
#include <ModelAPI_Data.h>
#include <ModelAPI_Document.h>
-#include <Model_Events.h>
+#include <ModelAPI_Events.h>
#include <Events_Loop.h>
if (!aFeature)
continue;
- Model_FeatureUpdatedMessage aMessage(aFeature, anEvent);
- Events_Loop::loop()->send(aMessage);
+ ModelAPI_EventCreator::get()->sendUpdated(aFeature, anEvent);
}
Events_Loop::loop()->flush(anEvent);
flushUpdated();
#include <GeomDataAPI_Point2D.h>
#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_AttributeRefList.h>
-#include <Model_Events.h>
+#include <ModelAPI_Events.h>
#include <SketchPlugin_Constraint.h>
#include <SketchPlugin_ConstraintLength.h>
if (isUpd)
{
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
- Model_FeatureUpdatedMessage aMsg(aConstrIter->first, anEvent);
- Events_Loop::loop()->send(aMsg, true);
+ ModelAPI_EventCreator::get()->sendUpdated(aConstrIter->first, anEvent);
break;
}
}
if (aRefAttr && aRefAttr->isFeature() && aRefAttr->feature() == theFeature)
{
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
- Model_FeatureUpdatedMessage aMsg(aConstrIter->first, anEvent);
- Events_Loop::loop()->send(aMsg, true);
+ ModelAPI_EventCreator::get()->sendUpdated(aConstrIter->first, anEvent);
break;
}
}
#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_AttributeRefList.h>
#include <ModelAPI_Data.h>
-#include <Model_Events.h>
+#include <ModelAPI_Events.h>
#include <SketchPlugin_Constraint.h>
theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_FEATURE_UPDATED) ||
theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_FEATURE_MOVED))
{
- const Model_FeatureUpdatedMessage* anUpdateMsg = dynamic_cast<const Model_FeatureUpdatedMessage*>(theMessage);
+ const ModelAPI_FeatureUpdatedMessage* anUpdateMsg =
+ dynamic_cast<const ModelAPI_FeatureUpdatedMessage*>(theMessage);
std::set< FeaturePtr > aFeatures = anUpdateMsg->features();
- bool isModifiedEvt = theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_FEATURE_MOVED);
+ bool isModifiedEvt =
+ theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_FEATURE_MOVED);
if (!isModifiedEvt)
{
std::set< FeaturePtr >::iterator aFeatIter;
}
else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_FEATURE_DELETED))
{
- const Model_FeatureDeletedMessage* aDeleteMsg = dynamic_cast<const Model_FeatureDeletedMessage*>(theMessage);
+ const ModelAPI_FeatureDeletedMessage* aDeleteMsg =
+ dynamic_cast<const ModelAPI_FeatureDeletedMessage*>(theMessage);
const std::set<std::string>& aFeatureGroups = aDeleteMsg->groups();
// Find SKETCH_KIND in groups. The constraint groups should be updated when an object removed from Sketch