]> SALOME platform Git repositories - modules/visu.git/blob - src/VISU_I/VISU_DatConvertor.hxx
Salome HOME
NRI : Merge from V1_2.
[modules/visu.git] / src / VISU_I / VISU_DatConvertor.hxx
1 //  Copyright (C) 2003  CEA/DEN, EDF R&D
2 //
3 //
4 //
5 //  File   : VISU_DatConvertor.hxx
6 //  Author : Alexey PETROV
7 //  Module : VISU
8
9 #ifndef VISU_DatConvertor_HeaderFile
10 #define VISU_DatConvertor_HeaderFile
11
12 #include "VISU_Convertor_impl.hxx"
13 #include <fstream>      
14
15 class VISU_DatConvertor: public VISU_Convertor_impl{
16   VISU_DatConvertor();
17   VISU_DatConvertor(const VISU_DatConvertor&);
18 public:
19   VISU_DatConvertor(const string& theFileName) throw (std::runtime_error&);
20   virtual VISU_Convertor* Build() throw (std::runtime_error&);
21 protected:
22   QFileInfo myFileInfo;
23   int ImportHead(ifstream* pStmIn, int* theNbPoints, int* theNbCells, int* theNbFields) 
24     throw (std::runtime_error&);
25   int ImportPoints(ifstream*, int theNbPoints) 
26     throw (std::runtime_error&);
27   int ImportCells(ifstream*, vector<int>* aCellsType) 
28     throw (std::runtime_error&);
29   int ImportField(ifstream*, int theNbPoints, vector<int>* aCellsType) 
30     throw (std::runtime_error&);
31  protected:
32   virtual int LoadMeshOnEntity(VISU::TMeshOnEntity& theMeshOnEntity, 
33                                const string& theFamilyName = "")
34     throw (std::runtime_error&) {return 1;}
35   virtual int LoadMeshOnGroup(VISU::TMesh& theMesh, 
36                               const VISU::TFamilyAndEntitySet& theFamilyAndEntitySet)
37     throw (std::runtime_error&) {return 1;}
38   virtual int LoadFieldOnMesh(VISU::TMesh& theMesh, 
39                               VISU::TMeshOnEntity& theMeshOnEntity, 
40                               VISU::TField& theField, 
41                               VISU::TField::TValForTime& theValForTime)
42     throw (std::runtime_error&) {return 1;}
43 };
44
45 #endif