]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
1. To remove useless dependecies.
authorapo <apo@opencascade.com>
Tue, 13 Sep 2005 04:16:39 +0000 (04:16 +0000)
committerapo <apo@opencascade.com>
Tue, 13 Sep 2005 04:16:39 +0000 (04:16 +0000)
2. To remove unused functions

src/CONVERTOR/VISU_Convertor.cxx
src/CONVERTOR/VISU_Convertor.hxx
src/CONVERTOR/VISU_Convertor_impl.cxx
src/CONVERTOR/VISU_MedConvertor.cxx
src/VISU_I/VISU_CorbaMedConvertor.cxx

index 0f9e9b115e144a327781f5c69d9dfe39e9bcd20c..0a599cd16b24c98a9da882e7846ae4f2c3cc0ec0 100644 (file)
@@ -49,53 +49,6 @@ namespace VISU{
     default: return -1;
     }
   }
-
-  PField
-  TMesh
-  ::GetField(const string& theFieldName) const 
-  {
-    TMeshOnEntityMap::const_iterator aMeshOnEntityMapIter = myMeshOnEntityMap.begin();
-    for(; aMeshOnEntityMapIter != myMeshOnEntityMap.end(); aMeshOnEntityMapIter++){
-      const TFieldMap& aFieldMap = aMeshOnEntityMapIter->second->myFieldMap;
-      TFieldMap::const_iterator aFieldMapIter = aFieldMap.begin();
-      for(; aFieldMapIter != aFieldMap.end(); aFieldMapIter++)
-       if(theFieldName == aFieldMapIter->first) 
-         return aFieldMapIter->second;
-    }
-    return PField();
-  }
-
-
-  PFamily
-  FindFamily(VISU::PMesh theMesh, 
-            const string& theFamilyName)
-  {
-    PFamily aFamily;
-    const TMeshOnEntityMap& aMeshOnEntityMap = theMesh->myMeshOnEntityMap;
-    TMeshOnEntityMap::const_iterator aMeshOnEntityMapIter = aMeshOnEntityMap.begin();
-    for(; aMeshOnEntityMapIter != aMeshOnEntityMap.end(); aMeshOnEntityMapIter++){
-      const PMeshOnEntity aMeshOnEntity = aMeshOnEntityMapIter->second;
-      aFamily = GetFamily(aMeshOnEntity,theFamilyName);
-      if(aFamily)
-       break;
-    }
-    return aFamily;
-  }
-  
-
-  PFamily
-  GetFamily(VISU::PMeshOnEntity theMeshOnEntity, 
-           const string& theFamilyName)
-  {
-    PFamily aFamily;
-    if(theFamilyName != ""){
-      TFamilyMap& aFamilyMap = theMeshOnEntity->myFamilyMap;
-      TFamilyMap::iterator aFamilyMapIter = aFamilyMap.find(theFamilyName);
-      if(aFamilyMapIter != aFamilyMap.end())
-       aFamily = aFamilyMapIter->second;
-    }
-    return aFamily;
-  }
 }
 
 
index ef67eb40085d6fa1d1ef2d18be0a5c31196a4373..14500e14309ba982a1b12948d983a72bfbb5b5e5 100644 (file)
@@ -28,6 +28,7 @@
 #define VISU_Convertor_HeaderFile
 
 #include "VISU_IDMapper.hxx"
+#include "VISU_ConvertorDef.hxx"
 
 #include "MED_Vector.hxx"
 
 #include <string>
 #include <stdexcept>
 
-#include <stdio.h>
-
 namespace VISU
 {
   using MED::TVector;
 
   //---------------------------------------------------------------
-  enum  TEntity {NODE_ENTITY, EDGE_ENTITY, FACE_ENTITY, CELL_ENTITY};
-
-  struct TMesh;
-  typedef SharedPtr<TMesh> PMesh;
-  typedef std::map<std::string,PMesh> TMeshMap;
-
-  struct TGaussSubMesh;
-  typedef SharedPtr<TGaussSubMesh> PGaussSubMesh;
-
-  struct TGaussMesh;
-  typedef SharedPtr<TGaussMesh> PGaussMesh;
-
-  struct TSubProfile;
-  typedef SharedPtr<TSubProfile> PSubProfile;
-
-  struct TProfile;
-  typedef SharedPtr<TProfile> PProfile;
-
-  struct TMeshOnEntity;
-  typedef SharedPtr<TMeshOnEntity> PMeshOnEntity;
-
-  struct TFamily;
-  typedef SharedPtr<TFamily> PFamily;
-
-  struct TGroup;
-  typedef SharedPtr<TGroup> PGroup;
-
-  struct TField;
-  typedef SharedPtr<TField> PField;
-
-  struct TGauss;
-  typedef SharedPtr<TGauss> PGauss;
-
-  struct TValForTime;
-  typedef SharedPtr<TValForTime> PValForTime;
-
   typedef std::string TName;
 
   typedef TVector<TName> TNames;
 
-
   //---------------------------------------------------------------
   struct TIntId: virtual TBaseStructure
   {
@@ -108,10 +70,8 @@ namespace VISU
 
     TMesh(): myDim(0)
     {}
-
-    PField
-    GetField(const std::string& theFieldName) const;
   };
+  typedef std::map<std::string,PMesh> TMeshMap;
 
 
   //---------------------------------------------------------------
@@ -235,18 +195,9 @@ namespace VISU
 
 
   //---------------------------------------------------------------
-  PFamily
-  FindFamily(VISU::PMesh theMesh, 
-            const std::string& theFamilyName);
-  
-  PFamily
-  GetFamily(VISU::PMeshOnEntity theMeshOnEntity, 
-           const std::string& theFamilyName);
-
   void 
   WriteToFile(vtkUnstructuredGrid* theDataSet, 
              const std::string& theFileName);
-
 };
 
 
