]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #1755 : for now the sketch solver receives all modified entities...
authormpv <mpv@opencascade.com>
Fri, 23 Sep 2016 07:43:24 +0000 (10:43 +0300)
committermpv <mpv@opencascade.com>
Fri, 23 Sep 2016 07:43:24 +0000 (10:43 +0300)
19 files changed:
src/Config/Config_Translator.cpp
src/Events/Events_InfoMessage.cpp
src/Events/Events_Listener.cpp
src/Events/Events_Listener.h
src/Events/Events_Loop.cpp
src/Events/Events_Loop.h
src/FeaturesPlugin/FeaturesPlugin_Validators.cpp
src/InitializationPlugin/InitializationPlugin_Plugin.h
src/Model/Model_AttributeSelection.cpp
src/Model/Model_Objects.h
src/Model/Model_Update.cpp
src/ModelAPI/ModelAPI_Events.h
src/ModelGeomAlgo/ModelGeomAlgo_Point2D.cpp
src/PartSetPlugin/PartSetPlugin_Plugin.h
src/SketchPlugin/SketchPlugin_Plugin.h
src/SketchSolver/SketchSolver_Manager.cpp
src/SketchSolver/SketchSolver_Manager.h
src/XAO/XAO_Field.hxx
src/XAO/XAO_Group.hxx

index 058acfca3c4bac28570093dbf517c89755494d7b..cbc1a2776ceaf022dae533020c9e5ab1535e24d4 100644 (file)
 #include <fstream>
 #include <ostream>
 
+#ifdef WIN32
+#pragma warning(disable : 4996) // for sprintf
+#endif
+
 /**
  * \class Config_TSReader
  * \ingroup Config
index 18d38a95cfe7656d11793a308f32e067ba181623..e2a4d988220f5858a04eb3f338964bfe9751d705 100644 (file)
@@ -6,6 +6,9 @@
 
 #include "Events_InfoMessage.h"
 
+#ifdef WIN32
+#pragma warning(disable : 4996) // for sprintf
+#endif
 
 void Events_InfoMessage::addParameter(double theParam) 
 { 
index 1d55bb95562afb7675792cbe9597d928d0cf6362..158446b12f382453ac68875a9e49cfeee8e5a6dc 100644 (file)
@@ -5,3 +5,33 @@
 // Author:     Mikhail PONIKAROV
 
 #include <Events_Listener.h>
+#include <Events_MessageGroup.h>
+#include <Events_Loop.h>
+
+void Events_Listener::groupWhileFlush(const std::shared_ptr<Events_Message>& theMessage) {
+  std::shared_ptr<Events_MessageGroup> aGroup = 
+    std::dynamic_pointer_cast<Events_MessageGroup>(theMessage);
+  if (aGroup) {
+    std::map<char*, std::shared_ptr<Events_Message> >::iterator aMyGroup = myGroups.find(
+      aGroup->eventID().eventText());
+    if (aMyGroup == myGroups.end()) {  // create a new group of messages for accumulation
+      myGroups[aGroup->eventID().eventText()] = aGroup->newEmpty();
+      aMyGroup = myGroups.find(aGroup->eventID().eventText());
+    }
+    std::shared_ptr<Events_MessageGroup> aStored =
+      std::dynamic_pointer_cast<Events_MessageGroup>(aMyGroup->second);
+    aStored->Join(aGroup);
+    //std::cout<<"Add to group "<<theMessage->eventID().eventText()<<std::endl;
+    return;
+  }
+}
+
+void Events_Listener::flushGrouped(const Events_ID& theID) {
+  std::map<char*, std::shared_ptr<Events_Message> >::iterator aMyGroup =
+    myGroups.find(theID.eventText());
+  if (aMyGroup != myGroups.end()) {
+    std::shared_ptr<Events_Message> aMessage = aMyGroup->second;
+    myGroups.erase(aMyGroup);
+    processEvent(aMessage);
+  }
+}
index 90dedcdfd14e9b0654c12545a755a0a3228c62f3..74aac548334feda5a60f33c7e95b84c2f9dd626d 100644 (file)
@@ -9,8 +9,10 @@
 
 #include <Events.h>
 #include <memory>
+#include <map>
 
 class Events_Message;
+class Events_ID;
 
 /**\class Events_Listener
  * \ingroup EventsLoop
@@ -19,12 +21,26 @@ class Events_Message;
  * If some object wants to listen some events it must inherit
  * this class and register in the Loop.
  */
