X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FVISU_I%2FVISU_Result_i.hh;h=163231ec64ff0f86731c3896cc54d932d167dd7f;hb=ea0d11b57debc8f1953669110cab2eaf790681b1;hp=4b5a30b1789b1997d3ed1902d47c4ac2e65179f4;hpb=8bbd31eda83a4653cfafe18b2544f86af247419a;p=modules%2Fvisu.git diff --git a/src/VISU_I/VISU_Result_i.hh b/src/VISU_I/VISU_Result_i.hh index 4b5a30b1..163231ec 100644 --- a/src/VISU_I/VISU_Result_i.hh +++ b/src/VISU_I/VISU_Result_i.hh @@ -1,18 +1,35 @@ -// File: VISU_Result_i.hh -// Created: Fri Jan 10 12:36:38 2003 -// Author: Alexey PETROV -// +// VISU OBJECT : interactive object for VISU entities implementation +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// File : VISU_Result_i.hh +// Author : Alexey PETROV +// Module : VISU #ifndef __VISU_RESULT_I_H__ #define __VISU_RESULT_I_H__ #include "VISUConfig.hh" -class vtkUnstructuredGridReader; -class vtkUnstructuredGrid; class VISU_Convertor; -class FieldInfo; -class QAD_Study; namespace VISU{ class Result_i : public virtual POA_VISU::Result, @@ -24,32 +41,37 @@ namespace VISU{ Result_i(SALOMEDS::Study_ptr theStudy); virtual ~Result_i(); - virtual VISU::VISUType GetType() { return VISU::TRESULT;}; + virtual VISU::VISUType GetType() { return VISU::TRESULT;} + virtual CORBA::Boolean BuildAll(); - typedef VISU_Convertor InputType; - typedef vtkUnstructuredGridReader OutputType; + typedef VISU_Convertor TInput; + enum TSourceId {eRestoredComponent = -2, eRestoredFile = -1, eFile = 1, eComponent = 2}; private: - InputType *myInput; + TSourceId mySourceId; + TInput *myInput; + CORBA::Boolean myIsDone; string myName; QFileInfo myFileInfo; - int myIsRestored; protected: - virtual Storable* Build(); + virtual Storable* Build(SALOMEDS::SObject_ptr theSObject = SALOMEDS::SObject::_nil()) + throw (std::runtime_error&); public: virtual Storable* Create(const char* theFileName); + virtual Storable* Create(SALOMEDS::SObject_ptr theMedSObject); virtual Storable* Create(SALOME_MED::FIELD_ptr theField); - virtual Storable* Create(SALOME_MED::MESH_ptr theMesh); - virtual Storable* Create(SALOME_MED::SUPPORT_ptr theSupport); virtual Storable* Restore(SALOMEDS::SObject_ptr theSObject, - const string& thePrefix, const Storable::TRestoringMap& theMap) + const Storable::TRestoringMap& theMap, const string& thePrefix) throw(std::logic_error&); - virtual void ToStream(ostrstream& theStr); + static Storable* Restore(SALOMEDS::SObject_ptr theSObject, + const string& thePrefix, const Storable::TRestoringMap& theMap) + throw(std::logic_error&); + virtual void ToStream(std::ostringstream& theStr); virtual const char* GetComment() const; static const string myComment; - InputType* GetInput() { return myInput;} - const char* GetName() const { return myName.c_str();} + TInput* GetInput(); + const string& GetName() const { return myName;} const QFileInfo& GetFileInfo() const { return myFileInfo;} - int IsRestored() const { return myIsRestored;} + Result_i::TSourceId GetSourceId() const { return mySourceId;} private: SALOMEDS::SObject_var mySObject; SALOMEDS::Study_var myStudyDocument; @@ -61,11 +83,6 @@ namespace VISU{ const SALOMEDS::Study_var& GetStudyDocument() const; const SALOMEDS::SComponent_var& GetSComponent() const; }; - Storable* ResultRestore(SALOMEDS::SObject_ptr theSObject, - const string& thePrefix, const Storable::TRestoringMap& theMap) - throw(std::logic_error&); Result_var FindResult(SALOMEDS::SObject_ptr theSObject); - QString GenerateName(const string& theFmt, int theId); - void WriteToFile(vtkUnstructuredGrid* theDataSet, const string& theFileName); } #endif