From d6bfd123a2177c0ee1207303bdbf7e4404797e8a Mon Sep 17 00:00:00 2001 From: ana Date: Thu, 15 Apr 2010 07:22:24 +0000 Subject: [PATCH] Use the prefix std:: instead of the directive using namespace std; --- src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx | 20 ++++++++++---------- src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx | 2 +- src/GEOMToolsGUI/GEOMToolsGUI.cxx | 4 ++-- src/GEOM_I/GEOM_DumpPython.cc | 2 +- src/GEOM_I/GEOM_Gen_i.cc | 4 ++-- src/GEOM_I/GEOM_IBlocksOperations_i.cc | 10 +++++----- src/GEOM_I/GEOM_ICurvesOperations_i.cc | 10 +++++----- src/GEOM_I/GEOM_IHealingOperations_i.cc | 8 ++++---- src/GEOM_I/GEOM_ILocalOperations_i.cc | 20 ++++++++++---------- src/GEOM_I/GEOM_IShapesOperations_i.cc | 12 ++++++------ src/GEOM_I/GEOM_Object_i.cc | 2 +- src/GEOM_I_Superv/GEOM_Superv_i.cc | 2 +- 12 files changed, 48 insertions(+), 48 deletions(-) diff --git a/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx b/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx index 364c16c23..64d9c8374 100644 --- a/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx @@ -80,7 +80,7 @@ GEOMImpl_ICurvesOperations::~GEOMImpl_ICurvesOperations() * MakePolyline */ //============================================================================= -Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline (list thePoints) +Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline (std::list thePoints) { SetErrorCode(KO); @@ -101,7 +101,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline (list::iterator it = thePoints.begin(); + std::list::iterator it = thePoints.begin(); for (; it != thePoints.end(); it++, ind++) { Handle(GEOM_Function) aRefPnt = (*it)->GetLastFunction(); if (aRefPnt.IsNull()) { @@ -597,7 +597,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArcOfEllipse (Handle(GEOM_Ob */ //============================================================================= Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineBezier - (list thePoints) + (std::list thePoints) { SetErrorCode(KO); @@ -618,7 +618,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineBezier aCI.SetLength(aLen); int ind = 1; - list::iterator it = thePoints.begin(); + std::list::iterator it = thePoints.begin(); for (; it != thePoints.end(); it++, ind++) { Handle(GEOM_Function) aRefPnt = (*it)->GetLastFunction(); @@ -664,7 +664,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineBezier */ //============================================================================= Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolation - (list thePoints, + (std::list thePoints, bool theIsClosed) { SetErrorCode(KO); @@ -686,7 +686,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolation aCI.SetLength(aLen); int ind = 1; - list::iterator it = thePoints.begin(); + std::list::iterator it = thePoints.begin(); for (; it != thePoints.end(); it++, ind++) { Handle(GEOM_Function) aRefPnt = (*it)->GetLastFunction(); @@ -734,7 +734,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolation */ //============================================================================= Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcher (const char* theCommand, - list theWorkingPlane) + std::list theWorkingPlane) { SetErrorCode(KO); @@ -757,7 +757,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcher (const char* theCom aCI.SetCommand(aCommand); int ind = 1; - list::iterator it = theWorkingPlane.begin(); + std::list::iterator it = theWorkingPlane.begin(); for (; it != theWorkingPlane.end(); it++, ind++) aCI.SetWorkingPlane(ind, *it); @@ -797,7 +797,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcher (const char* theCom * Make3DSketcher */ //============================================================================= -Handle(GEOM_Object) GEOMImpl_ICurvesOperations::Make3DSketcher (list theCoordinates) +Handle(GEOM_Object) GEOMImpl_ICurvesOperations::Make3DSketcher (std::list theCoordinates) { SetErrorCode(KO); @@ -815,7 +815,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::Make3DSketcher (list the GEOMImpl_I3DSketcher aCI (aFunction); int nbOfCoords = 0; - list::iterator it = theCoordinates.begin(); + std::list::iterator it = theCoordinates.begin(); for (; it != theCoordinates.end(); it++) nbOfCoords++; diff --git a/src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx b/src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx index e8cce2690..9893156cf 100644 --- a/src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx @@ -37,7 +37,7 @@ class GEOMImpl_ICurvesOperations : public GEOM_IOperations { Standard_EXPORT GEOMImpl_ICurvesOperations(GEOM_Engine* theEngine, int theDocID); Standard_EXPORT ~GEOMImpl_ICurvesOperations(); - Standard_EXPORT Handle(GEOM_Object) MakePolyline (list thePoints); + Standard_EXPORT Handle(GEOM_Object) MakePolyline (std::list thePoints); Standard_EXPORT Handle(GEOM_Object) MakeCircleThreePnt (Handle(GEOM_Object) thePnt1, Handle(GEOM_Object) thePnt2, diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index d1556a330..6312ee0cd 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -199,7 +199,7 @@ static bool inUse( _PTR(Study) study, const QString& component, const QMap gobjects; QMap::ConstIterator oit; - list<_PTR(SObject)> aSelectedSO; + std::list<_PTR(SObject)> aSelectedSO; for ( oit = objects.begin(); oit != objects.end(); ++oit ) { _PTR(SObject) so = study->FindObjectID( oit.key().toLatin1().data() ); if ( !so ) @@ -213,7 +213,7 @@ static bool inUse( _PTR(Study) study, const QString& component, const QMap::iterator itSO = aSelectedSO.begin(); + std::list< _PTR(SObject) >::iterator itSO = aSelectedSO.begin(); for ( ; itSO != aSelectedSO.end(); ++itSO ) { std::vector<_PTR(SObject)> aReferences = study->FindDependances( *itSO ); int aRefLength = aReferences.size(); diff --git a/src/GEOM_I/GEOM_DumpPython.cc b/src/GEOM_I/GEOM_DumpPython.cc index cd13b8678..d45e311af 100644 --- a/src/GEOM_I/GEOM_DumpPython.cc +++ b/src/GEOM_I/GEOM_DumpPython.cc @@ -85,7 +85,7 @@ Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy, } aStates->AddState(aState); } - aVariableMap.insert(pair(TCollection_AsciiString(anEntry),aStates)); + aVariableMap.insert(std::pair(TCollection_AsciiString(anEntry),aStates)); } } } diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index cafe21c6e..6a48ac969 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -678,7 +678,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream, // Retrieve a TopoDS_Shape from byte stream TopoDS_Shape aTopology; - istrstream aStreamedBrep((char*) &theStream[0], theStream.length()); + std::istrstream aStreamedBrep((char*) &theStream[0], theStream.length()); BRep_Builder aBuilder; try { BRepTools::Read(aTopology, aStreamedBrep, aBuilder); @@ -1067,7 +1067,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(SALOMEDS::Study_ptr theStudy, } } // process arguments } - set anObjEntryMap; + std::set anObjEntryMap; GEOM::ListOfGO_var aResParts = new GEOM::ListOfGO; int nbRes = 0; int nb = aParts->length(); diff --git a/src/GEOM_I/GEOM_IBlocksOperations_i.cc b/src/GEOM_I/GEOM_IBlocksOperations_i.cc index 08c2c2cdd..1b08b0ef4 100644 --- a/src/GEOM_I/GEOM_IBlocksOperations_i.cc +++ b/src/GEOM_I/GEOM_IBlocksOperations_i.cc @@ -566,7 +566,7 @@ CORBA::Boolean GEOM_IBlocksOperations_i::CheckCompoundOfBlocks if (aCompound.IsNull()) return isComp; //Check - list errList; + std::list errList; isComp = GetOperations()->CheckCompoundOfBlocks(aCompound, errList); if (!GetOperations()->IsDone()) return isComp; @@ -577,7 +577,7 @@ CORBA::Boolean GEOM_IBlocksOperations_i::CheckCompoundOfBlocks anErrArray->length(nbErr); // fill the local CORBA array with values from lists - list::iterator errIt = errList.begin(); + std::list::iterator errIt = errList.begin(); int i = 0; for (; errIt != errList.end(); i++, errIt++) { GEOM::GEOM_IBlocksOperations::BCError_var anError = @@ -605,11 +605,11 @@ CORBA::Boolean GEOM_IBlocksOperations_i::CheckCompoundOfBlocks break; } - list sshList = errStruct.incriminated; + std::list sshList = errStruct.incriminated; GEOM::ListOfLong_var anIncrims = new GEOM::ListOfLong(); anIncrims->length(sshList.size()); - list::iterator sshIt = sshList.begin(); + std::list::iterator sshIt = sshList.begin(); int jj = 0; for (; sshIt != sshList.end(); jj++, sshIt++) { anIncrims[jj] = *sshIt; @@ -640,7 +640,7 @@ char* GEOM_IBlocksOperations_i::PrintBCErrors if (aCompound.IsNull()) return NULL; // Convert the errors sequence - list anErrors; + std::list anErrors; int nbErr = theErrors.length(); int ie = 0; for (; ie < nbErr; ie++) { diff --git a/src/GEOM_I/GEOM_ICurvesOperations_i.cc b/src/GEOM_I/GEOM_ICurvesOperations_i.cc index daf9be27b..ac40dab20 100644 --- a/src/GEOM_I/GEOM_ICurvesOperations_i.cc +++ b/src/GEOM_I/GEOM_ICurvesOperations_i.cc @@ -343,7 +343,7 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakePolyline //Get the reference point int ind = 0; int aLen = thePoints.length(); - list aPoints; + std::list aPoints; for (; ind < aLen; ind++) { Handle(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]); if (aPnt.IsNull()) return aGEOMObject._retn(); @@ -375,7 +375,7 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSplineBezier //Get the reference point int ind = 0; int aLen = thePoints.length(); - list aPoints; + std::list aPoints; for (; ind < aLen; ind++) { Handle(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]); if (aPnt.IsNull()) return aGEOMObject._retn(); @@ -408,7 +408,7 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSplineInterpolation //Get the reference point int ind = 0; int aLen = thePoints.length(); - list aPoints; + std::list aPoints; for (; ind < aLen; ind++) { Handle(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]); if (aPnt.IsNull()) return aGEOMObject._retn(); @@ -437,7 +437,7 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSketcher int ind = 0; int aLen = theWorkingPlane.length(); - list aWorkingPlane; + std::list aWorkingPlane; for (; ind < aLen; ind++) aWorkingPlane.push_back(theWorkingPlane[ind]); @@ -463,7 +463,7 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::Make3DSketcher int ind = 0; int aLen = theCoordinates.length(); - list aCoords; + std::list aCoords; for (; ind < aLen; ind++) aCoords.push_back(theCoordinates[ind]); diff --git a/src/GEOM_I/GEOM_IHealingOperations_i.cc b/src/GEOM_I/GEOM_IHealingOperations_i.cc index 36f3587c5..4e36cf8aa 100644 --- a/src/GEOM_I/GEOM_IHealingOperations_i.cc +++ b/src/GEOM_I/GEOM_IHealingOperations_i.cc @@ -145,7 +145,7 @@ void GEOM_IHealingOperations_i::GetShapeProcessParameters(GEOM::string_array_out GEOM::string_array_var aValArray = new GEOM::string_array(); // retrieve the values as stl-lists - list operationsList, paramsList, valuesList; + std::list operationsList, paramsList, valuesList; GetOperations()->GetShapeProcessParameters( operationsList, paramsList, valuesList ); const int opSize = operationsList.size(), parSize = paramsList.size(), @@ -158,7 +158,7 @@ void GEOM_IHealingOperations_i::GetShapeProcessParameters(GEOM::string_array_out aValArray->length(valSize); // fill the local CORBA arrays with values from lists - list::iterator opIt, parIt, valIt; + std::list::iterator opIt, parIt, valIt; int i = 0; for ( opIt = operationsList.begin(); opIt != operationsList.end(); i++,++opIt ) anOpArray[i] = CORBA::string_dup( (*opIt).c_str() ); @@ -189,7 +189,7 @@ void GEOM_IHealingOperations_i::GetOperatorParameters (const char* theOperator, GEOM::string_array_var aValArray = new GEOM::string_array(); // retrieve the values as stl-lists - list paramsList, valuesList; + std::list paramsList, valuesList; if ( GetOperations()->GetOperatorParameters( theOperator, paramsList, valuesList ) ) { const int parSize = paramsList.size(), valSize = valuesList.size(); @@ -198,7 +198,7 @@ void GEOM_IHealingOperations_i::GetOperatorParameters (const char* theOperator, aValArray->length(valSize); // fill the local CORBA arrays with values from lists - list::iterator parIt, valIt; + std::list::iterator parIt, valIt; int i; for ( i = 0, parIt = paramsList.begin(), valIt = valuesList.begin(); parIt != paramsList.end(); i++, ++parIt,++valIt ) { diff --git a/src/GEOM_I/GEOM_ILocalOperations_i.cc b/src/GEOM_I/GEOM_ILocalOperations_i.cc index fe1091f5b..acfa45af0 100644 --- a/src/GEOM_I/GEOM_ILocalOperations_i.cc +++ b/src/GEOM_I/GEOM_ILocalOperations_i.cc @@ -95,7 +95,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletEdges //Get the reference edges int ind = 0; int aLen = theEdges.length(); - list anEdges; + std::list anEdges; for (; ind < aLen; ind++) { anEdges.push_back(theEdges[ind]); } @@ -127,7 +127,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletEdgesR1R2 //Get the reference edges int ind = 0; int aLen = theEdges.length(); - list anEdges; + std::list anEdges; for (; ind < aLen; ind++) { anEdges.push_back(theEdges[ind]); } @@ -159,7 +159,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletFaces //Get the reference faces int ind = 0; int aLen = theFaces.length(); - list aFaces; + std::list aFaces; for (; ind < aLen; ind++) { aFaces.push_back(theFaces[ind]); } @@ -191,7 +191,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletFacesR1R2 //Get the reference faces int ind = 0; int aLen = theFaces.length(); - list aFaces; + std::list aFaces; for (; ind < aLen; ind++) { aFaces.push_back(theFaces[ind]); } @@ -223,7 +223,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFillet2D //Get the reference vertex int ind = 0; int aLen = theVertexes.length(); - list aVertexes; + std::list aVertexes; for (; ind < aLen; ind++) { aVertexes.push_back(theVertexes[ind]); } @@ -255,7 +255,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFillet1D //Get the reference vertex int ind = 0; int aLen = theVertexes.length(); - list aVertexes; + std::list aVertexes; for (; ind < aLen; ind++) { aVertexes.push_back(theVertexes[ind]); } @@ -360,7 +360,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferFaces //Get the reference faces int ind = 0; int aLen = theFaces.length(); - list aFaces; + std::list aFaces; for (; ind < aLen; ind++) { aFaces.push_back(theFaces[ind]); } @@ -392,7 +392,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferFacesAD //Get the reference faces int ind = 0; int aLen = theFaces.length(); - list aFaces; + std::list aFaces; for (; ind < aLen; ind++) { aFaces.push_back(theFaces[ind]); } @@ -425,7 +425,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferEdges //Get the reference edges int ind = 0; int aLen = theEdges.length(); - list aEdges; + std::list aEdges; for (; ind < aLen; ind++) { aEdges.push_back(theEdges[ind]); } @@ -458,7 +458,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferEdgesAD //Get the reference edges int ind = 0; int aLen = theEdges.length(); - list aEdges; + std::list aEdges; for (; ind < aLen; ind++) { aEdges.push_back(theEdges[ind]); } diff --git a/src/GEOM_I/GEOM_IShapesOperations_i.cc b/src/GEOM_I/GEOM_IShapesOperations_i.cc index 3681742ca..7a0fff924 100644 --- a/src/GEOM_I/GEOM_IShapesOperations_i.cc +++ b/src/GEOM_I/GEOM_IShapesOperations_i.cc @@ -100,7 +100,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeWire GetOperations()->SetNotDone(); int ind, aLen; - list aShapes; + std::list aShapes; //Get the shapes aLen = theEdgesAndWires.length(); @@ -160,7 +160,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeFaceWires GetOperations()->SetNotDone(); int ind, aLen; - list aShapes; + std::list aShapes; //Get the shapes aLen = theWires.length(); @@ -193,7 +193,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeShell GetOperations()->SetNotDone(); int ind, aLen; - list aShapes; + std::list aShapes; //Get the shapes aLen = theFacesAndShells.length(); @@ -251,7 +251,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeSolidShells GetOperations()->SetNotDone(); int ind, aLen; - list aShapes; + std::list aShapes; //Get the shapes aLen = theShells.length(); @@ -284,7 +284,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeCompound GetOperations()->SetNotDone(); int ind, aLen; - list aShapes; + std::list aShapes; //Get the shapes aLen = theShapes.length(); @@ -390,7 +390,7 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueFacesByList if (aShape.IsNull()) return aGEOMObject._retn(); int ind, aLen; - list aFaces; + std::list aFaces; //Get the shapes aLen = theFaces.length(); for (ind = 0; ind < aLen; ind++) { diff --git a/src/GEOM_I/GEOM_Object_i.cc b/src/GEOM_I/GEOM_Object_i.cc index f164b4ef4..ab0559045 100644 --- a/src/GEOM_I/GEOM_Object_i.cc +++ b/src/GEOM_I/GEOM_Object_i.cc @@ -342,7 +342,7 @@ SALOMEDS::TMPFile* GEOM_Object_i::GetShapeStream() if(aShape.IsNull()) return NULL; - ostrstream streamShape; + std::ostrstream streamShape; //Write TopoDS_Shape in ASCII format to the stream BRepTools::Write(aShape, streamShape); //Returns the number of bytes that have been stored in the stream's buffer. diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc index f79629ce3..9c0e56b52 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.cc +++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc @@ -133,7 +133,7 @@ void GEOM_Superv_i::SetStudyID( CORBA::Long theId ) if ( isNewStudy(myLastStudyID,myStudyID) ) { if (CORBA::is_nil(myGeomEngine)) setGeomEngine(); - string anEngine = _orb->object_to_string( myGeomEngine ); + std::string anEngine = _orb->object_to_string( myGeomEngine ); CORBA::Object_var anObj = name_service->Resolve("/myStudyManager"); if ( !CORBA::is_nil(anObj) ) { -- 2.39.2