-class EVENTS_EXPORT Events_Listener
-{
+class Events_Listener {
+  /// map from event ID to groupped messages (for flush for groupMessages=true listeners)
+  std::map<char*, std::shared_ptr<Events_Message> > myGroups;
 
  public:
   //! This method is called by loop when the event is started to process.
-  virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage) = 0;
+  EVENTS_EXPORT virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage) = 0;
+
+  //! 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.
+  EVENTS_EXPORT virtual bool groupMessages() {return false;}
+
+protected:
+  //! Allows to group messages while they are flushed (for flush for groupMessages=true listeners)
+  void groupWhileFlush(const std::shared_ptr<Events_Message>& theMessage);
+  //! Sends myGroups on flush finish
+  EVENTS_EXPORT void flushGrouped(const Events_ID& theID);
+
+  friend class Events_Loop;
 };
 
 #endif
index e68798aa43c31f7e341af66bd32d60aba00f37f0..8e026f733f7f0aef459a2a9c7f4ccbdc7f79db6c 100644 (file)
@@ -39,13 +39,26 @@ Events_ID Events_Loop::eventByName(const char* theName)
   return Events_ID(aResult);
 }
 
+void Events_Loop::sendProcessEvent(const std::shared_ptr<Events_Message>& theMessage,
+  std::list<Events_Listener*>& theListeners, const bool theFlushedNow)
+{
+  for (list<Events_Listener*>::iterator aL = theListeners.begin(); aL != theListeners.end(); aL++) {
+    if (theFlushedNow && (*aL)->groupMessages()) {
+      (*aL)->groupWhileFlush(theMessage);
+    } else {
+      (*aL)->processEvent(theMessage);
+    }
+  }
+}
+
 void Events_Loop::send(const std::shared_ptr<Events_Message>& theMessage, bool isGroup)
 {
   if (myImmediateListeners.find(theMessage->eventID().eventText()) != myImmediateListeners.end()) {
     myImmediateListeners[theMessage->eventID().eventText()]->processEvent(theMessage);
   }
   // if it is grouped message, just accumulate it
-  if (isGroup && myFlushed.find(theMessage->eventID().myID) == myFlushed.end()) {
+  bool isFlushedNow = myFlushed.find(theMessage->eventID().myID) != myFlushed.end();
+  if (isGroup && !isFlushedNow) {
     std::shared_ptr<Events_MessageGroup> aGroup = 
       std::dynamic_pointer_cast<Events_MessageGroup>(theMessage);
     if (aGroup) {
@@ -61,23 +74,19 @@ void Events_Loop::send(const std::shared_ptr<Events_Message>& theMessage, bool i
       return;
     }
   }
-
+  // send
   map<char*, map<void*, list<Events_Listener*> > >::iterator aFindID = myListeners.find(
       theMessage->eventID().eventText());
   if (aFindID != myListeners.end()) {
     map<void*, list<Events_Listener*> >::iterator aFindSender = aFindID->second.find(
         theMessage->sender());
     if (aFindSender != aFindID->second.end()) {
-      list<Events_Listener*>& aListeners = aFindSender->second;
-      for (list<Events_Listener*>::iterator aL = aListeners.begin(); aL != aListeners.end(); aL++)
-        (*aL)->processEvent(theMessage);
+      sendProcessEvent(theMessage, aFindSender->second, isFlushedNow && isGroup);
     }
     if (theMessage->sender()) {  // also call for NULL senders registered
       aFindSender = aFindID->second.find(NULL);
       if (aFindSender != aFindID->second.end()) {
-        list<Events_Listener*>& aListeners = aFindSender->second;
-        for (list<Events_Listener*>::iterator aL = aListeners.begin(); aL != aListeners.end(); aL++)
-          (*aL)->processEvent(theMessage);
+        sendProcessEvent(theMessage, aFindSender->second, isFlushedNow && isGroup);
       }
     }
   }
@@ -173,11 +182,28 @@ void Events_Loop::flush(const Events_ID& theID)
     myGroups.erase(aMyGroup);
     send(aGroup, false);
 
-    if (!aWasFlushed)
+    if (!aWasFlushed) {
       // TODO: Stabilization fix. Check later.
       if(myFlushed.find(theID.myID) != myFlushed.end()) {
         myFlushed.erase(myFlushed.find(theID.myID));
+      } else {
+        bool aProblem = true;
+      }
+    }
+    // send accumulated messages to "groupListeners"
+    map<char*, map<void*, list<Events_Listener*> > >::iterator aFindID = myListeners.find(
+      theID.eventText());
+    if (aFindID != myListeners.end()) {
+      map<void*, list<Events_Listener*> >::iterator aFindSender = aFindID->second.begin();
+      for(; aFindSender != aFindID->second.end(); aFindSender++) {
+        list<Events_Listener*>::iterator aListener = aFindSender->second.begin();
+        for(; aListener != aFindSender->second.end(); aListener++) {
+          if ((*aListener)->groupMessages()) {
+            (*aListener)->flushGrouped(theID);
+          }
+        }
       }
+    }
   }
 }
 
index 0d1f729bd2442cf59b95681f9e81b8b4faf40d82..b095cc4fc46226094ce6d449505ffe1cd85524dc 100644 (file)
@@ -34,7 +34,7 @@ class Events_Loop
   /// map from event ID to listeners which must process message without waiting for flush
   std::map<char*, Events_Listener*> myImmediateListeners;
 
-  /// map from event ID to groupped messages (accumulated on flush)
+  /// map from event ID to groupped messages (accumulated for flush)
   std::map<char*, std::shared_ptr<Events_Message> > myGroups;
 
   ///< set of messages that are flushed right now, so they are not grouped
@@ -93,6 +93,13 @@ class Events_Loop
   EVENTS_EXPORT bool isFlushed(const Events_ID& theID);
   //! Sets the flag that the event is flished right now
   EVENTS_EXPORT void setFlushed(const Events_ID& theID, const bool theValue);
+
+private:
+  //! Calls "processEvent" for the given listeners.
+  //! If theFlushedNow for grouped listeners is stores message in listeners.
+  void sendProcessEvent(const std::shared_ptr<Events_Message>& theMessage,
+    std::list<Events_Listener*>& theListeners, const bool theFlushedNow);
+
 };
 
 #endif
