Salome HOME
IPAL10786: "Edit" is unnecessary functionality for some Mesh hypotheses
authoreap <eap@opencascade.com>
Thu, 29 Oct 2015 16:18:36 +0000 (19:18 +0300)
committereap <eap@opencascade.com>
Thu, 29 Oct 2015 16:18:36 +0000 (19:18 +0300)
+ Eliminate compilation warnings

19 files changed:
idl/SMESH_Hypothesis.idl
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI_Selection.cxx
src/SMESHGUI/SMESHGUI_Selection.h
src/SMESH_I/SMESH_2smeshpy.cxx
src/SMESH_I/SMESH_2smeshpy.hxx
src/SMESH_I/SMESH_Filter_i.cxx
src/SMESH_I/SMESH_Hypothesis_i.cxx
src/SMESH_I/SMESH_Hypothesis_i.hxx
src/SMESH_I/SMESH_Measurements_i.cxx
src/SMESH_I/SMESH_Pattern_i.cxx
src/SMESH_I/SMESH_PreMeshInfo.cxx
src/SMESH_I/SMESH_subMesh_i.cxx
src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx
src/StdMeshers_I/StdMeshers_FixedPoints1D_i.cxx
src/StdMeshers_I/StdMeshers_ImportSource1D_i.cxx
src/StdMeshers_I/StdMeshers_ImportSource2D_i.cxx
src/StdMeshers_I/StdMeshers_LengthFromEdges_i.cxx
src/StdMeshers_I/StdMeshers_LengthFromEdges_i.hxx

index 6157618d6eb4e09006dedd0ed3b8c43bf8502135..ab6e7dd43c1fc2f40803cfa5d0fe7d1a6eb06eff 100644 (file)
@@ -87,6 +87,13 @@ module SMESH
      * Verify whether hypothesis supports given entity type 
      */
     boolean IsDimSupported( in Dimension type );
+
+    /*!
+     * Return true if a hypothesis has parameters.
+     *
+     * This method is intended for GUI to know if "Edit" menu item sould be available
+     */
+    boolean HasParameters();
   };
 
   typedef sequence<string> ListOfHypothesisName;
index a465cd3bec41d431b0c77ae3f81f83ca1d4dc47b..b3d61a7631e3fc9e7d4a9e00185850af186729ee 100644 (file)
@@ -4353,7 +4353,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createPopupItem( SMESHOp::OpCreateGeometryGroup,    OB, mesh, "&& hasGeomReference" );
   createPopupItem( SMESHOp::OpConstructGroup,         OB, subMesh );
   popupMgr()->insert( separator(), -1, 0 );
-  createPopupItem( SMESHOp::OpEditHypothesis,         OB, hypo);
+  createPopupItem( SMESHOp::OpEditHypothesis,         OB, hypo, "&& isEditableHyp");
   createPopupItem( SMESHOp::OpUnassign,               OB, hyp_alg );     // REMOVE HYPOTHESIS / ALGORITHMS
   popupMgr()->insert( separator(), -1, 0 );
   createPopupItem( SMESHOp::OpConvertMeshToQuadratic, OB, mesh + " " + subMesh );  // convert to quadratic
index fa6f4c3868811b7c96d2bb285056d1163cc8ccda..3d446d96d43f9019368789e84136041d16b5ff83 100644 (file)
@@ -129,6 +129,7 @@ QVariant SMESHGUI_Selection::parameter( const int ind, const QString& p ) const
   else if ( p=="isComputable" )         val = QVariant( isComputable( ind ) );
   else if ( p=="isPreComputable" )      val = QVariant( isPreComputable( ind ) );
   else if ( p=="hasGeomReference" )     val = QVariant( hasGeomReference( ind ) );
+  else if ( p=="isEditableHyp" )        val = QVariant( isEditableHyp( ind ) );
   else if ( p=="isImported" )           val = QVariant( isImported( ind ) );
   else if ( p=="facesOrientationMode" ) val = QVariant( facesOrientationMode( ind ) );
   else if ( p=="groupType" )            val = QVariant( groupType( ind ) );
