Salome HOME
Merge branch 'BR_PYTHON_PLUGIN' of newgeom:newgeom.git into Dev_0.6.1
authorsbh <sergey.belash@opencascade.com>
Mon, 22 Dec 2014 07:21:50 +0000 (10:21 +0300)
committersbh <sergey.belash@opencascade.com>
Mon, 22 Dec 2014 07:21:50 +0000 (10:21 +0300)
Conflicts:
src/Events/Events_Loop.cpp:
<<<<<<< HEAD
    if (!aWasFlushed)
      myFlushed.erase(myFlushed.find(theID.myID));
=======
    std::set<char*>::iterator anIt = myFlushed.find(theID.myID);
    if (anIt != myFlushed.end()) {
      myFlushed.erase(anIt);
    }
>>>>>>> origin/BR_PYTHON_PLUGIN
src/ModelAPI/ModelAPI.i
src/ModelAPI/ModelAPI_Plugin.h
src/PartSetPlugin/PartSetPlugin_Plugin.h

23 files changed:
1  2 
CMakeLists.txt
msvc10_env.bat
src/Config/CMakeLists.txt
src/Config/Config_Keywords.h
src/Config/Config_ModuleReader.cpp
src/Config/Config_ModuleReader.h
src/Config/plugins.xml
src/ConstructionPlugin/ConstructionPlugin_Plugin.h
src/Events/Events_Loop.cpp
src/ExchangePlugin/ExchangePlugin_Plugin.h
src/FeaturesPlugin/FeaturesPlugin_Plugin.h
src/GeomAPI/CMakeLists.txt
src/GeomAlgoAPI/CMakeLists.txt
src/GeomDataAPI/CMakeLists.txt
src/Model/Model_Session.cpp
src/Model/Model_Update.cpp
src/ModelAPI/CMakeLists.txt
src/ModelAPI/ModelAPI.i
src/ModelAPI/ModelAPI_AttributeRefAttr.h
src/ModelAPI/ModelAPI_Plugin.h
src/ModelAPI/ModelAPI_Session.cpp
src/ModelAPI/ModelAPI_Session.h
src/SketchPlugin/SketchPlugin_Plugin.h

diff --cc CMakeLists.txt
Simple merge
diff --cc msvc10_env.bat
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 3ab9a1cafe5e1e7450e89be8ebbb278ef40eec9e,d70b9764f1b05603e600cba3d751953e0df5afec..139e862340007e89ce5dec7723768cb401df18cd
@@@ -127,8 -122,10 +127,9 @@@ void Events_Loop::flush(const Events_ID
      std::shared_ptr<Events_Message> aGroup = aMyGroup->second;
      myGroups.erase(aMyGroup);
      send(aGroup, false);
 -    std::set<char*>::iterator anIt = myFlushed.find(theID.myID);
 -    if (anIt != myFlushed.end()) {
 -      myFlushed.erase(anIt);
 -    }
++
 +    if (!aWasFlushed)
 +      myFlushed.erase(myFlushed.find(theID.myID));
    }
  }
  
Simple merge
Simple merge
Simple merge
Simple merge
index 7360d0d1ef51fe79f1dfe65b332b765b4fb75301,e7116df59d3cbadb34bbab0f54739b53d98ec188..b27e6cc1740a80754de4edbf3d0a7c7606b3a812
@@@ -324,12 -280,14 +325,14 @@@ bool Model_Update::updateFeature(Featur
            }
          } else {
            theFeature->eraseResults();
 -          redisplayWithResults(theFeature); // result also must be updated
 +          redisplayWithResults(theFeature, ModelAPI_StateInvalidArgument); // result also must be updated
          }
        } else { // for automatically updated features (on abort, etc) it is necessary to redisplay anyway
 -        redisplayWithResults(theFeature);
 +        redisplayWithResults(theFeature, ModelAPI_StateNothing);
        }