index 18b4be1accbefc2876e2b435a89fd4a54c5201c0..e5147561b74f6ff56915de2ac55469bde86dda35 100644 (file)
@@ -811,7 +811,7 @@ bool FeaturesPlugin_ValidatorConcealedResult::isValid(const AttributePtr& theAtt
   std::list<std::shared_ptr<ModelAPI_Result> > aResults;\r
   ModelAPI_Tools::getConcealedResults(aRefFeature, aResults);\r
 \r
-  int aConcealedResults = aResults.size();\r
+  size_t aConcealedResults = aResults.size();\r
   if (!aConcealedResults && !theArguments.empty()) {\r
     // find if these results are touched by the feature in another attribute\r
     std::list<std::string>::const_iterator anIt = theArguments.begin();\r
index c44c7a43fa8a51f0805f211a17bd8511ca09fc77..64d4c951f60be5c23921d54807c20d49722525d6 100644 (file)
  * It's aim is to fulfill the newly created documents with the "origin"
  * construction point (0,0,0) and base planes (x0y, z0y, x0z)
  */
-class INITIALIZATIONPLUGIN_EXPORT InitializationPlugin_Plugin : public Events_Listener
+class InitializationPlugin_Plugin : public Events_Listener
 {
  public:
   /// Creates plug-in and registers it in the Event Loop
-  InitializationPlugin_Plugin();
+  INITIALIZATIONPLUGIN_EXPORT InitializationPlugin_Plugin();
   /// Destructs the plugin
-  virtual ~InitializationPlugin_Plugin() {}
+  INITIALIZATIONPLUGIN_EXPORT virtual ~InitializationPlugin_Plugin() {}
   /// Process the ModelAPI_DocumentCreatedMessage to fulfill a document
   /// from the message with origin and planes
-  virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
+  INITIALIZATIONPLUGIN_EXPORT virtual void processEvent(
+    const std::shared_ptr<Events_Message>& theMessage);
 
  protected:
   /// Creates a plane by given parameters A, B, C
index f3851036973ef034a351227afe2cbec72ec01719..64b5ca6de48b497cf5b88678562f7b50d82d0ccf 100644 (file)
@@ -436,9 +436,11 @@ bool Model_AttributeSelection::update()
   if (aContext->groupName() == ModelAPI_ResultBody::group()) {
     // body: just a named shape, use selection mechanism from OCCT
     TNaming_Selector aSelector(aSelLab);
+    TopoDS_Shape anOldShape = aSelector.NamedShape()->Get();
     bool aResult = aSelector.Solve(scope()) == Standard_True;
     aResult = setInvalidIfFalse(aSelLab, aResult); // must be before sending of updated attribute (1556)
-    owner()->data()->sendAttributeUpdated(this);
+    if (!anOldShape.IsEqual(aSelector.NamedShape()->Get())) // send updated if shape is changed
+      owner()->data()->sendAttributeUpdated(this);
     return aResult;
   } else if (aContext->groupName() == ModelAPI_ResultConstruction::group()) {
     // construction: identification by the results indexes, recompute faces and
index 72c85936b48c00153b3cf9eda46f7905e8ad9cc7..d51c39ba8aca9f9bd0b2be83795acae9cc42e8d8 100644 (file)
@@ -222,7 +222,6 @@ class Model_Objects
   friend class Model_AttributeReference;
   friend class Model_AttributeRefAttr;
   friend class Model_AttributeRefList;
-  friend class Model_AttributeRefList;
   friend class Model_SelectionNaming;
 };
 
index f4e189731106f380836dced24b126fae86f5a8ec..bb00695b2f8fe2b726a2ab875535d059871d1e20 100755 (executable)
@@ -119,7 +119,7 @@ bool Model_Update::addModified(FeaturePtr theFeature, FeaturePtr theReason) {
   if (myModified.find(theFeature) != myModified.end()) {
     if (theReason.get()) {
 #ifdef DEB_UPDATE
-      std::cout<<"*** Add already modified "<<theFeature->name()<<" reason "<<theReason->name()<<std::endl;
+      //std::cout<<"*** Add already modified "<<theFeature->name()<<" reason "<<theReason->name()<<std::endl;
 #endif
       myModified[theFeature].insert(theReason);
     }
@@ -139,10 +139,11 @@ bool Model_Update::addModified(FeaturePtr theFeature, FeaturePtr theReason) {
     }
       myModified[theFeature] = aNewSet;
 #ifdef DEB_UPDATE
-    if (theReason.get())
-      std::cout<<"*** Add modified "<<theFeature->name()<<" reason "<<theReason->name()<<std::endl;
-    else 
-      std::cout<<"*** Add modified "<<theFeature->name()<<std::endl;
+    if (theReason.get()) {
+      //std::cout<<"*** Add modified "<<theFeature->name()<<" reason "<<theReason->name()<<std::endl;
+    } else {
+      //std::cout<<"*** Add modified "<<theFeature->name()<<std::endl;
+    }
 #endif
   } else { // will be updated during the finish of the operation, or when it becomes enabled
     if (theFeature->data()->execState() == ModelAPI_StateDone)
@@ -150,7 +151,7 @@ bool Model_Update::addModified(FeaturePtr theFeature, FeaturePtr theReason) {
     else 
       return true; // do not need iteration deeply if it is already marked as modified or so
 #ifdef DEB_UPDATE
-    std::cout<<"*** Set modified state "<<theFeature->name()<<std::endl;
+    //std::cout<<"*** Set modified state "<<theFeature->name()<<std::endl;
 #endif
   }
   // clear processed and fill modified recursively
@@ -460,6 +461,10 @@ bool Model_Update::processFeature(FeaturePtr theFeature)
       }
     }
     updateArguments(theFeature);
+    // send event that sketch is prepared to be recomputed
+    static Events_ID& anID = Events_Loop::eventByName("SketchPrepared");
+    std::shared_ptr<Events_Message> aMsg(new Events_Message(anID, this));
+    Events_Loop::loop()->send(aMsg);
   }
 
   if (!aIsModified) { // no modification is needed
index 3aa459424f5f334461d7ffa0f708a21c22c5905a..0ba832111b165475ab9b6f2c752b500d36ea6b14 100644 (file)
@@ -63,6 +63,9 @@ static const char * EVENT_ORDER_UPDATED = "OrderUpdated";
 /// Event ID that informs that some object has changed the stability
 static const char * EVENT_STABILITY_CHANGED = "StabilityChanged";
 
+/// Event ID that the sketch is prepared and all grouped messages for the solver may be flushed
+static const char * EVENT_SKETCH_PREPARED = "SketchPrepared";
+
 /// Message that feature was changed (used for Object Browser update): moved, updated and deleted
 class MODELAPI_EXPORT ModelAPI_ObjectUpdatedMessage : public Events_MessageGroup
 {
index 976988cdee9ed213e4024388d0594ae805138657..bcecd78f4ed0d54f54eea6ea4cb3a7d0ecd6b25b 100755 (executable)
 #include <GeomAPI_Lin.h>
 #include <GeomAPI_Circ.h>
 
+#ifdef WIN32
+#pragma warning(disable : 4996) // for sprintf
+#endif
+
 namespace ModelGeomAlgo_Point2D {
   std::shared_ptr<GeomDataAPI_Point2D> getPointOfRefAttr(ModelAPI_Feature* theFeature,
                                                          const std::string& theAttribute,
index 834c7c8a306b487271467ca9bef55574edb1475f..b86081714620880e32efebb29a717a0899a61040 100644 (file)
  * \ingroup Plugins
  * \brief The main class for management the part set operations as plugin.
  */
-class PARTSETPLUGIN_EXPORT PartSetPlugin_Plugin : public ModelAPI_Plugin,
+class PartSetPlugin_Plugin : public ModelAPI_Plugin,
                                                   public Events_Listener
 {
  public:
   /// Creates the feature object of this plugin by the feature string ID
-  virtual FeaturePtr createFeature(std::string theFeatureID);
+  PARTSETPLUGIN_EXPORT virtual FeaturePtr createFeature(std::string theFeatureID);
 
   /// Is needed for python wrapping by swig
-  PartSetPlugin_Plugin();
+  PARTSETPLUGIN_EXPORT PartSetPlugin_Plugin();
 
   //! Redefinition of Events_Listener method
-  virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
+  PARTSETPLUGIN_EXPORT virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
   //! Performs the chenges of enabled/disabled state in the toolbar
   //! due to the current state of the application.
-  std::shared_ptr<ModelAPI_FeatureStateMessage> getFeaturesState();
+  PARTSETPLUGIN_EXPORT std::shared_ptr<ModelAPI_FeatureStateMessage> getFeaturesState();
 };
 
 #endif
index 3b9de25ef6941f1ec63831c3a2aec82e8c0b0c03..822eeea51b1745803badcf392bf74db1bee378e3 100644 (file)
  * \ingroup Plugins
  * \brief Interface common for any plugin: allows to use plugin by the plugins manager.
  */
-class SKETCHPLUGIN_EXPORT SketchPlugin_Plugin : public ModelAPI_Plugin, public Events_Listener
+class SketchPlugin_Plugin : public ModelAPI_Plugin, public Events_Listener
 {
 public:
   /// Creates the feature object of this plugin by the feature string ID
-  virtual FeaturePtr createFeature(std::string theFeatureID);
+  SKETCHPLUGIN_EXPORT virtual FeaturePtr createFeature(std::string theFeatureID);
+
+  /// Constructor that registers features and other plugin elements.
+  SKETCHPLUGIN_EXPORT SketchPlugin_Plugin();
 
- public:
-  SketchPlugin_Plugin();
   //! Redefinition of Events_Listener method
-  virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
+  SKETCHPLUGIN_EXPORT virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
+
 protected:
   //! Returns the state of the feature in the WorkBench: enabled or disabled for the moment.
   std::shared_ptr<ModelAPI_FeatureStateMessage> getFeaturesState(
index 3a8f8ea86b9c0fafd2fb13b64f5c93c6bfae9677..84760732544218543365edcc7ee6de4cdff82e17 100644 (file)
@@ -79,12 +79,13 @@ SketchSolver_Manager::SketchSolver_Manager()
 
   // Register in event loop
   Events_Loop::loop()->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_CREATED));
-  Events_Loop::loop()->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
+  Events_Loop::loop()->registerListener(this, anUpdateEvent);
   Events_Loop::loop()->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_DELETED));
   Events_Loop::loop()->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_MOVED));
 
   Events_Loop::loop()->registerListener(this, Events_Loop::eventByName(EVENT_SOLVER_FAILED));
   Events_Loop::loop()->registerListener(this, Events_Loop::eventByName(EVENT_SOLVER_REPAIRED));
+  Events_Loop::loop()->registerListener(this, Events_Loop::eventByName(EVENT_SKETCH_PREPARED));
 }
 
 SketchSolver_Manager::~SketchSolver_Manager()
@@ -102,6 +103,11 @@ BuilderPtr SketchSolver_Manager::builder()
   return myBuilder;
 }
 