@@ -495,16 +496,16 @@ int SMESHGUI_Selection::dim( int ind ) const
 //purpose  : return true for a ready-to-compute mesh
 //=======================================================================
 
-QVariant SMESHGUI_Selection::isComputable( int ind ) const
+bool SMESHGUI_Selection::isComputable( int ind ) const
 {
   if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] == "Mesh" )
   {
     QMap<int,int> modeMap;
     _PTR(SObject) so = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
     SMESHGUI_PrecomputeOp::getAssignedAlgos( so, modeMap );
-    return QVariant( modeMap.size() > 0 );
+    return modeMap.size() > 0;
   }
-  return QVariant( false );
+  return false;
 }
 
 //=======================================================================
@@ -512,7 +513,7 @@ QVariant SMESHGUI_Selection::isComputable( int ind ) const
 //purpose  : returns true for a mesh with algorithms
 //=======================================================================
 
-QVariant SMESHGUI_Selection::isPreComputable( int ind ) const
+bool SMESHGUI_Selection::isPreComputable( int ind ) const
 {
   if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] == "Mesh" )
   {
@@ -523,11 +524,11 @@ QVariant SMESHGUI_Selection::isPreComputable( int ind ) const
       _PTR(SObject) pMesh = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
       SMESHGUI_PrecomputeOp::getAssignedAlgos( pMesh, modeMap );
       if ( modeMap.size() > 1 )
-        return QVariant( ( modeMap.contains( SMESH::DIM_3D )) ||
-                         ( modeMap.contains( SMESH::DIM_2D ) && maxDim < 1 ));
+        return (( modeMap.contains( SMESH::DIM_3D )) ||
+                ( modeMap.contains( SMESH::DIM_2D ) && maxDim < 1 ));
     }
   }
-  return QVariant( false );
+  return false;
 }
 
 //=======================================================================
@@ -535,15 +536,35 @@ QVariant SMESHGUI_Selection::isPreComputable( int ind ) const
 //purpose  : returns true for a mesh or sub-mesh on geometry
 //=======================================================================
 
-QVariant SMESHGUI_Selection::hasGeomReference( int ind ) const
+bool SMESHGUI_Selection::hasGeomReference( int ind ) const
 {
   if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
   {
     _PTR(SObject) so = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
     GEOM::GEOM_Object_var shape = SMESH::GetShapeOnMeshOrSubMesh( so );
-    return QVariant( !shape->_is_nil() );
+    return !shape->_is_nil();
+  }
+  return false;
+}
+
+//=======================================================================
+//function : isEditableHyp
+//purpose  : 
+//=======================================================================
+
+bool SMESHGUI_Selection::isEditableHyp( int ind ) const
+{
+  bool isEditable = true;
+  if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] == "Hypothesis" )
+  {
+    _PTR(SObject) so = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() );
+    SMESH::SMESH_Hypothesis_var hyp = SMESH::SObjectToInterface<SMESH::SMESH_Hypothesis>( so );
+    if ( !hyp->_is_nil() )
+    {
+      isEditable = hyp->HasParameters();
+    }
   }
-  return QVariant( false );
+  return isEditable;
 }
 
 //=======================================================================
@@ -551,17 +572,17 @@ QVariant SMESHGUI_Selection::hasGeomReference( int ind ) const
 //purpose  : 
 //=======================================================================
 
-QVariant SMESHGUI_Selection::isVisible( int ind ) const
+bool SMESHGUI_Selection::isVisible( int ind ) const
 {
   if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
   {
     SMESH_Actor* actor = SMESH::FindActorByEntry( entry( ind ).toLatin1().data() );
     if ( actor && actor->hasIO() ) {
       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetCurrentVtkView() )
-        return QVariant( aViewWindow->isVisible( actor->getIO() ) );
+        return aViewWindow->isVisible( actor->getIO() );
     }
   }
-  return QVariant( false );
+  return false;
 }
 
 //=======================================================================
index de0d0d12f1f73c02a8bc64e2623b77152d49c87a..e3146cad3e341b718553d2afa07889b4fd01761a 100644 (file)
@@ -56,10 +56,11 @@ public:
   virtual bool            isAutoColor( int ) const;
   virtual int             numberOfNodes( int ) const;
   virtual int             dim( int ) const;
