Salome HOME
Fix for the "0051899: curves are not shown in opened study" issue.
[modules/visu.git] / src / CONVERTOR / VISU_Convertor_impl.hxx
index f6cffc0e99736c3b61e37c867ef605327d311c19..3e8f4bc630ded6fd611dda3e7176c52cf5055ccc 100644 (file)
@@ -1,31 +1,31 @@
-//  SALOME VTKViewer : build VTK viewer into Salome desktop
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003  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 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 
-// 
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// 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 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
 //
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+//  SALOME VTKViewer : build VTK viewer into Salome desktop
 //  File   : 
 //  Author : 
 //  Module : SALOME
 //  $Header$
-
+//
 #ifndef VISU_Convertor_impl_HeaderFile
 #define VISU_Convertor_impl_HeaderFile
 
@@ -83,95 +83,95 @@ public:
   virtual 
   VISU::PNamedIDMapper 
   GetMeshOnEntity(const std::string& theMeshName, 
-                 const VISU::TEntity& theEntity);
+                  const VISU::TEntity& theEntity);
 
   //! Implemention of the VISU_Convertor::GetMeshOnEntitySize
   virtual 
   size_t 
   GetMeshOnEntitySize(const std::string& theMeshName, 
-                      const VISU::TEntity& theEntity);
+                       const VISU::TEntity& theEntity);
 
   //! Implemention of the VISU_Convertor::GetFamilyOnEntity
   virtual 
   VISU::PUnstructuredGridIDMapper 
   GetFamilyOnEntity(const std::string& theMeshName, 
-                   const VISU::TEntity& theEntity,
-                   const std::string& theFamilyName);
+                    const VISU::TEntity& theEntity,
+                    const std::string& theFamilyName);
 
   //! Implemention of the VISU_Convertor::GetFamilyOnEntitySize
   virtual 
   size_t 
   GetFamilyOnEntitySize(const std::string& theMeshName, 
-                       const VISU::TEntity& theEntity,
-                       const std::string& theFamilyName);
+                        const VISU::TEntity& theEntity,
+                        const std::string& theFamilyName);
 
   //! Implemention of the VISU_Convertor::GetMeshOnGroup
   virtual 
   VISU::PUnstructuredGridIDMapper 
   GetMeshOnGroup(const std::string& theMeshName, 
-                const std::string& theGroupName);
+                 const std::string& theGroupName);
   
   //! Implemention of the VISU_Convertor::GetMeshOnGroupSize
   virtual 
   size_t 
   GetMeshOnGroupSize(const std::string& theMeshName, 
-                    const std::string& theGroupName);
+                     const std::string& theGroupName);
 
   //! Implemention of the VISU_Convertor::GetTimeStampOnMesh
   virtual
   VISU::PUnstructuredGridIDMapper 
-  GetTimeStampOnMesh(const std::string& theMeshName, 
-                    const VISU::TEntity& theEntity,
-                    const std::string& theFieldName,
-                    int theTimeStampNumber);
+  GetTimeStampOnMesh( const std::string& theMeshName, 
+                      const VISU::TEntity& theEntity,
+                      const std::string& theFieldName,
+                      int theTimeStampNumber );
 
   //! Get amount of memory to build vtkDataSet for corresponding MED TIMESTAMP on mesh
   virtual 
   size_t
   GetTimeStampOnMeshSize(const std::string& theMeshName, 
-                        const VISU::TEntity& theEntity,
-                        const std::string& theFieldName,
-                        int theTimeStampNumber,
-                        bool& theIsEstimated);
+                         const VISU::TEntity& theEntity,
+                         const std::string& theFieldName,
+                         int theTimeStampNumber,
+                         bool& theIsEstimated);
     
   //! Get amount of memory to build vtkDataSet for corresponding MED TIMESTAMP on Gauss Points
   virtual 
   size_t
   GetTimeStampOnGaussPtsSize(const std::string& theMeshName, 
-                            const VISU::TEntity& theEntity,
-                            const std::string& theFieldName,
-                            int theTimeStampNumber,
-                            bool& theIsEstimated);
+                             const VISU::TEntity& theEntity,
+                             const std::string& theFieldName,
+                             int theTimeStampNumber,
+                             bool& theIsEstimated);
 
   //! Implemention of the VISU_Convertor::GetTimeStampOnGaussPts
   virtual
   VISU::PGaussPtsIDMapper 
   GetTimeStampOnGaussPts(const std::string& theMeshName, 
-                        const VISU::TEntity& theEntity,
-                        const std::string& theFieldName,
-                        int theTimeStampNumber);
+                         const VISU::TEntity& theEntity,
+                         const std::string& theFieldName,
+                         int theTimeStampNumber);
   
   //! Implemention of the VISU_Convertor::GetFieldOnMeshSize
   virtual 
   size_t 
   GetFieldOnMeshSize(const std::string& theMeshName, 
-                    const VISU::TEntity& theEntity,
-                    const std::string& theFieldName);
+                     const VISU::TEntity& theEntity,
+                     const std::string& theFieldName);
 
   //! Implemention of the VISU_Convertor::GetField
   virtual 
   const VISU::PField 
   GetField(const std::string& theMeshName, 
-          VISU::TEntity theEntity, 
-          const std::string& theFieldName);
+           VISU::TEntity theEntity, 
+           const std::string& theFieldName);
 
   //! Implemention of the VISU_Convertor::GetTimeStamp
   virtual 
   const VISU::PValForTime 
   GetTimeStamp(const std::string& theMeshName, 
-              const VISU::TEntity& theEntity,
-              const std::string& theFieldName,
-              int theStampsNum);
+               const VISU::TEntity& theEntity,
+               const std::string& theFieldName,
+               int theStampsNum);
 
 protected:
   //! An utility method to find TMesh by its name