+bool SketchSolver_Manager::groupMessages()
+{
+  return true;
+}
+
 // ============================================================================
 //  Function: processEvent
 //  Purpose:  listen the event loop and process the message
@@ -109,7 +115,15 @@ BuilderPtr SketchSolver_Manager::builder()
 void SketchSolver_Manager::processEvent(
   const std::shared_ptr<Events_Message>& theMessage)
 {
+  static const Events_ID aSketchPreparedEvent = Events_Loop::eventByName(EVENT_SKETCH_PREPARED);
+  // sketch is prepared for resolve: all the needed events are collected and must be processed by the solver
+  if (theMessage->eventID() == aSketchPreparedEvent) {
+    flushGrouped(anUpdateEvent);
+    return;
+  }
+
   checkConflictingConstraints(theMessage);
+
   if (myIsComputed)
     return;
   myIsComputed = true;
@@ -118,7 +132,7 @@ void SketchSolver_Manager::processEvent(
   bool hasProperFeature = false;
 
   if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_CREATED)
-      || theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_UPDATED)
+      || theMessage->eventID() == anUpdateEvent
       || theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_MOVED)) {
     std::shared_ptr<ModelAPI_ObjectUpdatedMessage> anUpdateMsg =
         std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
@@ -169,6 +183,9 @@ void SketchSolver_Manager::processEvent(
     // Features may be updated => now send events, but for all changed at once
     if (isUpdateFlushed)
       allowSendUpdate();
+
+    myIsComputed = false;
+
     // send update for movement in any case
     if (needToUpdate || isMovedEvt)
       Events_Loop::loop()->flush(anUpdateEvent);
@@ -215,11 +232,11 @@ void SketchSolver_Manager::processEvent(
       if (!aGroupsToResolve.empty())
         resolveConstraints(aGroupsToResolve);
     }
+    myIsComputed = false;
   }
 
   if (hasProperFeature)
     degreesOfFreedom();
-  myIsComputed = false;
 }
 
 void SketchSolver_Manager::checkConflictingConstraints(const std::shared_ptr<Events_Message>& theMessage)
