Salome HOME
Make v1.1.0 compilable under linux
authorsbh <sergey.belash@opencascade.com>
Wed, 1 Apr 2015 09:57:54 +0000 (12:57 +0300)
committersbh <sergey.belash@opencascade.com>
Wed, 1 Apr 2015 09:57:54 +0000 (12:57 +0300)
src/Config/Config_Prop.h
src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp
src/Model/Model_Update.cpp
src/ModuleBase/ModuleBase_PagedContainer.cpp
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp
src/PartSet/PartSet_WidgetShapeSelector.cpp
src/SketchPlugin/SketchPlugin_ConstraintMirror.cpp
src/SketchSolver/SketchSolver_ConstraintGroup.cpp
src/SketchSolver/SketchSolver_ConstraintGroup.h
src/SketcherPrs/SketcherPrs_Radius.cpp

index 5e6cc4bc8576045bef9023694e7966a1c3121254..b24e422789cd86d197b76000dad3ccec783fae76 100644 (file)
@@ -4,8 +4,8 @@
 // Created:     12 Aug 2014
 // Author:      Vitaly SMETANNIKOV
 
-#ifndef Config_Prop_H
-#define Config_Prop_H
+#ifndef CONFIG_PROP_H
+#define CONFIG_PROP_H
 
 #include "Config_def.h"
 
@@ -26,7 +26,7 @@ class Config_Prop
   {
     Disabled,
     Space,
-    Bool,
+    Boolean,
     Color,
     String,
     Selector,
index 3d8c5bbc842d2fb14bebc33d78070df9bb22f284..3056c26826725267bb419994850fb66990db52ff 100644 (file)
@@ -72,8 +72,12 @@ void FeaturesPlugin_Extrusion::execute()
 
     for(int aFaceIndex = 0; aFaceIndex < aFacesNum || aFacesNum == -1; aFaceIndex++) {
       ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
-      std::shared_ptr<GeomAPI_Shape> aFace = 
-        aFacesNum == -1 ? aValueFace : aConstruction->face(aFaceIndex);
+      std::shared_ptr<GeomAPI_Shape> aFace;
+      if (aFacesNum == -1) {
+        aFace = aValueFace;
+      } else {
+        aFace = std::dynamic_pointer_cast<GeomAPI_Shape>(aConstruction->face(aFaceIndex));
+      }
       GeomAlgoAPI_Extrusion aFeature(aFace, aSize);
       if(!aFeature.isDone()) {
         static const std::string aFeatureError = "Extrusion algorithm failed";  
index 2390df8268e737bb4e0038bd0df4e4e4e38f58d6..f1b4f50ff35fab60a0de7b867d3c56c9b14254ba 100644 (file)
@@ -50,7 +50,7 @@ Model_Update::Model_Update()
   aLoop->registerListener(this, kOpStartEvent);
 
   Config_PropManager::registerProp("Model update", "automatic_rebuild", "Rebuild immediately",
-                                   Config_Prop::Bool, "false");
+                                   Config_Prop::Boolean, "false");
   myIsAutomatic =
     Config_PropManager::findProp("Model update", "automatic_rebuild")->value() == "true";
 }
index 43fb4de2233308b7a25717dea526759092753668..b4e8b5690604a1e99bf607ec79cbb0a8b704d06d 100644 (file)
@@ -13,7 +13,7 @@
 #include <ModelAPI_AttributeString.h>
 
 #include <QWidget>
-#include <Qlist>
+#include <QList>
 #include <QVBoxLayout>
 
 
index 8b53074f961a4755a1cd02fc478c41e85979d420..9d74cc2fb48bb08f67d546bcf00611bf0389cf2b 100644 (file)
@@ -231,7 +231,7 @@ bool ModuleBase_WidgetMultiSelector::setSelection(const Handle_SelectMgr_EntityO
   AttributeSelectionListPtr aSelectionListAttr = 
     std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(aData->attribute(attributeID()));
   if (aShape->isEqual(aResult->shape()))
-    aSelectionListAttr->append(aResult, NULL);
+    aSelectionListAttr->append(aResult, GeomShapePtr());
   else
     aSelectionListAttr->append(aResult, aShape);
 
index 36bbd0314e502d8324f1570127ec203f2367b36a..34eb3e189061b69be8b7fff28f62e7a3f76034b5 100644 (file)
@@ -377,7 +377,7 @@ void ModuleBase_WidgetShapeSelector::storeAttributeValue()
 
   myObject = GeomValidators_Tools::getObject(anAttribute);
   myShape = getShape();
-  myRefAttribute = NULL;
+  myRefAttribute = AttributePtr();
   myIsObject = false;
   AttributeRefAttrPtr aRefAttr = aData->refattr(attributeID());
   if (aRefAttr) {
index 7352c1344cb42c50241b3fea9b8a860804f78c07..3dc5460c20280216dde3d8f9f897c61ddaf30a62 100644 (file)
@@ -116,6 +116,6 @@ void PartSet_WidgetShapeSelector::removeExternal()
       anIgnoredFeatures.insert(sketch());
       XGUI_Workshop::deleteFeatures(anObjects, anIgnoredFeatures);
     }
-    myExternalObject = NULL;
+    myExternalObject = ObjectPtr();
   }
 }
