Salome HOME
This commit was generated by cvs2git to track changes on a CVS vendor
[modules/visu.git] / src / VISU_I / VISU_Result_i.hh
1 // File:        VISU_Result_i.hh
2 // Created:     Fri Jan 10 12:36:38 2003
3 // Author:      Alexey PETROV
4 //              <apo@ivanox.nnov.matra-dtv.fr>
5
6 #ifndef __VISU_RESULT_I_H__
7 #define __VISU_RESULT_I_H__
8
9 #include "VISUConfig.hh"
10
11 class vtkUnstructuredGridReader;
12 class vtkUnstructuredGrid;
13 class VISU_Convertor;
14 class FieldInfo;
15 class QAD_Study;
16
17 namespace VISU{
18   class Result_i : public virtual POA_VISU::Result,
19                    public virtual Storable
20   {
21     Result_i();
22     Result_i(const Result_i &);
23   public:
24     Result_i(SALOMEDS::Study_ptr theStudy);
25     virtual ~Result_i();
26
27     virtual VISU::VISUType GetType() { return VISU::TRESULT;};
28
29     typedef VISU_Convertor InputType;
30     typedef vtkUnstructuredGridReader OutputType;
31   private:
32     InputType *myInput;
33     string myName;
34     QFileInfo myFileInfo;
35     int myIsRestored;
36   protected:
37     virtual Storable* Build();
38   public:
39     virtual Storable* Create(const char* theFileName);
40     virtual Storable* Create(SALOME_MED::FIELD_ptr theField);
41     virtual Storable* Create(SALOME_MED::MESH_ptr theMesh);
42     virtual Storable* Create(SALOME_MED::SUPPORT_ptr theSupport);
43     virtual Storable* Restore(SALOMEDS::SObject_ptr theSObject, 
44                               const string& thePrefix, const Storable::TRestoringMap& theMap)
45       throw(std::logic_error&);
46     virtual void ToStream(ostrstream& theStr);
47     virtual const char* GetComment() const;
48     static const string myComment;
49     InputType* GetInput() { return myInput;}
50     const char* GetName() const { return myName.c_str();}
51     const QFileInfo& GetFileInfo() const { return myFileInfo;}
52     int IsRestored() const { return myIsRestored;}
53   private:
54     SALOMEDS::SObject_var mySObject;
55     SALOMEDS::Study_var myStudyDocument;
56     SALOMEDS::SComponent_var mySComponent;
57   public:
58     string GetRefFatherEntry();
59     string GetEntry();
60     const SALOMEDS::SObject_var& GetSObject() const;
61     const SALOMEDS::Study_var& GetStudyDocument() const;
62     const SALOMEDS::SComponent_var& GetSComponent() const;
63   };
64   Storable* ResultRestore(SALOMEDS::SObject_ptr theSObject, 
65                            const string& thePrefix, const Storable::TRestoringMap& theMap)
66     throw(std::logic_error&);
67   Result_var FindResult(SALOMEDS::SObject_ptr theSObject);
68   QString GenerateName(const string& theFmt, int theId);
69   void WriteToFile(vtkUnstructuredGrid* theDataSet, const string& theFileName);
70 }
71 #endif