1 // Copyright (C) 2003 CEA/DEN, EDF R&D
5 // File : VISU_Result_i.hh
6 // Author : Alexey PETROV
9 #ifndef __VISU_RESULT_I_H__
10 #define __VISU_RESULT_I_H__
12 #include "VISUConfig.hh"
14 class vtkUnstructuredGridReader;
15 class vtkUnstructuredGrid;
21 class Result_i : public virtual POA_VISU::Result,
22 public virtual Storable
25 Result_i(const Result_i &);
27 Result_i(SALOMEDS::Study_ptr theStudy);
30 virtual VISU::VISUType GetType() { return VISU::TRESULT;};
32 typedef VISU_Convertor InputType;
33 typedef vtkUnstructuredGridReader OutputType;
34 enum TSourceId {eRestoredComponent = -2, eRestoredFile = -1, eFile = 1, eComponent = 2};
41 virtual Storable* Build(SALOMEDS::SObject_ptr theSObject = NULL)
42 throw (std::runtime_error&);
44 virtual Storable* Create(const char* theFileName);
45 virtual Storable* Create(SALOMEDS::SObject_ptr theMedSObject);
46 virtual Storable* Create(SALOME_MED::FIELD_ptr theField);
47 virtual Storable* Restore(SALOMEDS::SObject_ptr theSObject,
48 const string& thePrefix, const Storable::TRestoringMap& theMap)
49 throw(std::logic_error&);
50 virtual void ToStream(std::ostringstream& theStr);
51 virtual const char* GetComment() const;
52 static const string myComment;
53 InputType* GetInput();
54 const string& GetName() const { return myName;}
55 const QFileInfo& GetFileInfo() const { return myFileInfo;}
56 Result_i::TSourceId GetSourceId() const { return mySourceId;}
58 SALOMEDS::SObject_var mySObject;
59 SALOMEDS::Study_var myStudyDocument;
60 SALOMEDS::SComponent_var mySComponent;
62 string GetRefFatherEntry();
64 const SALOMEDS::SObject_var& GetSObject() const;
65 const SALOMEDS::Study_var& GetStudyDocument() const;
66 const SALOMEDS::SComponent_var& GetSComponent() const;
68 Storable* ResultRestore(SALOMEDS::SObject_ptr theSObject,
69 const string& thePrefix, const Storable::TRestoringMap& theMap)
70 throw(std::logic_error&);
71 Result_var FindResult(SALOMEDS::SObject_ptr theSObject);
72 QString GenerateName(const string& theFmt, int theId);
73 void WriteToFile(vtkUnstructuredGrid* theDataSet, const string& theFileName);