index fde907d815e9e9616819398e4e1263cd4b610fa1..5dc94ef4a28b5e38b00440fc1dc9daebeae646de 100644 (file)
@@ -79,8 +79,7 @@ void SketchPlugin_ConstraintMirror::execute()
         ResultConstructionPtr aRC =
             std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aMirrorIter);
         DocumentPtr aDoc = aRC ? aRC->document() : DocumentPtr();
-        FeaturePtr aFeature =  aDoc ? std::dynamic_pointer_cast<SketchPlugin_Feature>(
-              aDoc->feature(aRC)) : FeaturePtr();
+        FeaturePtr aFeature =  aDoc ? aDoc->feature(aRC) : FeaturePtr();
         if (aFeature)
           aDoc->removeFeature(aFeature);
       }
index 9b0ae4325756fb0ae42fef3ff50a45b56a89aeb7..a3f083faf190c5ea113a901543db95c8b48b7ac4 100644 (file)
@@ -687,10 +687,10 @@ bool SketchSolver_ConstraintGroup::changeMirrorConstraint(
   for ( ; aBaseIter != aBaseList.end(); aBaseIter++, aMirIter++) {
     aRC = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aBaseIter);
     aBaseFeature = aRC ? aRC->document()->feature(aRC) :
-        std::dynamic_pointer_cast<SketchPlugin_Feature>(*aBaseIter);
+        std::dynamic_pointer_cast<ModelAPI_Feature>(*aBaseIter);
     aRC = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aMirIter);
     aMirrorFeature = aRC ? aRC->document()->feature(aRC) :
-        std::dynamic_pointer_cast<SketchPlugin_Feature>(*aMirIter);
+        std::dynamic_pointer_cast<ModelAPI_Feature>(*aMirIter);
 
     if (!aBaseFeature || !aMirrorFeature || 
         aBaseFeature->getKind() != aMirrorFeature->getKind())
