Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef VISU_EVOLUTION_H
00025 #define VISU_EVOLUTION_H
00026
00027 #include "VISUConfig.hh"
00028
00029 #include <VISU_ConvertorDef_impl.hxx>
00030 #include <SALOMEDSClient_Study.hxx>
00031
00032 #include <QList>
00033 #include <QMap>
00034 #include <QPair>
00035
00036 #include <vtkType.h>
00037
00038 #include <string>
00039
00040 class Plot2d_ViewFrame;
00041
00042 namespace VISU
00043 {
00044 class Result_i;
00045 };
00046
00047 namespace VISU
00048 {
00049 typedef QMap< vtkIdType, vtkFloatingPointType > Comp2Value;
00050 typedef QMapIterator< vtkIdType, vtkFloatingPointType > Comp2ValueIterator;
00051
00052 typedef QMap< vtkIdType, Comp2Value > Elem2Comp2Value;
00053 typedef QMapIterator< vtkIdType, Comp2Value > Elem2Comp2ValueIterator;
00054
00055 typedef QPair< double, std::string > TimeStampData;
00056 typedef QList< TimeStampData > TimeStampDataList;
00057 typedef QListIterator< TimeStampData > TimeStampDataListIterator;
00058
00059 typedef QPair< QString, QString > ComponentData;
00060 typedef QList< ComponentData > ComponentDataList;
00061 typedef QListIterator< ComponentData > ComponentDataListIterator;
00062
00063 typedef QList< vtkFloatingPointType > TimeStampValueList;
00064 typedef QListIterator< vtkFloatingPointType > TimeStampValueListIterator;
00065 };
00066
00067 class VISU_I_EXPORT VISU_Evolution
00068 {
00069 protected:
00070 bool _showEvolution();
00071
00072 public:
00073 VISU_Evolution( _PTR(Study) theStudy,
00074 VISU::XYPlot_ptr theXYPlot = VISU::XYPlot::_nil() );
00075 ~VISU_Evolution();
00076
00077 virtual VISU::VISUType GetType() { return VISU::TNONE; }
00078
00079 _PTR(Study) getStudy() const { return myStudy; }
00080
00081 bool setField( _PTR(SObject) theField );
00082 bool setField( SALOMEDS::SObject_ptr theField );
00083
00084 int getNbPoints() const;
00085
00086 void setPointId( int thePointId );
00087 int getPointId() const { return myPointId; }
00088
00089 void setComponentId( int theComponentId );
00090 int getComponentId() const { return myComponentId; }
00091
00092 bool showEvolution();
00093
00094 void setViewer( Plot2d_ViewFrame* theView ) { myView = theView; }
00095 Plot2d_ViewFrame* getViewer() const { return myView; }
00096
00097 VISU::Result_i* getResult() const { return myResult; }
00098 const VISU::PFieldImpl& getField() const { return myFieldImpl; }
00099
00100 std::string getFieldEntry() const { return myFieldEntry; }
00101 std::string getEvolutionEntry() const { return myEvolutionEntry; }
00102 std::string getMeshName() const { return myMeshName; }
00103 VISU::TEntity getEntity() const { return myEntity; }
00104 std::string getFieldName() const { return myFieldName; }
00105
00106 const VISU::TimeStampDataList& getTimeStampDataList() const { return myTimeStampDataList; }
00107 const VISU::ComponentDataList& getComponentDataList() const { return myComponentDataList; }
00108
00109 void restoreFromStudy( SALOMEDS::SObject_ptr theObj );
00110 void restoreFromStudy( _PTR(SObject) theObj );
00111
00112 private:
00113 bool extractData( int thePointId,
00114 int theComponentId,
00115 VISU::TimeStampValueList& theTimeStampValueList );
00116
00117 private:
00118 _PTR(Study) myStudy;
00119 _PTR(SObject) myField;
00120
00121 int myPointId;
00122 int myComponentId;
00123
00124 Plot2d_ViewFrame* myView;
00125
00126 VISU::Result_i* myResult;
00127 VISU::PFieldImpl myFieldImpl;
00128
00129 std::string myFieldEntry;
00130 std::string myEvolutionEntry;
00131 std::string myMeshName;
00132 VISU::TEntity myEntity;
00133 std::string myFieldName;
00134
00135 VISU::TimeStampDataList myTimeStampDataList;
00136 VISU::ComponentDataList myComponentDataList;
00137 };
00138
00139
00140 class VISU_I_EXPORT VISU_Evolution_i: public virtual POA_VISU::Evolution,
00141 public virtual VISU::Base_i
00142 {
00143 VISU_Evolution* myEngine;
00144 public:
00145 VISU_Evolution_i( SALOMEDS::Study_ptr theStudy,
00146 VISU::XYPlot_ptr theXYPlot = VISU::XYPlot::_nil() );
00147 ~VISU_Evolution_i();
00148
00149 virtual VISU::VISUType GetType() { return VISU::TEVOLUTION; }
00150
00151 virtual bool setField(SALOMEDS::SObject_ptr theField);
00152
00153 virtual void setPointId(CORBA::Long thePointId);
00154
00155 virtual void setComponentId(CORBA::Long theComponentId);
00156
00157 virtual CORBA::Boolean showEvolution();
00158
00159 virtual void restoreFromStudy(SALOMEDS::SObject_ptr theField);
00160 };
00161
00162 #endif //VISU_EVOLUTION_H