Salome HOME
Suppress warnings.
[modules/visu.git] / src / CONVERTOR / VISU_Structures_impl.cxx
index eb797c47790b2f77b8c96b02b7d4b0eb04510da4..750ce46103582e8fd6e740a88a59570b2d237844 100644 (file)
@@ -1,28 +1,29 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File:
 //  Author:  Alexey PETROV
 //  Module : VISU
-
+//
 #include "VISU_Structures_impl.hxx"
 #include "VISU_PointCoords.hxx"
 #include "VISU_MeshValue.hxx"
@@ -190,6 +191,9 @@ namespace VISU
       return VISU::ePENTA6;
     case VTK_PYRAMID:
       return VISU::ePYRA5;
+    case VTK_HEXAGONAL_PRISM:
+      return VISU::eOCTA12;
+
 
     case VTK_POLYGON:
       return VISU::ePOLYGONE;
@@ -197,41 +201,34 @@ namespace VISU
       return VISU::ePOLYEDRE;
 
 #if defined(VISU_ENABLE_QUADRATIC) && defined(VISU_USE_VTK_QUADRATIC)
-  #if defined(VTK_QUADRATIC_EDGE)
+
     case VTK_QUADRATIC_EDGE:
       return VISU::eSEG3;
-  #endif
 
-  #if defined(VTK_QUADRATIC_TRIANGLE)
     case VTK_QUADRATIC_TRIANGLE:
       return VISU::eTRIA6;
-  #endif
 
-  #if defined(VTK_QUADRATIC_QUAD)
     case VTK_QUADRATIC_QUAD:
       return VISU::eQUAD8;
-  #endif
 
-  #if defined(VTK_QUADRATIC_TETRA)
+    case VTK_BIQUADRATIC_QUAD:
+      return VISU::eQUAD9;
+
     case VTK_QUADRATIC_TETRA:
       return VISU::eTETRA10;
-  #endif
 
-  #if defined(VTK_QUADRATIC_HEXAHEDRON)
     case VTK_QUADRATIC_HEXAHEDRON:
       return VISU::eHEXA20;
-  #endif
 
-  #if defined(VTK_QUADRATIC_WEDGE)
+    case VTK_TRIQUADRATIC_HEXAHEDRON:
+      return VISU::eHEXA27;
+
     case VTK_QUADRATIC_WEDGE:
       return VISU::ePENTA15;
-  #endif
 
-  #if defined(VTK_QUADRATIC_PYRAMID)
     case VTK_QUADRATIC_PYRAMID:
       return VISU::ePYRA13;
-  #endif
-
+      
 #endif //VISU_ENABLE_QUADRATIC
 
     default:
@@ -515,7 +512,13 @@ namespace VISU
     return aSize;
   }
 
-
+  bool 
+  TSubProfileImpl
+  ::isDefault() const
+  {
+    return strcmp(myName.c_str(),"") == 0;
+  }
+  
   //---------------------------------------------------------------
   bool
   operator<(const PSubProfile& theLeft, const PSubProfile& theRight)
@@ -1294,7 +1297,7 @@ namespace VISU
     vtkIdType aNbCells = 0, aCellsSize = 0;
     TFamilySet::const_iterator anIter = myFamilySet.begin();
     for(; anIter != myFamilySet.end(); anIter++){
-      PFamilyImpl aFamily = *anIter;
+      PFamilyImpl aFamily = (*anIter).second;
       aNbCells += aFamily->myNbCells;
       aCellsSize += aFamily->myCellsSize;
     }
@@ -1515,7 +1518,8 @@ namespace VISU
   TValForTimeImpl
   ::TValForTimeImpl():
     myGaussPtsIDFilter(new TGaussPtsIDFilter()),
-    myUnstructuredGridIDMapper(new TUnstructuredGridIDMapperImpl())
+    myUnstructuredGridIDMapper(new TUnstructuredGridIDMapperImpl()),
+  myIsFilled(false)
   {}
 
   const PMeshValue&
@@ -1571,7 +1575,7 @@ namespace VISU
     int aNbGauss = 1;
     TGeom2NbGauss::const_iterator anIter = myGeom2NbGauss.begin();
     for(; anIter != myGeom2NbGauss.end(); anIter++){
-      aNbGauss = std::max(aNbGauss, anIter->second);
+      aNbGauss = std::max<int>(aNbGauss, anIter->second);
     }
     return aNbGauss;
   }