From: ana Date: Wed, 14 Apr 2010 11:20:29 +0000 (+0000) Subject: Use the prefix std:: instead of the directive using namespace std; X-Git-Tag: V5_1_4a1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a45dff2ade8bd2ba6c7324515fb3474427d2c18d;p=modules%2Fgeom.git Use the prefix std:: instead of the directive using namespace std; --- diff --git a/src/GEOM/GEOM_Engine.cxx b/src/GEOM/GEOM_Engine.cxx index 55c452288..7804705ff 100644 --- a/src/GEOM/GEOM_Engine.cxx +++ b/src/GEOM/GEOM_Engine.cxx @@ -83,7 +83,6 @@ static int MYDEBUG = 0; static GEOM_Engine* TheEngine = NULL; -using namespace std; static TCollection_AsciiString BuildIDFromObject(Handle(GEOM_Object)& theObject) { diff --git a/src/GEOMGUI/GEOM_Displayer.cxx b/src/GEOMGUI/GEOM_Displayer.cxx index c809f1917..cd4059b84 100644 --- a/src/GEOMGUI/GEOM_Displayer.cxx +++ b/src/GEOMGUI/GEOM_Displayer.cxx @@ -91,7 +91,6 @@ #include #include -using namespace std; //================================================================ // Function : getActiveStudy @@ -190,7 +189,7 @@ SUIT_SelectionFilter* GEOM_Displayer::getComplexFilter( const QList* aSubSh // Function : getEntry // Purpose : //================================================================ -static string getEntry( GEOM::GEOM_Object_ptr object ) +static std::string getEntry( GEOM::GEOM_Object_ptr object ) { SUIT_Session* session = SUIT_Session::session(); SalomeApp_Application* app = dynamic_cast( session->activeApplication() ); @@ -200,7 +199,7 @@ static string getEntry( GEOM::GEOM_Object_ptr object ) if ( strcmp(IOR.in(), "") != 0 ) { SalomeApp_Study* study = ( SalomeApp_Study* )app->activeStudy(); - _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( string(IOR) ) ); + _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( std::string(IOR) ) ); if ( SO ) return SO->GetID(); } @@ -212,7 +211,7 @@ static string getEntry( GEOM::GEOM_Object_ptr object ) // Function : getName // Purpose : //================================================================ -static string getName( GEOM::GEOM_Object_ptr object ) +static std::string getName( GEOM::GEOM_Object_ptr object ) { SUIT_Session* session = SUIT_Session::session(); SalomeApp_Application* app = dynamic_cast( session->activeApplication() ); @@ -222,7 +221,7 @@ static string getName( GEOM::GEOM_Object_ptr object ) if ( strcmp(IOR.in(), "") != 0 ) { SalomeApp_Study* study = ( SalomeApp_Study* )app->activeStudy(); - _PTR(SObject) aSObj ( study->studyDS()->FindObjectIOR( string(IOR) ) ); + _PTR(SObject) aSObj ( study->studyDS()->FindObjectIOR( std::string(IOR) ) ); _PTR(GenericAttribute) anAttr; @@ -327,7 +326,7 @@ void GEOM_Displayer::Display( GEOM::GEOM_Object_ptr theObj, const bool updateVie if ( theObj->_is_nil() ) return; - string entry = getEntry( theObj ); + std::string entry = getEntry( theObj ); if ( entry != "" ) { Display(new SALOME_InteractiveObject(entry.c_str(), "GEOM", getName(theObj).c_str()), updateViewer); @@ -371,7 +370,7 @@ void GEOM_Displayer::Erase( GEOM::GEOM_Object_ptr theObj, const bool forced, const bool updateViewer ) { - string entry = getEntry( theObj ); + std::string entry = getEntry( theObj ); if ( entry != "" ) { Erase(new SALOME_InteractiveObject(entry.c_str(), "GEOM", getName(theObj).c_str()), @@ -699,7 +698,7 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs ) if ( strcmp(IOR.in(), "") != 0 ) { _PTR(Study) aStudy = study->studyDS(); - _PTR(SObject) aMainSObject( aStudy->FindObjectIOR( string(IOR) ) ); + _PTR(SObject) aMainSObject( aStudy->FindObjectIOR( std::string(IOR) ) ); _PTR(ChildIterator) it( aStudy->NewChildIterator( aMainSObject ) ); for( ; it->More(); it->Next() ) { @@ -1426,12 +1425,12 @@ SALOMEDS::Color GEOM_Displayer::getUniqueColor( const QList& th if( aTolerance < 1 ) break; } - //cout << "Iteration N" << anIterations << " (tolerance=" << aTolerance << ")"<< endl; + //std::cout << "Iteration N" << anIterations << " (tolerance=" << aTolerance << ")"<< std::endl; aHue = (int)( 360.0 * rand() / RAND_MAX ); - //cout << "Hue = " << aHue << endl; + //std::cout << "Hue = " << aHue << std::endl; - //cout << "Auto colors : "; + //std::cout << "Auto colors : "; bool ok = true; QList::const_iterator it = theReservedColors.constBegin(); QList::const_iterator itEnd = theReservedColors.constEnd(); @@ -1442,21 +1441,21 @@ SALOMEDS::Color GEOM_Displayer::getUniqueColor( const QList& th int h, s, v; aQColor.getHsv( &h, &s, &v ); - //cout << h << " "; + //std::cout << h << " "; if( abs( h - aHue ) < aTolerance ) { ok = false; - //cout << "break (diff = " << abs( h - aHue ) << ")"; + //std::cout << "break (diff = " << abs( h - aHue ) << ")"; break; } } - //cout << endl; + //std::cout << std::endl; if( ok ) break; } - //cout << "Hue of the returned color = " << aHue << endl; + //std::cout << "Hue of the returned color = " << aHue << std::endl; QColor aColor; aColor.setHsv( aHue, 255, 255 ); diff --git a/src/GEOMGUI/GeometryGUI_Swig.cxx b/src/GEOMGUI/GeometryGUI_Swig.cxx index 473955738..813454603 100644 --- a/src/GEOMGUI/GeometryGUI_Swig.cxx +++ b/src/GEOMGUI/GeometryGUI_Swig.cxx @@ -68,9 +68,6 @@ #include -using namespace std; - - static GEOM_Client ShapeReader; inline OCCViewer_Viewer* GetOCCViewer(SUIT_Application* theApp){ @@ -135,7 +132,7 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry, bool isUpdated) if (CORBA::is_nil(Geom)) return; - string aFatherIOR; + std::string aFatherIOR; _PTR(SComponent) father = aStudy->FindComponent("GEOM"); if (!father) return; @@ -154,14 +151,14 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry, bool isUpdated) if (!obj->FindAttribute(anAttr, "AttributeIOR")) return; _PTR(AttributeIOR) anIOR(anAttr); - string anIORValue = anIOR->Value(); + std::string anIORValue = anIOR->Value(); GEOM::GEOM_Object_var aShape = Geom->GetIORFromString(anIORValue.c_str()); TopoDS_Shape Shape = ShapeReader.GetShape(Geom,aShape); if (!Shape.IsNull()) { if (obj->FindAttribute(anAttr, "AttributeName")) { _PTR(AttributeName) aName (anAttr); - string aNameValue = aName->Value(); + std::string aNameValue = aName->Value(); // open transaction /*SUIT_Operation* op = new SalomeApp_ImportOperation (app); op->start(); diff --git a/src/GEOMImpl/GEOMImpl_ArchimedeDriver.cxx b/src/GEOMImpl/GEOMImpl_ArchimedeDriver.cxx index 1c91fb7d4..267435ecb 100644 --- a/src/GEOMImpl/GEOMImpl_ArchimedeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ArchimedeDriver.cxx @@ -41,7 +41,6 @@ #include -using namespace std; //======================================================================= //function : GetID diff --git a/src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx b/src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx index 6bf6fa5cc..e8cce2690 100644 --- a/src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx @@ -19,7 +19,6 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; #ifndef _GEOMImpl_ICurvesOperations_HXX_ #define _GEOMImpl_ICurvesOperations_HXX_ @@ -67,13 +66,13 @@ class GEOMImpl_ICurvesOperations : public GEOM_IOperations { Handle(GEOM_Object) thePnt2, Handle(GEOM_Object) thePnt3); - Standard_EXPORT Handle(GEOM_Object) MakeSplineBezier (list thePoints); - Standard_EXPORT Handle(GEOM_Object) MakeSplineInterpolation (list thePoints, + Standard_EXPORT Handle(GEOM_Object) MakeSplineBezier (std::list thePoints); + Standard_EXPORT Handle(GEOM_Object) MakeSplineInterpolation (std::list thePoints, bool theIsClosed = false); Standard_EXPORT Handle(GEOM_Object) MakeSketcher (const char* theCommand, - list theWorkingPlane); - Standard_EXPORT Handle(GEOM_Object) Make3DSketcher (list theCoordinates); + std::list theWorkingPlane); + Standard_EXPORT Handle(GEOM_Object) Make3DSketcher (std::list theCoordinates); Standard_EXPORT Handle(GEOM_Object) MakeSketcherOnPlane (const char* theCommand, Handle(GEOM_Object) theWorkingPlane); }; diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index 8f58d5c0c..d1556a330 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -58,8 +58,6 @@ // OCCT Includes #include -using namespace std; - typedef QMap FilterMap; static QString lastUsedFilter; diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx index 08c943795..16cdde16e 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx @@ -59,7 +59,6 @@ #include -using namespace std; //================================================================================= // class : GEOMBase_TransparencyDlg() diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc index 46d820c65..f79629ce3 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.cc +++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc @@ -27,7 +27,6 @@ #define isNewStudy(a,b) (a > 0 && a != b) -using namespace std; //============================================================================= // constructor: //============================================================================= diff --git a/src/OBJECT/GEOM_AISShape.cxx b/src/OBJECT/GEOM_AISShape.cxx index 973003606..1b032af0f 100644 --- a/src/OBJECT/GEOM_AISShape.cxx +++ b/src/OBJECT/GEOM_AISShape.cxx @@ -70,7 +70,6 @@ #include #include -using namespace std; static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj, const Handle(AIS_InteractiveContext)& theIC, diff --git a/src/OBJECT/GEOM_AssemblyBuilder.cxx b/src/OBJECT/GEOM_AssemblyBuilder.cxx index 101f40d8b..d2c8cba51 100644 --- a/src/OBJECT/GEOM_AssemblyBuilder.cxx +++ b/src/OBJECT/GEOM_AssemblyBuilder.cxx @@ -57,7 +57,6 @@ #include "utilities.h" -using namespace std; // SALOME #define MAX2(X, Y) ( Abs(X) > Abs(Y)? Abs(X) : Abs(Y) ) diff --git a/src/OBJECT/GEOM_InteractiveObject.cxx b/src/OBJECT/GEOM_InteractiveObject.cxx index 9b422b7c2..fb066617b 100644 --- a/src/OBJECT/GEOM_InteractiveObject.cxx +++ b/src/OBJECT/GEOM_InteractiveObject.cxx @@ -32,8 +32,6 @@ #include "GEOM_InteractiveObject.ixx" -using namespace std; - GEOM_InteractiveObject::GEOM_InteractiveObject() : SALOME_InteractiveObject() { diff --git a/src/OBJECT/GEOM_OCCReader.cxx b/src/OBJECT/GEOM_OCCReader.cxx index 381a2ed98..5057073dc 100644 --- a/src/OBJECT/GEOM_OCCReader.cxx +++ b/src/OBJECT/GEOM_OCCReader.cxx @@ -61,7 +61,6 @@ #include "utilities.h" -using namespace std; #define MAX2(X, Y) ( Abs(X) > Abs(Y)? Abs(X) : Abs(Y) ) #define MAX3(X, Y, Z) ( MAX2 ( MAX2(X,Y) , Z) )