@@ -180,107 +180,100 @@ protected:
 
   //! An utility method to find TMeshOnEntity by name of its parent mesh and entity
   typedef boost::tuple<VISU::PMeshImpl,
-                      VISU::PMeshOnEntityImpl> TFindMeshOnEntity;
+                       VISU::PMeshOnEntityImpl> TFindMeshOnEntity;
   TFindMeshOnEntity
   FindMeshOnEntity(const std::string& theMeshName,
-                  const VISU::TEntity& theEntity);
+                   const VISU::TEntity& theEntity);
 
   //! An utility method to find TFamily by name of its parent mesh, corresponding entity and its name
   typedef boost::tuple<VISU::PMeshImpl,
-                      VISU::PMeshOnEntityImpl,VISU::PFamilyImpl> TFindFamilyOnEntity;
+                       VISU::PMeshOnEntityImpl,VISU::PFamilyImpl> TFindFamilyOnEntity;
   TFindFamilyOnEntity
   FindFamilyOnEntity(const std::string& theMeshName,
-                   const VISU::TEntity& theEntity,
-                   const std::string& theFamilyName);
+                    const VISU::TEntity& theEntity,
+                    const std::string& theFamilyName);
 
   //! An utility method to find Group by name of its parent mesh and its name
   typedef boost::tuple<VISU::PMeshImpl,
-                      VISU::PGroupImpl> TFindMeshOnGroup;
+                       VISU::PGroupImpl> TFindMeshOnGroup;
   TFindMeshOnGroup
   FindMeshOnGroup(const std::string& theMeshName, 
-                 const std::string& theGroupName);
+                  const std::string& theGroupName);
 
   //! An utility method to find TField by name of its parent mesh, corresponding entity and its name
   typedef boost::tuple<VISU::PMeshImpl,
-                      VISU::PMeshOnEntityImpl,
-                      VISU::PMeshOnEntityImpl,
-                      VISU::PFieldImpl> TFindField;
+                       VISU::PMeshOnEntityImpl,
+                       VISU::PMeshOnEntityImpl,
+                       VISU::PFieldImpl> TFindField;
   TFindField
-  FindField(const std::string& theMeshName, 
-           const VISU::TEntity& theEntity, 
-           const std::string& theFieldName);
+  FindField( const std::string& theMeshName, 
+             const VISU::TEntity& theEntity, 
+             const std::string& theFieldName );
 
   //! An utility method to find TTimeStamp by name of its parent mesh, corresponding entity, field name and its number
   typedef boost::tuple<VISU::PMeshImpl,
-                      VISU::PMeshOnEntityImpl,
-                      VISU::PMeshOnEntityImpl,
-                      VISU::PFieldImpl,
-                      VISU::PValForTimeImpl> TFindTimeStamp;
+                       VISU::PMeshOnEntityImpl,
+                       VISU::PMeshOnEntityImpl,
+                       VISU::PFieldImpl,
+                       VISU::PValForTimeImpl> TFindTimeStamp;
   TFindTimeStamp
   FindTimeStamp(const std::string& theMeshName, 
-               const VISU::TEntity& theEntity, 
-               const std::string& theFieldName, 
-               int theStampsNum);
+                const VISU::TEntity& theEntity, 
+                const std::string& theFieldName, 
+                int theStampsNum);
 
   vtkUnstructuredGrid*