-  virtual QVariant        isComputable( int ) const;
-  virtual QVariant        isPreComputable( int ) const;
-  virtual QVariant        hasGeomReference( int ) const;
-  virtual QVariant        isVisible( int ) const;
+  virtual bool            isComputable( int ) const;
+  virtual bool            isPreComputable( int ) const;
+  virtual bool            hasGeomReference( int ) const;
+  virtual bool            isEditableHyp( int ) const;
+  virtual bool            isVisible( int ) const;
 
   virtual QString         quadratic2DMode( int ) const;
 
index 3ea0f6acdac068268bb55b99972634357c8fae8b..2669db47bc92347b6f1c140764e55f18ad3176b7 100644 (file)
@@ -919,7 +919,7 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
           Threshold = SMESH + types[ iGeom ];
 #ifdef _DEBUG_
         // is types complete? (compilation failure mains that enum GeometryType changed)
-        int _assert[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 1 : -1 ];
+        int _assert[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 1 : -1 ]; _assert[0]=1;
 #endif
       }
       if (Type == "SMESH.FT_EntityType")
@@ -939,7 +939,7 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
           Threshold = SMESH + types[ iGeom ];
 #ifdef _DEBUG_
         // is types complete? (compilation failure mains that enum EntityType changed)
-        int _assert[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 1 : -1 ];
+        int _assert[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 1 : -1 ]; _assert[0]=1;
 #endif
       }
     }
@@ -1930,7 +1930,7 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
     TCollection_AsciiString grIDs = theCommand->GetResultValue();
     list< _pyID >          idList = theCommand->GetStudyEntries( grIDs );
     list< _pyID >::iterator  grID = idList.begin();