@@ -806,7 +806,7 @@ bool SketchSolver_ConstraintGroup::changeMirrorConstraint(
     for (aBaseIter = aBaseList.begin(); aBaseIter != aBaseList.end(); aBaseIter++) {
       aRC = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aBaseIter);
       aBaseFeature = aRC ? aRC->document()->feature(aRC) :
-          std::dynamic_pointer_cast<SketchPlugin_Feature>(*aBaseIter);
+          std::dynamic_pointer_cast<ModelAPI_Feature>(*aBaseIter);
       if (!aBaseFeature) continue;
       std::list<AttributePtr> aPoints = aBaseFeature->data()->attributes(GeomDataAPI_Point2D::typeId());
       std::list<AttributePtr>::iterator anIt = aPoints.begin();
@@ -921,7 +921,7 @@ bool SketchSolver_ConstraintGroup::changeFilletConstraint(
   for (int indEnt = 0; aFilIter != aFilletList.end(); aFilIter++, indEnt++) {
     aRC = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aFilIter);
     aFilletFeature = aRC ? aRC->document()->feature(aRC) :
-        std::dynamic_pointer_cast<SketchPlugin_Feature>(*aFilIter);
+        std::dynamic_pointer_cast<ModelAPI_Feature>(*aFilIter);
     if (!aFilletFeature)
       return false;
     aFilletEnt[indEnt] = changeEntityFeature(aFilletFeature);
@@ -1080,7 +1080,7 @@ Slvs_hEntity SketchSolver_ConstraintGroup::changeEntity(
   std::map<std::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::const_iterator aEntIter =
       myEntityAttrMap.find(theEntity);
   int aEntPos;
-  std::vector<Slvs_Param>::const_iterator aParamIter;  // looks at first parameter of already existent entity or at the end of vector otherwise
+  std::vector<Slvs_Param>::iterator aParamIter;  // looks at first parameter of already existent entity or at the end of vector otherwise
   if (aEntIter == myEntityAttrMap.end())  // no such entity => should be created
     aParamIter = myParams.end();
   else {  // the entity already exists
@@ -1297,7 +1297,7 @@ Slvs_hEntity SketchSolver_ConstraintGroup::changeNormal(
   // Try to find existent normal
   std::map<std::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::const_iterator aEntIter =
       myEntityAttrMap.find(theNorm);
-  std::vector<Slvs_Param>::const_iterator aParamIter;  // looks to the first parameter of already existent entity or to the end of vector otherwise
+  std::vector<Slvs_Param>::iterator aParamIter;  // looks to the first parameter of already existent entity or to the end of vector otherwise
   if (aEntIter == myEntityAttrMap.end())  // no such entity => should be created
     aParamIter = myParams.end();
   else {  // the entity already exists, update it
@@ -1378,7 +1378,7 @@ bool SketchSolver_ConstraintGroup::updateWorkplane()
 //  Purpose:  create/update value of parameter
 // ============================================================================
 Slvs_hParam SketchSolver_ConstraintGroup::changeParameter(
-    const double& theParam, std::vector<Slvs_Param>::const_iterator& thePrmIter)
+    double theParam, std::vector<Slvs_Param>::iterator& thePrmIter)
 {
   if (thePrmIter != myParams.end()) {  // Parameter should be updated
     int aParamPos = thePrmIter - myParams.begin();
@@ -2192,7 +2192,7 @@ Slvs_hConstraint SketchSolver_ConstraintGroup::changeMirrorPoints(
   std::map<Slvs_hEntity, Slvs_hEntity>::iterator aMapIter = thePrevMirror.find(theBasePoint);
   if (aMapIter != thePrevMirror.end()) {
     thePrevMirror.erase(aMapIter);
-    std::vector<Slvs_Constraint>::const_iterator anIter = thePrevConstr.begin();
+    std::vector<Slvs_Constraint>::iterator anIter = thePrevConstr.begin();
     for (; anIter != thePrevConstr.end(); anIter++)
       if (anIter->ptA == theBasePoint) {
         if (anIter->ptB != theMirrorPoint) {
index 73dc23d633c878c870d9fe8113f4d63c223af8f4..8ec26852fac14300c69639231ec902a1d470999f 100644 (file)
@@ -168,8 +168,8 @@ protected:
    *                        (the iterator will be increased if it does not reach the end of the list)
    *  \return identifier of changed parameter; when the parameter cannot be created, returned ID is 0
    */
-  Slvs_hParam changeParameter(const double& theParam,
-                              std::vector<Slvs_Param>::const_iterator& thePrmIter);
+  Slvs_hParam changeParameter(double theParam,
+                              std::vector<Slvs_Param>::iterator& thePrmIter);
 
   /** \brief Removes specified entities and their parameters
    *  \param[in] theEntities  list of IDs of the entities to be removed
index 07957c4dbb458f3c812a4e8aa551973c70e6ea0d..5e30f527fa95dd82ef66758e8b5b27c2e3aedfe6 100644 (file)
@@ -13,7 +13,7 @@
 #include <SketchPlugin_Arc.h>
 
 #include <GeomDataAPI_Point2D.h>
-#include <GeomAPI_Pnt2D.h>
+#include <GeomAPI_Pnt2d.h>
 #include <GeomAPI_Circ.h>
 #include <GeomAPI_XYZ.h>
 #include <ModelAPI_AttributeDouble.h>