]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
PR: bug 5719 correction
authorprascle <prascle>
Mon, 19 Apr 2004 06:41:59 +0000 (06:41 +0000)
committerprascle <prascle>
Mon, 19 Apr 2004 06:41:59 +0000 (06:41 +0000)
src/MEDWrapper/MED_Structures.cxx
src/OBJECT/SALOME_Actor.cxx
src/VTKFilter/SALOME_ExtractUnstructuredGrid.cxx
src/VTKFilter/SALOME_GeometryFilter.cxx

index 871f4718ad5f30d710afc7814f7fc1d1c66549ca..6b940e7c620c863b5d6e6816bb7a73547cb41574 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "MED_Structures.hxx"
 #include "MED_Utilities.hxx"
-
+#include <string>
 using namespace std;
 using namespace MED;
 
@@ -18,6 +18,11 @@ static int MYDEBUG = 1;
 static int MYDEBUG = 0;
 #endif
 
+#if defined __GNUC__
+  #if __GNUC__ == 2
+    #define __GNUC_2__
+  #endif
+#endif
 
 //---------------------------------------------------------------
 string MED::GetString(med_int theId, med_int theStep,
@@ -226,12 +231,21 @@ TNodeInfo::TNodeInfo(const PMeshInfo& theMeshInfo,
     EXCEPTION(runtime_error,"myCoord.size() != myNbElem*theMeshInfo->myDim");
 
   for(med_int anId = 0; anId < theMeshInfo->myDim; anId++){
+#if defined __GNUC_2__
+    const string& aVal = theCoordNames[anId];
+#else
     const string& aVal = theCoordNames.at(anId);
+#endif
     SetCoordName(anId,aVal);
   }
 
   for(med_int anId = 0; anId < theMeshInfo->myDim; anId++){
+#if defined __GNUC_2__
+    const string& aVal = theCoordUnits[anId];
+#else
     const string& aVal = theCoordUnits.at(anId);
+#endif
     SetCoordUnit(anId,aVal);
   }
 }
index 31f2c302663b175cb850d5b46a9c7ba5392b08fe..cd0813f0e867f855cd19c61335e4fa964ba718df 100644 (file)
 
 using namespace std;
 
+#if defined __GNUC__
+  #if __GNUC__ == 2
+    #define __GNUC_2__
+  #endif
+#endif
+
 int SALOME_POINT_SIZE = 3;
 
 
@@ -108,29 +114,64 @@ void SALOME_Actor::SetTransform(SALOME_Transform* theTransform){
 void SALOME_Actor::SetMapper(vtkMapper* theMapper){
   if(theMapper){
     int anId = 0;
+#if defined __GNUC_2__
+    myPassFilter[anId]->SetInput(theMapper->GetInput());
+#else
     myPassFilter.at(anId)->SetInput(theMapper->GetInput());
+#endif
     myGeomFilter->SetStoreMapping(myStoreMapping);
+#if defined __GNUC_2__
+    myGeomFilter->SetInput(myPassFilter[anId]->GetOutput());
+#else
     myGeomFilter->SetInput(myPassFilter.at(anId)->GetOutput());
+#endif
 
     anId++;
+
+#if defined __GNUC_2__
+    myPassFilter[anId]->SetInput(myGeomFilter->GetOutput());
+    myPassFilter[anId+1]->SetInput(myPassFilter[anId]->GetOutput());
+#else
     myPassFilter.at(anId)->SetInput(myGeomFilter->GetOutput());
     myPassFilter.at(anId+1)->SetInput(myPassFilter.at(anId)->GetOutput());
+#endif
 
     anId++;
+#if defined __GNUC_2__
+    myPassFilter[anId+1]->SetInput(myPassFilter[anId]->GetOutput());
+#else
     myPassFilter.at(anId+1)->SetInput(myPassFilter.at(anId)->GetOutput());
+#endif
 
     anId++;
+#if defined __GNUC_2__
+    myTransformFilter->SetInput(myPassFilter[anId]->GetPolyDataOutput());
+#else
     myTransformFilter->SetInput(myPassFilter.at(anId)->GetPolyDataOutput());
+#endif
 
     anId++;
+#if defined __GNUC_2__
+    myPassFilter[anId]->SetInput(myTransformFilter->GetOutput());
+    myPassFilter[anId+1]->SetInput(myPassFilter[anId]->GetOutput());
+#else
     myPassFilter.at(anId)->SetInput(myTransformFilter->GetOutput());
     myPassFilter.at(anId+1)->SetInput(myPassFilter.at(anId)->GetOutput());
+#endif
 
     anId++;
     if(vtkDataSetMapper* aMapper = dynamic_cast<vtkDataSetMapper*>(theMapper))
+#if defined __GNUC_2__
+      aMapper->SetInput(myPassFilter[anId]->GetOutput());
+#else
       aMapper->SetInput(myPassFilter.at(anId)->GetOutput());
+#endif
     else if(vtkPolyDataMapper* aMapper = dynamic_cast<vtkPolyDataMapper*>(theMapper))
+#if defined __GNUC_2__
+      aMapper->SetInput(myPassFilter[anId]->GetPolyDataOutput());
+#else
       aMapper->SetInput(myPassFilter.at(anId)->GetPolyDataOutput());
+#endif
   }
   vtkLODActor::SetMapper(theMapper);
 }
index e484dee650aaba10ec3b442871493640d8f80f06..dd9b1b9cd16a0f327103d384f7918b6637e85d74 100644 (file)
@@ -44,6 +44,12 @@ static int MYDEBUG = 1;
 static int MYDEBUG = 0;
 #endif
 
+#if defined __GNUC__
+  #if __GNUC__ == 2
+    #define __GNUC_2__
+  #endif
+#endif
+
 vtkStandardNewMacro(SALOME_ExtractUnstructuredGrid);
 
 
@@ -77,7 +83,11 @@ void SALOME_ExtractUnstructuredGrid::SetStoreMapping(int theStoreMapping){
 vtkIdType SALOME_ExtractUnstructuredGrid::GetOutId(int theOutId) const{
   if(myCellIds.empty() && myCellTypes.empty()) return theOutId;
   if(myOut2InId.empty() || theOutId > myOut2InId.size()) return -1;
+#if defined __GNUC_2__
+  return myOut2InId[theOutId];
+#else
   return myOut2InId.at(theOutId);
+#endif
 }
 
 vtkIdType SALOME_ExtractUnstructuredGrid::GetInId(int theInId) const{
index 432b34a5498747a2d61aee4caf59ecba0e4be759..c618187501faee8e2cd101994f985474143b23d2 100644 (file)
@@ -52,6 +52,12 @@ static int MYDEBUG = 0;
 static int MYDEBUGWITHFILES = 0;
 #endif
 
+#if defined __GNUC__
+  #if __GNUC__ == 2
+    #define __GNUC_2__
+  #endif
+#endif
+
 vtkCxxRevisionMacro(SALOME_GeometryFilter, "$Revision$");
 vtkStandardNewMacro(SALOME_GeometryFilter);
 
@@ -92,14 +98,22 @@ void SALOME_GeometryFilter::SetStoreMapping(int theStoreMapping){
 
 vtkIdType SALOME_GeometryFilter::GetObjId(int theVtkID){
   if(myVTK2ObjIds.empty() || theVtkID > myVTK2ObjIds.size()) return -1;
+#if defined __GNUC_2__
+  return myVTK2ObjIds[theVtkID];
+#else
   return myVTK2ObjIds.at(theVtkID);
+#endif
 }
 
 
 SALOME_GeometryFilter::TVectorId SALOME_GeometryFilter::GetVtkId(int theObjID){
   TVectorId aVect;
   if(myObj2VTKIds.empty() || theObjID > myObj2VTKIds.size()) return aVect;
+#if defined __GNUC_2__
+  return myObj2VTKIds[theObjID];
+#else
   return myObj2VTKIds.at(theObjID);
+#endif
 }