-    const int nbGroupsBefore = myGroups.size();
+    const size_t nbGroupsBefore = myGroups.size();
     Handle(_pyObject) obj;
     for ( ; grID != idList.end(); ++grID )
     {
@@ -3133,7 +3133,7 @@ void _pyHypothesis::setCreationArg( const int argNb, const _AString& arg )
 {
   if ( myCurCrMethod )
   {
-    while ( myCurCrMethod->myArgs.size() < argNb )
+    while ( (int) myCurCrMethod->myArgs.size() < argNb )
       myCurCrMethod->myArgs.push_back( "None" );
     if ( arg.IsEmpty() )
       myCurCrMethod->myArgs[ argNb-1 ] = "None";
@@ -3200,7 +3200,7 @@ void _pyComplexParamHypo::Process( const Handle(_pyCommand)& theCommand)
     for ( ; type2meth != myAlgoType2CreationMethod.end(); ++type2meth )
     {
       CreationMethod& crMethod = type2meth->second;
-        while ( crMethod.myArgs.size() < i+1 )
+      while ( (int) crMethod.myArgs.size() < i+1 )
           crMethod.myArgs.push_back( "[]" );
         crMethod.myArgs[ i ] = theCommand->GetArg( 1 ); // arg value
     }
index a67e3cbca3b539c172013050d0610ea9589b1f09..ca1f78337da2172d7152d79438c044b3940ba506 100644 (file)
@@ -115,7 +115,7 @@ class _pyCommand: public Standard_Transient
 public:
   _pyCommand() {};
   _pyCommand( const _AString& theString, int theNb=-1 )
-    : myString( theString ), myOrderNb( theNb ) {};
+    : myOrderNb( theNb ), myString( theString ) {};
   _AString & GetString() { return myString; }
   int  GetOrderNb() const { return myOrderNb; }
   void SetOrderNb( int theNb ) { myOrderNb = theNb; }
index 7ceeb904fac40eabe1104e54b046fe5bbadb9a00..36808eed4afb03715767d29fe2b77b1c906f8ec1 100644 (file)
@@ -170,21 +170,21 @@ static TopoDS_Shape getShapeByID (const char* theID)
   return TopoDS_Shape();
 }
 
-static std::string getShapeNameByID (const char* theID)
-{
-  if ( theID && strlen( theID ) > 0 ) {
-    SMESH_Gen_i*     aSMESHGen = SMESH_Gen_i::GetSMESHGen();
-    SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy();
-    if ( !aStudy->_is_nil() ) {
-      SALOMEDS::SObject_wrap aSObj = aStudy->FindObjectID(theID);
-      if ( !aSObj->_is_nil() ) {
-        CORBA::String_var name = aSObj->GetName();
-        return name.in();
-      }
-    }
-  }
-  return "";
-}
+// static std::string getShapeNameByID (const char* theID)
+// {
+//   if ( theID && strlen( theID ) > 0 ) {
+//     SMESH_Gen_i*     aSMESHGen = SMESH_Gen_i::GetSMESHGen();
+//     SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy();
+//     if ( !aStudy->_is_nil() ) {
+//       SALOMEDS::SObject_wrap aSObj = aStudy->FindObjectID(theID);
+//       if ( !aSObj->_is_nil() ) {
+//         CORBA::String_var name = aSObj->GetName();
+//         return name.in();
+//       }
+//     }
+//   }
+//   return "";
+// }
 
 /*
                                 FUNCTORS
@@ -1830,9 +1830,9 @@ FunctorType EqualTo_i::GetFunctorType()
   Class       : LogicalNOT_i
   Description : Logical NOT predicate
 */
-LogicalNOT_i::LogicalNOT_i()
-: myPredicate( NULL ),
-  myLogicalNOTPtr( new Controls::LogicalNOT() )
+LogicalNOT_i::LogicalNOT_i():
+  myLogicalNOTPtr( new Controls::LogicalNOT() ),
+  myPredicate( NULL )
 {
   myFunctorPtr = myPredicatePtr = myLogicalNOTPtr;
 }
@@ -4068,7 +4068,7 @@ static const char** getFunctNames()
 #ifdef _DEBUG_
   // check if functName is complete, compilation failure means that enum FunctorType changed
   const int nbFunctors = sizeof(functName) / sizeof(const char*);
-  int _assert[( nbFunctors == SMESH::FT_Undefined + 1 ) ? 1 : -1 ];
+  int _assert[( nbFunctors == SMESH::FT_Undefined + 1 ) ? 1 : -1 ]; _assert[0]=1;
 #endif
 
   return functName;
index 04667edaa48fd33974ff512c62b43cff1b46f4ad..1f0517f3ab13a40b4db646a438489a74f8e3435f 100644 (file)
@@ -237,6 +237,19 @@ void SMESH_Hypothesis_i::setOldParameters (const char* theParameters)
   return myBaseImpl;
 }
 
+//================================================================================
+/*!
+ * \brief Return true if a hypothesis has parameters
+ */
+//================================================================================
+
+CORBA::Boolean SMESH_Hypothesis_i::HasParameters()
+{
+  std::ostringstream os;
+  myBaseImpl->SaveTo( os );
+  return ( !os.str().empty() );
+}
+
 //=============================================================================
 /*!
  *  SMESH_Hypothesis_i::SaveTo
index b589fd319b21da558dac86e587d3edbc25a35458..55c1e2779908af93fe5c241e4c3f5f1b85b94bfc 100644 (file)
@@ -59,31 +59,34 @@ public:
   virtual ~SMESH_Hypothesis_i();
 
   // Get type name of hypothesis
-  char* GetName();
+  virtual char* GetName();
 
   // Get plugin library name of hypothesis
-  char* GetLibName();
+  virtual char* GetLibName();
 
   // Set plugin library name of hypothesis
   void SetLibName( const char* theLibName );
 
   // Get unique id of hypothesis
-  CORBA::Long GetId();
-  
+  virtual CORBA::Long GetId();
+
+  // Return true if a hypothesis has parameters
+  virtual CORBA::Boolean HasParameters();
+
   // Set the variable parameter (a variable name or a parameter value); \a method is a name
   // of method setting this parameter.
   // This method must be called by the hypothesis creator just before calling hyp->method()
-  void SetVarParameter (const char* parameter, const char* method);
+  virtual void SetVarParameter (const char* parameter, const char* method);
 
   // Return the variable parameter used at Hypothesis Creation by the name of method
   // setting this parameter. The returned variable name is used at Hypothesis Edition.
-  char* GetVarParameter (const char* methodName);
+  virtual char* GetVarParameter (const char* methodName);
 
   // Store a hypothesis wrapping this not published one. This hyp, which has
   // no own parameters but is published, is used to store variables defining parameters
   // of this hypothesis. This method is to be called before setting parameters
   // of this hypothesis.
-  void SetHolderHypothesis(const SMESH::SMESH_Hypothesis_ptr hyp);
+  virtual void SetHolderHypothesis(const SMESH::SMESH_Hypothesis_ptr hyp);
 
   //Return true if hypothesis was published in study
   bool IsPublished();
index f078bdc10fe6c1f67188b8d756128b08b67beee6..b17fc6c4ac4775b4098b14a088a0f78e1451ab87 100644 (file)
@@ -132,7 +132,8 @@ static bool isNodeType (SMESH::array_of_ElementType_var theTypes)
   return theTypes->length() > 0 && theTypes[0] == SMESH::NODE;
 }
 
-static double getNumericalValue(SMESH::SMESH_IDSource_ptr theSource, SMESH::Controls::NumericalFunctorPtr theFunctor)
+static double getNumericalValue(SMESH::SMESH_IDSource_ptr            theSource,
+                                SMESH::Controls::NumericalFunctorPtr theFunctor)
 {
   double value = 0;
 
@@ -142,7 +143,7 @@ static double getNumericalValue(SMESH::SMESH_IDSource_ptr theSource, SMESH::Cont
       theFunctor->SetMesh( aMesh );
       
       SMESH::long_array_var anElementsId = theSource->GetIDs();
-      for (int i = 0; i < anElementsId->length(); i++) {
+      for ( CORBA::ULong i = 0; i < anElementsId->length(); i++) {
         value += theFunctor->GetValue( anElementsId[i] );
       }
     }
index f7fcbb49308fd8db9482530e24e9856eae853c7c..511433f6fb833a7f1932a44e61672652220b9104 100644 (file)
@@ -284,7 +284,7 @@ SMESH::point_array*
 
   list<const gp_XYZ *> xyzList;
   set<const SMDS_MeshFace*> fset;
-  for (int i = 0; i < theFacesIDs.length(); i++)
+  for ( CORBA::ULong i = 0; i < theFacesIDs.length(); i++)
   {
     CORBA::Long index = theFacesIDs[i];
     const SMDS_MeshElement * elem = aMesh->GetMeshDS()->FindElement(index);
@@ -345,7 +345,7 @@ SMESH::point_array*
 
   list<const gp_XYZ *> xyzList;
   set<const SMDS_MeshVolume*> vset;
-  for (int i = 0; i < theVolumesIDs.length(); i++)
+  for ( CORBA::ULong i = 0; i < theVolumesIDs.length(); i++)
   {
     CORBA::Long index = theVolumesIDs[i];
     const SMDS_MeshElement * elem = aMesh->GetMeshDS()->FindElement(index);
index 130330c1ca12d76a3a172b01ad19222489389003..21fe1513eef3b5612d5a5e9faadf626840060d57 100644 (file)
@@ -899,7 +899,7 @@ void SMESH_PreMeshInfo::readSubMeshes(DriverMED_R_SMESHDS_Mesh* reader) const
           HDFdataset* aDataset = new HDFdataset( (char*) aDSName.c_str(), aGroup );
           aDataset->OpenOnDisk();
           // read submesh IDs for all elements sorted by ID
-          int nbElems = aDataset->GetSize();
+          size_t nbElems = aDataset->GetSize();
           int* smIDs = new int [ nbElems ];
           aDataset->ReadFromDisk( smIDs );
           aDataset->CloseOnDisk();
@@ -921,7 +921,7 @@ void SMESH_PreMeshInfo::readSubMeshes(DriverMED_R_SMESHDS_Mesh* reader) const
           }
           // add elements to submeshes
           TIDSortedElemSet::iterator iE = elemSet.begin();
-          for ( int i = 0; i < nbElems; ++i, ++iE )
+          for ( size_t i = 0; i < nbElems; ++i, ++iE )
           {
             int smID = smIDs[ i ];
             if ( smID == 0 ) continue;
index 02c2664f0807b56dfc86344d499473ab5a34c96d..ee9117e2cae0528bd925a1dbe019ea5f7e8151b5 100644 (file)
@@ -95,7 +95,7 @@ typedef list<SMESHDS_SubMesh*> TListOfSubMeshes;
 bool getSubMeshes(::SMESH_subMesh*  theSubMesh,
                   TListOfSubMeshes& theSubMeshList)
 {
-  int size = theSubMeshList.size();
+  size_t size = theSubMeshList.size();
 
   SMESH_Mesh*      aMesh      = theSubMesh->GetFather();
   SMESHDS_Mesh*    aMeshDS    = aMesh->GetMeshDS();
index 8bf7d6ac219de45abb35397680fe917764e046b2..55e0d19ab892068571b2b03d540d079dd03b719a 100644 (file)
@@ -551,7 +551,7 @@ namespace
                                allEdges, theShortEdges[ nbBranchPoints > 0 ] ))
         return false;
 
-      for ( size_t iS = 0; iS < theShortEdges[ nbBranchPoints ].size(); ++iS )
+      for ( size_t iS = 0; iS < theShortEdges[ nbBranchPoints > 0 ].size(); ++iS )
         shortMap.Add( theShortEdges[ nbBranchPoints ][ iS ]);
 
       ++nbBranchPoints;
index 2db85387e81f2c543df68c69e51e1a8fefdc5dd0..580331db541a383bca7ac287cadb3867fd097bcc 100644 (file)
@@ -137,7 +137,7 @@ SMESH::double_array* StdMeshers_FixedPoints1D_i::GetPoints()
   SMESH::double_array_var anArray = new SMESH::double_array;
   std::vector<double> params = this->GetImpl()->GetPoints();
   anArray->length( params.size() );
-  for ( CORBA::Long i = 0; i < params.size(); i++)
+  for ( CORBA::ULong i = 0; i < params.size(); i++)
     anArray [ i ] = params [ i ];
 
   return anArray._retn();
@@ -158,7 +158,7 @@ SMESH::long_array* StdMeshers_FixedPoints1D_i::GetNbSegments()
   SMESH::long_array_var anArray = new SMESH::long_array;
   std::vector<int> nbsegs = this->GetImpl()->GetNbSegments();
   anArray->length( nbsegs.size() );
-  for ( CORBA::Long i = 0; i < nbsegs.size(); i++)
+  for ( CORBA::ULong i = 0; i < nbsegs.size(); i++)
     anArray [ i ] = nbsegs [ i ];
 
   return anArray._retn();
@@ -252,7 +252,7 @@ SMESH::long_array* StdMeshers_FixedPoints1D_i::GetReversedEdges()
   SMESH::long_array_var anArray = new SMESH::long_array;
   std::vector<int> ids = this->GetImpl()->GetReversedEdges();
   anArray->length( ids.size() );
-  for ( CORBA::Long i = 0; i < ids.size(); i++)
+  for ( CORBA::ULong i = 0; i < ids.size(); i++)
     anArray [ i ] = ids [ i ];
 
   return anArray._retn();
index 681092fc2fe46a8d300bbe37000bfad1858f48d0..9b6f41db1ce214ddab195e6f6572cdf43a50ad5c 100644 (file)
@@ -91,7 +91,7 @@ void StdMeshers_ImportSource1D_i::SetSourceEdges(const SMESH::ListOfGroups& grou
     std::vector<SMESH_Group*> smesh_groups;
     std::vector<string> entries;
     SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy();
-    for ( int i = 0; i < groups.length(); ++i )
+    for ( CORBA::ULong i = 0; i < groups.length(); ++i )
       if ( SMESH_GroupBase_i* gp_i = SMESH::DownCast<SMESH_GroupBase_i*>( groups[i] ))
       {
         if ( gp_i->GetType() != SMESH::EDGE )
@@ -109,7 +109,7 @@ void StdMeshers_ImportSource1D_i::SetSourceEdges(const SMESH::ListOfGroups& grou
 
     _groupEntries = new SMESH::string_array;
     _groupEntries->length( entries.size ());
-    for ( int i = 0; i < entries.size(); ++i )
+    for ( size_t i = 0; i < entries.size(); ++i )
       _groupEntries[i] = entries[i].c_str();
   }
   catch ( SALOME_Exception& S_ex )
@@ -173,7 +173,7 @@ char* StdMeshers_ImportSource1D_i::SaveTo()
   os << " " << _groupEntries->length();
 
   SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy();
-  for ( int i = 0; i < _groupEntries->length(); ++i )
+  for ( size_t i = 0; i < _groupEntries->length(); ++i )
   {
     // entry
     os << " " << _groupEntries[i];
@@ -208,7 +208,7 @@ void StdMeshers_ImportSource1D_i::LoadFrom( const char* theStream )
   _groupEntries = new SMESH::string_array;
   _groupEntries->length( nbGroups );
   std::string id, entry;
-  for ( int i = 0; i < _groupEntries->length(); ++i )
+  for ( size_t i = 0; i < _groupEntries->length(); ++i )
   {
     if ( is >> entry )
       _groupEntries[i] = entry.c_str();
index f8305e9c7b07a823227182c131c4a5dfa5754865..051ae469ce548e78c58267067c2ccca0e1953774 100644 (file)
@@ -90,7 +90,7 @@ void StdMeshers_ImportSource2D_i::SetSourceFaces(const SMESH::ListOfGroups& grou
     std::vector<SMESH_Group*> smesh_groups;
     std::vector<string> entries;
     SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy();
-    for ( int i = 0; i < groups.length(); ++i )
+    for ( CORBA::ULong i = 0; i < groups.length(); ++i )
       if ( SMESH_GroupBase_i* gp_i = SMESH::DownCast<SMESH_GroupBase_i*>( groups[i] ))
       {
         if ( gp_i->GetType() != SMESH::FACE )
@@ -109,7 +109,7 @@ void StdMeshers_ImportSource2D_i::SetSourceFaces(const SMESH::ListOfGroups& grou
 
     _groupEntries = new SMESH::string_array;
     _groupEntries->length( entries.size ());
-    for ( int i = 0; i < entries.size(); ++i )
+    for ( size_t i = 0; i < entries.size(); ++i )
       _groupEntries[i] = entries[i].c_str();
   }
   catch ( SALOME_Exception& S_ex )
@@ -173,7 +173,7 @@ char* StdMeshers_ImportSource2D_i::SaveTo()
   os << " " << _groupEntries->length();
 
   SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy();
-  for ( int i = 0; i < _groupEntries->length(); ++i )
+  for ( CORBA::ULong i = 0; i < _groupEntries->length(); ++i )
   {
     // entry
     os << " " << _groupEntries[i];
@@ -210,7 +210,7 @@ void StdMeshers_ImportSource2D_i::LoadFrom( const char* theStream )
   _groupEntries = new SMESH::string_array;
   _groupEntries->length( nbGroups );
   std::string id, entry;
-  for ( int i = 0; i < _groupEntries->length(); ++i )
+  for ( CORBA::ULong i = 0; i < _groupEntries->length(); ++i )
   {
     if ( is >> entry )
       _groupEntries[i] = entry.c_str();
index 59e6d77139d1e98ee0892e7fee2ca856c2015d31..da92224e8e506801532c24ad20c2a1d02c2c7039 100644 (file)
@@ -105,6 +105,16 @@ CORBA::Long StdMeshers_LengthFromEdges_i::GetMode()
   return this->GetImpl()->GetMode();
 }
 
+//================================================================================
+/*!
+ * \brief Return false as in SALOME the mode is not used
+ */
+//================================================================================
+
+CORBA::Boolean StdMeshers_LengthFromEdges_i::HasParameters()
+{
+  return false;
+}
 
 //=============================================================================
 /*!
index 06f98664fc9f712e5a5f263e7ca1e315762b1d40..6e121afc7f45e61a4598056ffe379252f8785630 100644 (file)
@@ -59,6 +59,9 @@ public:
   // Get mode
   CORBA::Long GetMode();
 
+  // Return false as in SALOME the mode is not used
+  CORBA::Boolean HasParameters();
+
   // Get implementation
   ::StdMeshers_LengthFromEdges* GetImpl();