-     } else {  // returns also true is results were updated: for sketch that refers to sub-features but results of sub-features were changed
+     } else {
+       // returns also true is results were updated: for sketch that 
+       // refers to sub-features but results of sub-features were changed
        const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = theFeature->results();
        std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
        for (; aRIter != aResults.cend(); aRIter++) {
Simple merge
index 1558e49dc64c226f2027e9732caedb7b92cf2354,5c97aeb4cbab2f1931fa902a411d4eba68f7b1b6..bdf6c28e52b440c0161f3fd7a0010419d974c8d9
  %include "ModelAPI_ResultParameters.h"
  %include "ModelAPI_Tools.h"
  
++// std::list -> [] 
  %template(ObjectList) std::list<std::shared_ptr<ModelAPI_Object> >;
  %template(ResultList) std::list<std::shared_ptr<ModelAPI_Result> >;
 +%template(DocumentList) std::list<std::shared_ptr<ModelAPI_Document> >;
  
++// std::dynamic_pointer_cast
  template<class T1, class T2> std::shared_ptr<T1> shared_ptr_cast(std::shared_ptr<T2> theObject);
  %template(modelAPI_CompositeFeature) shared_ptr_cast<ModelAPI_CompositeFeature, ModelAPI_Feature>;
  %template(modelAPI_Feature) shared_ptr_cast<ModelAPI_Feature, ModelAPI_Object>;
 -// Result casts
++
+ %template(modelAPI_Result) shared_ptr_cast<ModelAPI_Result, ModelAPI_Object>;
  %template(modelAPI_ResultConstruction) shared_ptr_cast<ModelAPI_ResultConstruction, ModelAPI_Result>;
  %template(modelAPI_ResultBody) shared_ptr_cast<ModelAPI_ResultBody, ModelAPI_Result>;
  %template(modelAPI_ResultPart) shared_ptr_cast<ModelAPI_ResultPart, ModelAPI_Result>;
 +%template(modelAPI_ResultGroup) shared_ptr_cast<ModelAPI_ResultPart, ModelAPI_ResultGroup>;
+ // Attribute casts
+ %template(modelAPI_AttributeDocRef)        shared_ptr_cast<ModelAPI_AttributeDocRef, ModelAPI_Attribute>;
+ %template(modelAPI_AttributeDouble)        shared_ptr_cast<ModelAPI_AttributeDouble, ModelAPI_Attribute>;
+ %template(modelAPI_AttributeInteger)       shared_ptr_cast<ModelAPI_AttributeInteger, ModelAPI_Attribute>;
+ %template(modelAPI_AttributeString)        shared_ptr_cast<ModelAPI_AttributeString, ModelAPI_Attribute>;
+ %template(modelAPI_AttributeReference)     shared_ptr_cast<ModelAPI_AttributeReference, ModelAPI_Attribute>;
+ %template(modelAPI_AttributeRefAttr)       shared_ptr_cast<ModelAPI_AttributeRefAttr, ModelAPI_Attribute>;
+ %template(modelAPI_AttributeBoolean)       shared_ptr_cast<ModelAPI_AttributeBoolean, ModelAPI_Attribute>;
+ %template(modelAPI_AttributeSelection)     shared_ptr_cast<ModelAPI_AttributeSelection, ModelAPI_Attribute>;
+ %template(modelAPI_AttributeSelectionList) shared_ptr_cast<ModelAPI_AttributeSelectionList, ModelAPI_Attribute>;
+ %template(modelAPI_AttributeRefList)       shared_ptr_cast<ModelAPI_AttributeRefList, ModelAPI_Attribute>;
Simple merge
Simple merge
Simple merge
index fad6fa739df89b3b55d9a66ede701a2dd67bc863,3b480410b8b169b23ccdbddfb98faf7455e59dc6..a02ef822c85e1bbdc88de7c458dc031c84aa2ca6
@@@ -20,13 -16,7 +20,12 @@@ class SKETCHPLUGIN_EXPORT SketchPlugin_
    virtual FeaturePtr createFeature(std::string theFeatureID);
  
   public:
-   /// Is needed for python wrapping by swig
    SketchPlugin_Plugin();
 +  //! Redefinition of Events_Listener method
 +  virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
 + protected:
 +  std::shared_ptr<ModelAPI_FeatureStateMessage> getFeaturesState(
 +      const std::shared_ptr<ModelAPI_Feature>& theFeature) const;
  };
  
  #endif