Salome HOME
DCQ : Merge with Ecole Ete a6.
[modules/visu.git] / src / CONVERTOR / VISU_Convertor_impl.hxx
index 9ea6d9d8da49e6dcee8e3740d903569cdf40fded..fa2f829102dc0b9c9c348c65b8229ad67f4d4d5e 100644 (file)
@@ -19,132 +19,87 @@ extern "C"{
 #include <qfileinfo.h>
 
 class VISU_Convertor_impl: public VISU_Convertor{
-private:
-  void GetPoints(VISU::TVTKSource& theStorage, 
-                const VISU::TMesh& theMesh) 
-    const throw (std::runtime_error&);
-  void GetCellsOnEntity(VISU::TVTKSource& theStorage,
-                       const VISU::TMeshOnEntity& theMeshOnEntity, 
-                       const std::string& theFamilyName) 
-    const throw (std::runtime_error&);
-  void GetCellsOnGroup(VISU::TVTKSource& theStorage,
-                      const VISU::TMesh& theMesh,
-                      const VISU::TFamilyAndEntitySet& theFamilyAndEntitySet) 
-    const throw (std::runtime_error&);
-  void GetField(VISU::TVTKSource& theStorage,
-               const VISU::TMesh& theMesh,
-               const VISU::TMeshOnEntity& theMeshOnEntity, 
-               const VISU::TField& theField, 
-               const VISU::TField::TValForTime& theValForTime) 
-    const throw (std::runtime_error&);
-
+public:
+  virtual float GetSize() ;
 
-protected:
-  void FindMesh(const std::string& theMeshName, VISU::TMesh*& theMesh)
-    throw(std::runtime_error&);
-  void FindMeshOnEntity(const std::string& theMeshName, VISU::TMesh*& theMesh,
-                       const VISU::TEntity& theEntity, VISU::TMeshOnEntity*& theMeshOnEntity,
-                       const std::string& theFamilyName, VISU::TFamily*& theFamily)
-    throw (std::runtime_error&);
+  virtual float GetMeshOnEntitySize(const std::string& theMeshName, 
+                                   const VISU::TEntity& theEntity,
+                                   const std::string& theFamilyName = "");
 
-  void FindMeshOnGroup(const std::string& theMeshName, VISU::TMesh*& theMesh,
-                      const std::string& theGroupName, VISU::TGroup*& theGroup)
-    throw (std::runtime_error&);
+  virtual float GetMeshOnGroupSize(const std::string& theMeshName, 
+                                  const std::string& theGroupName);
 
-  void FindField(const std::string& theMeshName, VISU::TMesh*& theMesh,
-                const VISU::TEntity& theEntity, 
-                VISU::TMeshOnEntity*& theMeshOnEntity,
-                VISU::TMeshOnEntity*& theVTKMeshOnEntity,
-                const std::string& theFieldName, VISU::TField*& theField)
-    throw (std::runtime_error&);
-  void FindTimeStamp(const std::string& theMeshName, VISU::TMesh*& theMesh,
-                    const VISU::TEntity& theEntity, 
-                    VISU::TMeshOnEntity*& theMeshOnEntity,
-                    VISU::TMeshOnEntity*& theVTKMeshOnEntity,
-                    const std::string& theFieldName, VISU::TField*& theField,
-                    int theStampsNum, VISU::TField::TValForTime*& theValForTime)
-    throw (std::runtime_error&);
+  virtual float GetTimeStampSize(const std::string& theMeshName, 
+                                const VISU::TEntity& theEntity,
+                                const std::string& theFieldName,
+                                int theStampsNum);
 
+  virtual float GetFieldOnMeshSize(const std::string& theMeshName, 
+                                  const VISU::TEntity& theEntity,
+                                  const std::string& theFieldName);
 
-public:
-  virtual vtkIdType GetMeshOnEntitySize(const std::string& theMeshName, 
-                                       const VISU::TEntity& theEntity,
-                                       const std::string& theFamilyName = "")
-    throw (std::runtime_error&);
-  virtual vtkIdType GetMeshOnGroupSize(const std::string& theMeshName, 
-                                      const std::string& theGroupName)
-    throw(std::runtime_error&);
-  virtual vtkIdType GetTimeStampSize(const std::string& theMeshName, 
-                                    const VISU::TEntity& theEntity,
-                                    const std::string& theFieldName,
-                                    int theStampsNum)
-    throw(std::runtime_error&);
-  virtual vtkIdType GetFieldOnMeshSize(const std::string& theMeshName, 
-                                      const VISU::TEntity& theEntity,
-                                      const std::string& theFieldName)
-    throw(std::runtime_error&);
   virtual const VISU::TField& GetField(const std::string& theMeshName, 
                                       VISU::TEntity theEntity, 
-                                      const std::string& theFieldName)
-    throw(std::runtime_error&);
+                                      const std::string& theFieldName);
+
   virtual const VISU::TField::TValForTime& GetTimeStamp(const std::string& theMeshName, 
                                                        const VISU::TEntity& theEntity,
                                                        const std::string& theFieldName,
-                                                       int theStampsNum)
-    throw(std::runtime_error&);
+                                                       int theStampsNum);
 
 public:
   VISU_Convertor_impl();