index c0866c558493a500b98dfb9351a22c6fd206306e..51581b987398b0eed4e107f534e4b58d942edc46 100644 (file)
@@ -41,6 +41,12 @@ public:
    */
   virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
 
+  /**
+   * The solver needs all the updated objects are transfered in one group, not one by one.
+   * This iscreases performance and avoids problems in resolve of only part of the made updates.
+   */
+  virtual bool groupMessages();
+
   /// \brief Initialize builder for solver's data structure entities
   /// \param theBuilder [in]  solver's specific builder
   SKETCHSOLVER_EXPORT void setBuilder(BuilderPtr theBuilder);
index 67f32cf6f136c3374d0dca0748b0e2a3b555fdfc..33adeeb2511cc51c7fa7a747c7f58c3e1a32aee4 100644 (file)
@@ -140,7 +140,7 @@ namespace XAO
          * Gets the number of the steps.
          * @return the number of steps.
          */
-        const int countSteps() const { return m_steps.size(); }
+        const int countSteps() const { return int(m_steps.size()); }
 
         /**
          * Gets the name of a component.
index 4f0115403fba3e29b7badbbbecf2e9ba7f82d9f3..7dfd6f0c57ed2f0148e330dc04227c46d6f7162e 100644 (file)
@@ -93,7 +93,7 @@ namespace XAO
          */
         const int count() const
         {
-            return m_elements.size();
+            return int(m_elements.size());
         }
 
         /**