Salome HOME
Use the prefix std:: instead of the directive using namespace std;
authorana <ana@opencascade.com>
Wed, 14 Apr 2010 11:20:29 +0000 (11:20 +0000)
committerana <ana@opencascade.com>
Wed, 14 Apr 2010 11:20:29 +0000 (11:20 +0000)
12 files changed:
src/GEOM/GEOM_Engine.cxx
src/GEOMGUI/GEOM_Displayer.cxx
src/GEOMGUI/GeometryGUI_Swig.cxx
src/GEOMImpl/GEOMImpl_ArchimedeDriver.cxx
src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx
src/GEOMToolsGUI/GEOMToolsGUI.cxx
src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx
src/GEOM_I_Superv/GEOM_Superv_i.cc
src/OBJECT/GEOM_AISShape.cxx
src/OBJECT/GEOM_AssemblyBuilder.cxx
src/OBJECT/GEOM_InteractiveObject.cxx
src/OBJECT/GEOM_OCCReader.cxx

index 55c452288b17a315ce5afd15fdbcff65845a8774..7804705ffab59dc9a1748f06c95e691db0f546be 100644 (file)
@@ -83,7 +83,6 @@ static int MYDEBUG = 0;
 
 static GEOM_Engine* TheEngine = NULL;
 
-using namespace std;
 
 static TCollection_AsciiString BuildIDFromObject(Handle(GEOM_Object)& theObject)
 {
index c809f1917aa2cb8e622198f04fc5a24133449442..cd4059b847015cf05aa1a92a872f91c3de62381c 100644 (file)
@@ -91,7 +91,6 @@
 #include <GEOMImpl_Types.hxx>
 #include <Graphic3d_HArray1OfBytes.hxx>
 
-using namespace std;
 
 //================================================================
 // Function : getActiveStudy
@@ -190,7 +189,7 @@ SUIT_SelectionFilter* GEOM_Displayer::getComplexFilter( const QList<int>* 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<SalomeApp_Application*>( 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<SalomeApp_Application*>( 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<SALOMEDS::Color>& 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<SALOMEDS::Color>::const_iterator it = theReservedColors.constBegin();
     QList<SALOMEDS::Color>::const_iterator itEnd = theReservedColors.constEnd();
@@ -1442,21 +1441,21 @@ SALOMEDS::Color GEOM_Displayer::getUniqueColor( const QList<SALOMEDS::Color>& 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 );
 
index 47395573812c5bf6b45d124ffee82bed0189f66d..813454603f2e276e3f179e0317c6f9a137fb2649 100644 (file)
@@ -68,9 +68,6 @@
 
 #include <vtkRenderer.h>
 
-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();
index 1c91fb7d40d9aa936d839bf463e42104db259a70..267435ecb3d1362ee117c1d8efc1610b53fccff2 100644 (file)
@@ -41,7 +41,6 @@
 
 #include <StdFail_NotDone.hxx>
 
-using namespace std;
 
 //=======================================================================
 //function : GetID
index 6bf6fa5cca7787377c0835d1cc067183b9e1e6e9..e8cce269039085bb907657c4ba9ae13741eaecbc 100644 (file)
@@ -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<Handle(GEOM_Object)> thePoints);
-  Standard_EXPORT Handle(GEOM_Object) MakeSplineInterpolation (list<Handle(GEOM_Object)> thePoints,
+  Standard_EXPORT Handle(GEOM_Object) MakeSplineBezier        (std::list<Handle(GEOM_Object)> thePoints);
+  Standard_EXPORT Handle(GEOM_Object) MakeSplineInterpolation (std::list<Handle(GEOM_Object)> thePoints,
                                                                bool                      theIsClosed = false);
 
   Standard_EXPORT Handle(GEOM_Object) MakeSketcher (const char* theCommand,
-                                                    list<double> theWorkingPlane);
-  Standard_EXPORT Handle(GEOM_Object) Make3DSketcher (list<double> theCoordinates);
+                                                    std::list<double> theWorkingPlane);
+  Standard_EXPORT Handle(GEOM_Object) Make3DSketcher (std::list<double> theCoordinates);
   Standard_EXPORT Handle(GEOM_Object) MakeSketcherOnPlane (const char* theCommand,
                                                            Handle(GEOM_Object) theWorkingPlane);
 };
index 8f58d5c0cbeebd1e1cdbf81b57112e92e1b5f8b7..d1556a3300cdd66596e3dbd265e90496710d8f0c 100644 (file)
@@ -58,8 +58,6 @@
 // OCCT Includes
 #include <TCollection_AsciiString.hxx>
 
-using namespace std;
-
 typedef QMap<QString, QString> FilterMap;
 static QString lastUsedFilter;
 
index 08c943795e8d65c3d3b4d1559798f7ff7eb44767..16cdde16ed4679f9b32d1b35f2060efec89370ee 100644 (file)
@@ -59,7 +59,6 @@
 
 #include <AIS_InteractiveContext.hxx>
 
-using namespace std;
 
 //=================================================================================
 // class    : GEOMBase_TransparencyDlg()
index 46d820c65ddc5fe827112f59b5d05dcd7c314cb9..f79629ce31c1218648d7775c70d4357481e0b654 100644 (file)
@@ -27,7 +27,6 @@
 
 #define isNewStudy(a,b) (a > 0 && a != b)
 
-using namespace std;
 //=============================================================================
 //  constructor:
 //=============================================================================
index 973003606c099c792ceb1705e6cc83976b76f148..1b032af0fd2ec9d48eaf19d54051e071eccb9e41 100644 (file)
@@ -70,7 +70,6 @@
 #include <TopoDS_Shape.hxx>
 #include <TopoDS_Vertex.hxx>
 
-using namespace std;
 
 static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj,
                              const Handle(AIS_InteractiveContext)& theIC,
index 101f40d8b2e513b07c7a8d0f6eaa85096e38c8f8..d2c8cba51191040fa6d52f637d8335d26b8a5d26 100644 (file)
@@ -57,7 +57,6 @@
 
 #include "utilities.h"
 
-using namespace std;
 // SALOME
 
 #define MAX2(X, Y)      (  Abs(X) > Abs(Y)? Abs(X) : Abs(Y) )
index 9b422b7c2b77df8186ee8f134290cb768add5a70..fb066617ba858065245fec97a7c60d7ecf185511 100644 (file)
@@ -32,8 +32,6 @@
 
 #include "GEOM_InteractiveObject.ixx"
 
-using namespace std;
-
 GEOM_InteractiveObject::GEOM_InteractiveObject()
   : SALOME_InteractiveObject()
 {
index 381a2ed981a0242ea7171f7640d4773789b41e86..5057073dc153a9d9bacba647e8fbe839d2728af7 100644 (file)
@@ -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) )