@@ -370,4 +321,5 @@ extern "C"
   CreateConvertor(const std::string& theFileName);
 };
 
+
 #endif
index 5bec193b2193564e9970ede9b31ffc5d9ae9a304..b4dbc4b10c7f63170507235b5b2a270d9bf16d9e 100644 (file)
@@ -57,7 +57,7 @@ static float ERR_SIZE_CALC = 1.00;
 static int MYVTKDEBUG = 0;
 
 #ifdef _DEBUG_
-static int MYDEBUG = 1;
+static int MYDEBUG = 0;
 static int MYDEBUGWITHFILES = 0;
 //#define _DEXCEPT_
 #else
@@ -1877,17 +1877,25 @@ VISU_Convertor_impl
                     const VISU::TEntity& theEntity,
                     const string& theFamilyName)
 {
-  PMeshImpl aMesh = FindMesh(theMeshName);
-  VISU::TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap;
-  VISU::TMeshOnEntityMap::const_iterator aMeshOnEntityMapIter = aMeshOnEntityMap.find(theEntity);
-  if(aMeshOnEntityMapIter == aMeshOnEntityMap.end())
-    EXCEPTION(runtime_error,"FindFamilyOnEntity >> There is no mesh on the entity - "<<theEntity<<"!!!");
-
-  PMeshOnEntityImpl aMeshOnEntity = aMeshOnEntityMapIter->second;
-
-  return TFindFamilyOnEntity(aMesh,
-                            aMeshOnEntity,
-                            VISU::GetFamily(aMeshOnEntity,theFamilyName));
+  if(theFamilyName != ""){
+    PMeshImpl aMesh = FindMesh(theMeshName);
+    VISU::TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap;
+    VISU::TMeshOnEntityMap::const_iterator aMeshOnEntityMapIter = aMeshOnEntityMap.find(theEntity);
+    if(aMeshOnEntityMapIter == aMeshOnEntityMap.end())
+      EXCEPTION(runtime_error,"FindFamilyOnEntity >> There is no mesh on the entity - "<<theEntity<<"!!!");
+
+    PMeshOnEntityImpl aMeshOnEntity = aMeshOnEntityMapIter->second;
+
+    TFamilyMap& aFamilyMap = aMeshOnEntity->myFamilyMap;
+    TFamilyMap::iterator aFamilyMapIter = aFamilyMap.find(theFamilyName);
+    if(aFamilyMapIter != aFamilyMap.end()){
+      const PFamily& aFamily = aFamilyMapIter->second;
+      return TFindFamilyOnEntity(aMesh,
+                                aMeshOnEntity,
+                                aFamily);
+    }
+  }
+  return TFindFamilyOnEntity();
 }
 
 
index a77815f489f9d40d0aae7c3d53b93165eefffeb1..eb9222d5c511ad2be450e5022aa118028c69c9e2 100644 (file)
@@ -44,10 +44,10 @@ using MED::TFloat;
 using MED::EBooleen;
 
 #ifdef _DEBUG_
-static int MYDEBUG = 1;
+static int MYDEBUG = 0;
 static int MYVALUEDEBUG = 0;
-static int MY_FAMILY_DEBUG = 1;
-static int MY_GROUP_DEBUG = 1;
+static int MY_FAMILY_DEBUG = 0;
+static int MY_GROUP_DEBUG = 0;
 //#define _DEXCEPT_
 #else
 static int MYDEBUG = 0;
index 6106947b6d8fddbaf823c4194debd92b01277b30..c580b50e11ae72d1b233b1ffea70545546bdfab1 100644 (file)
@@ -675,7 +675,9 @@ VISU_MEDConvertor::Build(SALOME_MED::MED_ptr theMED)
          for(int iFamaily = 0; iFamaily < iFamilyEnd; iFamaily++){
            SALOME_MED::FAMILY_var aMEDFamily = aFamilies[iFamaily];
            CORBA::String_var aFamilyName = aMEDFamily->getName();
-           PCFamily aFamily = FindFamily(aMesh,aFamilyName.in());
+           TFindFamilyOnEntity aFindFamilyOnEntity = 
+             FindFamilyOnEntity(aMeshName.in(),aVEntity,aFamilyName.in());
+           PCFamily aFamily = boost::get<2>(aFindFamilyOnEntity);
            if(MYDEBUG) MESSAGE("VISU_MEDConvertor::Build - aGroup - aFamilyName = '"<<aFamilyName.in()<<"' = "<<bool(aFamily));
            if(aFamily){
              aFamilySet.insert(aFamily);