]> SALOME platform Git repositories - plugins/ghs3dplugin.git/commitdiff
Salome HOME
remove "using namespace std" from SMESH headers
authoreap <eap@opencascade.com>
Mon, 15 Feb 2016 12:40:54 +0000 (15:40 +0300)
committereap <eap@opencascade.com>
Mon, 15 Feb 2016 12:49:30 +0000 (15:49 +0300)
src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx
src/GHS3DPlugin/GHS3DPlugin_GHS3D_i.cxx
src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx
src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.cxx

index 20cc2ed3b33a4418da5c1bf46a2f889b754ff7dc..0ab006c7c01b00d9c138599229eba200ed8c5bc5 100644 (file)
@@ -93,6 +93,8 @@ extern "C"
 #include <fcntl.h>
 }
 
+using namespace std;
+
 #define HOLE_ID -1
 
 // flags returning state of enforced entities, returned from writeGMFFile
index b20829008fa38db9261177835bdedbb3089dd8f0..2ff7964da737e929e4d226fbc1a6f7199253bc93 100644 (file)
@@ -102,7 +102,7 @@ SMESH::SMESH_Mesh_ptr GHS3DPlugin_GHS3D_i::importGMFMesh(const char* theGMFFileN
 #else
 #define SEP '/'
 #endif
-  string strFileName (theGMFFileName);
+  std::string strFileName (theGMFFileName);
   strFileName = strFileName.substr(strFileName.rfind(SEP)+1);
   strFileName.erase(strFileName.rfind('.'));
   smeshGen->SetName(theSMesh, strFileName.c_str());
index 9c3fa87d05262d00886cc54beca6ab360a1e9b73..ddfbb56aa3765ddb1df41b41ff66c5333083b403 100644 (file)
@@ -35,6 +35,8 @@
 #define getpid _getpid
 #endif
 
+using namespace std;
+
 //=======================================================================
 //function : GHS3DPlugin_Hypothesis
 //=======================================================================
@@ -1364,7 +1366,7 @@ std::istream & GHS3DPlugin_Hypothesis::LoadFrom(std::istream & load)
           enfMesh->persistID = persistID;
 
           _enfMeshList.insert(enfMesh);
-          std::cout << "Restoring of enforced mesh " <<name  << " done" << std::endl;
+          //std::cout << "Restoring of enforced mesh " <<name  << " done" << std::endl;
 
           name.clear();
           entry.clear();
@@ -1418,7 +1420,7 @@ std::istream & GHS3DPlugin_Hypothesis::LoadFrom(std::istream & load)
           isOK = static_cast<bool>(load >> persistID);
           MESSAGE("persistID: " << persistID);
         }
-        std::cout << "isOK: " << isOK << std::endl;
+        //std::cout << "isOK: " << isOK << std::endl;
       } // while
       //                } // if
       isOK = static_cast<bool>(load >> txt);  // __BEGIN_ENF_MESH__
index 5e839346b11ade2f98b71da2dd4ca24ec6c2b390..27dd39289b70f8f7ca4a973478dc550fd9452f4f 100644 (file)
@@ -44,6 +44,8 @@
 // #include <SALOMEconfig.h>
 // #include CORBA_SERVER_HEADER(SALOMEDS)
 
+using namespace std;
+
 //=======================================================================
 //function : GHS3DPlugin_Hypothesis_i
 //=======================================================================
@@ -748,7 +750,7 @@ GHS3DPlugin::GHS3DEnforcedVertexList* GHS3DPlugin_Hypothesis_i::GetEnforcedVerti
     // Coords
     GHS3DPlugin::TCoords_var coords = new GHS3DPlugin::TCoords();
     coords->length(currentVertex->coords.size());
-    for (int ind = 0; ind < currentVertex->coords.size(); ind++)
+    for ( size_t ind = 0; ind < currentVertex->coords.size(); ind++)
       coords[ind] = currentVertex->coords[ind];
     enfVertex->coords = coords;
     // Group Name
@@ -999,7 +1001,7 @@ bool GHS3DPlugin_Hypothesis_i::p_SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theSo
 //   MESSAGE("Required type is "<<theType);
   SMESH::array_of_ElementType_var types = theSource->GetTypes();
   MESSAGE("Available types:");
-  for (int i=0;i<types->length();i++){MESSAGE(types[i]);}
+  for ( CORBA::ULong i=0;i<types->length();i++){MESSAGE(types[i]);}
   if ( types->length() >= 1 && types[types->length()-1] <  theType)
   {
     MESSAGE("Required type not available");
@@ -1022,20 +1024,20 @@ bool GHS3DPlugin_Hypothesis_i::p_SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theSo
 
   string enfMeshName = theName;
   if (enfMeshName.empty())
-          enfMeshName = SObj->GetName();
+    enfMeshName = SObj->GetName();
 
   if (theMesh_i)
   {
     try {
-        bool res = this->GetImpl()->SetEnforcedMesh(theMesh_i->GetImpl(), theType, enfMeshName , SObj->GetID(), theGroupName);
-                if (theGroupName != "") {
-                  SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshWithGroup( "
-                                                                << theSource << ".GetMesh(), " << theType << ", \"" << theGroupName << "\" )";
-                }
-                else {
-                  SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMesh( "
-                                                                << theSource << ".GetMesh(), " << theType << " )";
-                }
+      bool res = this->GetImpl()->SetEnforcedMesh(theMesh_i->GetImpl(), theType, enfMeshName , SObj->GetID(), theGroupName);
+      if (theGroupName && theGroupName[0] ) {
+        SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshWithGroup( "
+                              << theSource << ".GetMesh(), " << theType << ", \"" << theGroupName << "\" )";
+      }
+      else {
+        SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMesh( "
+                              << theSource << ".GetMesh(), " << theType << " )";
+      }
 
       return res;
     }
@@ -1054,20 +1056,20 @@ bool GHS3DPlugin_Hypothesis_i::p_SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theSo
   else if (theGroup_i)// && types->length() == 1 && types[0] == theType)
   {
     MESSAGE("The source is a group")
-    try {
+      try {
         bool res = this->GetImpl()->SetEnforcedGroup(theGroup_i->GetGroupDS()->GetMesh(), theGroup_i->GetListOfID(), theType, enfMeshName , SObj->GetID(), theGroupName);
-        if (theGroupName != "") {
-          SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshWithGroup( " 
+        if ( theGroupName && theGroupName[0] ) {
+          SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshWithGroup( "
                                 << theSource << ", " << theType << ", \"" << theGroupName << "\" )";
         }
         else {
-          SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMesh( " 
+          SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMesh( "
                                 << theSource << ", " << theType << " )";
         }
-      return res;
-    }
-    catch (const std::invalid_argument& ex) {
-      SALOME::ExceptionStruct ExDescription;
+        return res;
+      }
+      catch (const std::invalid_argument& ex) {
+        SALOME::ExceptionStruct ExDescription;
       ExDescription.text = ex.what();
       ExDescription.type = SALOME::BAD_PARAM;
       ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx";
@@ -1083,7 +1085,7 @@ bool GHS3DPlugin_Hypothesis_i::p_SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theSo
     MESSAGE("The source is a group on geom")
     try {
         bool res = this->GetImpl()->SetEnforcedGroup(theGroupOnGeom_i->GetGroupDS()->GetMesh(),theGroupOnGeom_i->GetListOfID(), theType, enfMeshName , SObj->GetID(), theGroupName);
-        if (theGroupName != "") {
+        if ( theGroupName && theGroupName[0] ) {
           SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshWithGroup( " 
                                 << theSource << ", " << theType << ", \"" << theGroupName << "\" )";
         }