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 int getNbPoints() const;
88 void setPointId( int thePointId );
89 int getPointId() const { return myPointId; }
91 void setComponentId( int theComponentId );
92 int getComponentId() const { return myComponentId; }
96 void setViewer( Plot2d_ViewFrame* theView ) { myView = theView; }
97 Plot2d_ViewFrame* getViewer() const { return myView; }
99 VISU::Result_i* getResult() const { return myResult; }
100 const VISU::PFieldImpl& getField() const { return myFieldImpl; }
102 std::string getFieldEntry() const { return myFieldEntry; }
103 std::string getEvolutionEntry() const { return myEvolutionEntry; }
104 std::string getMeshName() const { return myMeshName; }
105 VISU::TEntity getEntity() const { return myEntity; }
106 std::string getFieldName() const { return myFieldName; }
108 const VISU::TimeStampDataList& getTimeStampDataList() const { return myTimeStampDataList; }
109 const VISU::ComponentDataList& getComponentDataList() const { return myComponentDataList; }
111 void restoreFromStudy( SALOMEDS::SObject_ptr theObj );
112 void restoreFromStudy( _PTR(SObject) theObj );
115 bool extractData( int thePointId,
117 VISU::TimeStampValueList& theTimeStampValueList );
121 _PTR(SObject) myField;
126 Plot2d_ViewFrame* myView;
128 VISU::Result_i* myResult;
129 VISU::PFieldImpl myFieldImpl;
131 std::string myFieldEntry;
132 std::string myEvolutionEntry;
133 std::string myMeshName;
134 VISU::TEntity myEntity;
135 std::string myFieldName;
137 VISU::TimeStampDataList myTimeStampDataList;
138 VISU::ComponentDataList myComponentDataList;
142 class VISU_I_EXPORT VISU_Evolution_i: public virtual POA_VISU::Evolution,
143 public virtual VISU::Base_i
145 VISU_Evolution* myEngine;
147 VISU_Evolution_i( SALOMEDS::Study_ptr theStudy,
148 VISU::XYPlot_ptr theXYPlot = VISU::XYPlot::_nil() );
151 virtual VISU::VISUType GetType() { return VISU::TEVOLUTION; }
153 virtual bool setField(SALOMEDS::SObject_ptr theField);
155 virtual void setPointId(CORBA::Long thePointId);
157 virtual void setComponentId(CORBA::Long theComponentId);
159 virtual CORBA::Boolean showEvolution();
161 virtual void restoreFromStudy(SALOMEDS::SObject_ptr theField);
164 #endif //VISU_EVOLUTION_H