+
   virtual ~VISU_Convertor_impl();
-  virtual VISU_Convertor* Build() throw (std::runtime_error&) { return this;};
+
+  virtual VISU_Convertor* Build()  { return this;};
+
   virtual TOutput* GetMeshOnEntity(const std::string& theMeshName, 
                                   const VISU::TEntity& theEntity,
-                                  const std::string& theFamilyName = "")
-    throw(std::runtime_error&);
+                                  const std::string& theFamilyName = "");
+
   virtual TOutput* GetMeshOnGroup(const std::string& theMeshName, 
-                                 const std::string& theGroupName)
-    throw(std::runtime_error&);
+                                 const std::string& theGroupName);
+
   virtual TOutput* GetTimeStampOnMesh(const std::string& theMeshName, 
                                      const VISU::TEntity& theEntity,
                                      const std::string& theFieldName,
-                                     int theStampsNum)
-    throw(std::runtime_error&);
+                                     int theStampsNum);
 
- protected:
+protected:
+  void FindMesh(const std::string& theMeshName, VISU::TMesh*& theMesh);
+
+  void FindMeshOnEntity(const std::string& theMeshName, VISU::TMesh*& theMesh,
+                       const VISU::TEntity& theEntity, VISU::TMeshOnEntity*& theMeshOnEntity,
+                       const std::string& theFamilyName, VISU::TFamily*& theFamily);
+
+  void FindMeshOnGroup(const std::string& theMeshName, VISU::TMesh*& theMesh,
+                      const std::string& theGroupName, VISU::TGroup*& theGroup);
+
+  void FindField(const std::string& theMeshName, VISU::TMesh*& theMesh,
+                const VISU::TEntity& theEntity, 
+                VISU::TMeshOnEntity*& theMeshOnEntity,
+                VISU::TMeshOnEntity*& theVTKMeshOnEntity,
+                const std::string& theFieldName, VISU::TField*& theField);
+
+  void FindTimeStamp(const std::string& theMeshName, VISU::TMesh*& theMesh,
+                    const VISU::TEntity& theEntity, 
+                    VISU::TMeshOnEntity*& theMeshOnEntity,
+                    VISU::TMeshOnEntity*& theVTKMeshOnEntity,
+                    const std::string& theFieldName, VISU::TField*& theField,
+                    int theStampsNum, VISU::TField::TValForTime*& theValForTime);
+
+protected:
   virtual int LoadMeshOnEntity(VISU::TMeshOnEntity& theMeshOnEntity, 
-                              const std::string& theFamilyName = "")
-    throw (std::runtime_error&) = 0;
+                              const std::string& theFamilyName = "") = 0;
+
   virtual int LoadMeshOnGroup(VISU::TMesh& theMesh, 
-                             const VISU::TFamilyAndEntitySet& theFamilyAndEntitySet)
-    throw (std::runtime_error&) = 0;
+                             const VISU::TFamilyAndEntitySet& theFamilyAndEntitySet) = 0;
+
   virtual int LoadFieldOnMesh(VISU::TMesh& theMesh, 
                              VISU::TMeshOnEntity& theMeshOnEntity, 
                              VISU::TField& theField, 
-                             VISU::TField::TValForTime& theValForTime)
-    throw (std::runtime_error&) = 0;
+                             VISU::TField::TValForTime& theValForTime) = 0;
 };
 
-template<class T> std::string dtos(const std::string& fmt, T val){
-  static QString aString;
-  aString.sprintf(fmt.c_str(),val);
-  return aString.latin1();
-}
-
-extern "C"{
-  int getNbMedConnect(int theMedType, int theMedEntity, int theMeshDim);
-  int getNbMedNodes(int theMedType);
-  int med2vtkCellType(int theMedType);
-  int vtk2medCellType(int theVtkType);
-  int getIdMedType(int medType);
-}
-
-struct Med2vtk {
-  med_geometrie_element medType;
-  const char *medName;
-  int medNbNodes;
-  int vtkType;
-  const char *vtkName;
-  int vtkNbNodes;
-};
-extern Med2vtk med2vtk[MED_NBR_GEOMETRIE_MAILLE];
 #endif