1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : VISU_Evolution.h
23 // Author : Oleg UVAROV
26 #ifndef VISU_EVOLUTION_H
27 #define VISU_EVOLUTION_H
29 #include "VISUConfig.hh"
31 #include <VISU_ConvertorDef_impl.hxx>
32 #include <SALOMEDSClient_Study.hxx>
42 class Plot2d_ViewFrame;
51 typedef QMap< vtkIdType, vtkFloatingPointType > Comp2Value;
52 typedef QMapIterator< vtkIdType, vtkFloatingPointType > Comp2ValueIterator;
54 typedef QMap< vtkIdType, Comp2Value > Elem2Comp2Value;
55 typedef QMapIterator< vtkIdType, Comp2Value > Elem2Comp2ValueIterator;
57 typedef QPair< double, std::string > TimeStampData;
58 typedef QList< TimeStampData > TimeStampDataList;
59 typedef QListIterator< TimeStampData > TimeStampDataListIterator;
61 typedef QPair< QString, QString > ComponentData;
62 typedef QList< ComponentData > ComponentDataList;
63 typedef QListIterator< ComponentData > ComponentDataListIterator;
65 typedef QList< vtkFloatingPointType > TimeStampValueList;
66 typedef QListIterator< vtkFloatingPointType > TimeStampValueListIterator;
69 class VISU_I_EXPORT VISU_Evolution
72 bool _showEvolution();
75 VISU_Evolution( _PTR(Study) theStudy,
76 VISU::XYPlot_ptr theXYPlot = VISU::XYPlot::_nil() );
79 virtual VISU::VISUType GetType() { return VISU::TNONE; }
81 _PTR(Study) getStudy() const { return myStudy; }
83 bool setField( _PTR(SObject) theField );
84 bool setField( SALOMEDS::SObject_ptr theField );
86 void setPointId( int thePointId );
87 int getPointId() const { return myPointId; }
89 void setComponentId( int theComponentId );
90 int getComponentId() const { return myComponentId; }
94 void setViewer( Plot2d_ViewFrame* theView ) { myView = theView; }
95 Plot2d_ViewFrame* getViewer() const { return myView; }
97 VISU::Result_i* getResult() const { return myResult; }
98 const VISU::PFieldImpl& getField() const { return myFieldImpl; }
100 std::string getFieldEntry() const { return myFieldEntry; }
101 std::string getEvolutionEntry() const { return myEvolutionEntry; }
102 std::string getMeshName() const { return myMeshName; }
103 VISU::TEntity getEntity() const { return myEntity; }
104 std::string getFieldName() const { return myFieldName; }
106 const VISU::TimeStampDataList& getTimeStampDataList() const { return myTimeStampDataList; }
107 const VISU::ComponentDataList& getComponentDataList() const { return myComponentDataList; }
109 void restoreFromStudy( SALOMEDS::SObject_ptr theObj );
110 void restoreFromStudy( _PTR(SObject) theObj );
113 bool extractData( int thePointId,
115 VISU::TimeStampValueList& theTimeStampValueList );
119 _PTR(SObject) myField;
124 Plot2d_ViewFrame* myView;
126 VISU::Result_i* myResult;
127 VISU::PFieldImpl myFieldImpl;
129 std::string myFieldEntry;
130 std::string myEvolutionEntry;
131 std::string myMeshName;
132 VISU::TEntity myEntity;
133 std::string myFieldName;
135 VISU::TimeStampDataList myTimeStampDataList;
136 VISU::ComponentDataList myComponentDataList;
140 class VISU_I_EXPORT VISU_Evolution_i: public virtual POA_VISU::Evolution,
141 public virtual VISU::Base_i
143 VISU_Evolution* myEngine;
145 VISU_Evolution_i( SALOMEDS::Study_ptr theStudy,
146 VISU::XYPlot_ptr theXYPlot = VISU::XYPlot::_nil() );
149 virtual VISU::VISUType GetType() { return VISU::TEVOLUTION; }
151 virtual bool setField(SALOMEDS::SObject_ptr theField);
153 virtual void setPointId(CORBA::Long thePointId);
155 virtual void setComponentId(CORBA::Long theComponentId);
157 virtual CORBA::Boolean showEvolution();
159 virtual void restoreFromStudy(SALOMEDS::SObject_ptr theField);
162 #endif //VISU_EVOLUTION_H