From: prascle Date: Mon, 19 Apr 2004 06:41:59 +0000 (+0000) Subject: PR: bug 5719 correction X-Git-Tag: Ecole_Ete_a1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=29bba23d72cd1676839953a85cc46a3c6cd9ff0a;p=modules%2Fkernel.git PR: bug 5719 correction --- diff --git a/src/MEDWrapper/MED_Structures.cxx b/src/MEDWrapper/MED_Structures.cxx index 871f4718a..6b940e7c6 100644 --- a/src/MEDWrapper/MED_Structures.cxx +++ b/src/MEDWrapper/MED_Structures.cxx @@ -8,7 +8,7 @@ #include "MED_Structures.hxx" #include "MED_Utilities.hxx" - +#include 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); } } diff --git a/src/OBJECT/SALOME_Actor.cxx b/src/OBJECT/SALOME_Actor.cxx index 31f2c3026..cd0813f0e 100644 --- a/src/OBJECT/SALOME_Actor.cxx +++ b/src/OBJECT/SALOME_Actor.cxx @@ -47,6 +47,12 @@ 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(theMapper)) +#if defined __GNUC_2__ + aMapper->SetInput(myPassFilter[anId]->GetOutput()); +#else aMapper->SetInput(myPassFilter.at(anId)->GetOutput()); +#endif else if(vtkPolyDataMapper* aMapper = dynamic_cast(theMapper)) +#if defined __GNUC_2__ + aMapper->SetInput(myPassFilter[anId]->GetPolyDataOutput()); +#else aMapper->SetInput(myPassFilter.at(anId)->GetPolyDataOutput()); +#endif } vtkLODActor::SetMapper(theMapper); } diff --git a/src/VTKFilter/SALOME_ExtractUnstructuredGrid.cxx b/src/VTKFilter/SALOME_ExtractUnstructuredGrid.cxx index e484dee65..dd9b1b9cd 100644 --- a/src/VTKFilter/SALOME_ExtractUnstructuredGrid.cxx +++ b/src/VTKFilter/SALOME_ExtractUnstructuredGrid.cxx @@ -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{ diff --git a/src/VTKFilter/SALOME_GeometryFilter.cxx b/src/VTKFilter/SALOME_GeometryFilter.cxx index 432b34a54..c61818750 100644 --- a/src/VTKFilter/SALOME_GeometryFilter.cxx +++ b/src/VTKFilter/SALOME_GeometryFilter.cxx @@ -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 }