-  GetTimeStampOnProfile(const VISU::PMeshImpl& theMesh,
-                       const VISU::PMeshOnEntityImpl& theMeshOnEntity,
-                       const VISU::PFieldImpl& theField,
-                       const VISU::PValForTimeImpl& theValForTime,
-                       const VISU::PUnstructuredGridIDMapperImpl& theIDMapperFilter,
-                       const VISU::PProfileImpl& theProfile,
-                       const VISU::TEntity& theEntity);
-
-  void
-  GetTimeStampOnNodalProfile(const VISU::PMeshImpl& theMesh,
-                             const VISU::PUnstructuredGridIDMapperImpl& theIDMapperFilter,
-                             const VISU::PFieldImpl& theField, 
-                             const VISU::PValForTimeImpl& theValForTime,
-                             const VISU::TEntity& theEntity);
-  
+  GetTimeStampOnProfile( const VISU::PMeshImpl& theMesh,
+                         const VISU::PMeshOnEntityImpl& theMeshOnEntity,
+                         const VISU::PFieldImpl& theField,
+                         const VISU::PValForTimeImpl& theValForTime,
+                         const VISU::PUnstructuredGridIDMapperImpl& theIDMapperFilter,
+                         const VISU::PProfileImpl& theProfile,
+                         const VISU::TEntity& theEntity );
+
 protected:
   //! Implemention of the VISU_Convertor::GetTimeStampSize
   virtual 
   size_t 
   GetTimeStampSize(const std::string& theMeshName, 
-                  const VISU::TEntity& theEntity,
-                  const std::string& theFieldName,
-                  int theStampsNum);
+                   const VISU::TEntity& theEntity,
+                   const std::string& theFieldName,
+                   int theStampsNum);
 
   //! To fill intermeiate representation of TMeshOnEntity from a MED source
   virtual
   int
   LoadMeshOnEntity(VISU::PMeshImpl theMesh,
-                  VISU::PMeshOnEntityImpl theMeshOnEntity) = 0;
+                   VISU::PMeshOnEntityImpl theMeshOnEntity) = 0;
 
   //! To fill intermeiate representation of TFamily from a MED source
   virtual
   int
   LoadFamilyOnEntity(VISU::PMeshImpl theMesh,
-                    VISU::PMeshOnEntityImpl theMeshOnEntity, 
-                    VISU::PFamilyImpl theFamily) = 0;
+                     VISU::PMeshOnEntityImpl theMeshOnEntity, 
+                     VISU::PFamilyImpl theFamily) = 0;
 
   //! To fill intermeiate representation of TGroup from a MED source
   virtual 
   int
   LoadMeshOnGroup(VISU::PMeshImpl theMesh, 
-                 const VISU::TFamilySet& theFamilySet) = 0;
+                  const VISU::TFamilySet& theFamilySet) = 0;
 
   //! To fill intermeiate representation of TValForTime for ordinary mesh from a MED source
   virtual 
   int
   LoadValForTimeOnMesh(VISU::PMeshImpl theMesh, 
-                      VISU::PMeshOnEntityImpl theMeshOnEntity, 
-                      VISU::PFieldImpl theField, 
-                      VISU::PValForTimeImpl theValForTime) = 0;
+                       VISU::PMeshOnEntityImpl theMeshOnEntity, 
+                       VISU::PFieldImpl theField, 
+                       VISU::PValForTimeImpl theValForTime) = 0;
 
   //! To fill intermeiate representation of TValForTime for mesh on Gauss Points from a MED source
   virtual 
   int
   LoadValForTimeOnGaussPts(VISU::PMeshImpl theMesh, 
-                          VISU::PMeshOnEntityImpl theMeshOnEntity, 
-                          VISU::PFieldImpl theField, 
-                          VISU::PValForTimeImpl theValForTime) = 0;
+                           VISU::PMeshOnEntityImpl theMeshOnEntity, 
+                           VISU::PFieldImpl theField, 
+                           VISU::PValForTimeImpl theValForTime) = 0;
 };
 
 #endif