1 // File: VISU_Table_i.hh
2 // Created: Thu Feb 13 17:24:49 2003
3 // Author: Vadim SANDLER
4 // <vsr@rolex.nnov.matra-dtv.fr>
6 #ifndef VISU_Table_i_HeaderFile
7 #define VISU_Table_i_HeaderFile
9 #include "VISU_PrsObject_i.hh"
10 #include <qstringlist.h>
11 #include "Plot2d_Curve.h"
14 //==============================================================================
15 class Table_i : public virtual POA_VISU::Table,
16 public virtual PrsObject_i
18 static int myNbPresent;
20 Table_i( const Table_i& );
22 Table_i( SALOMEDS::Study_ptr theStudy, const char* theObject );
24 virtual VISU::VISUType GetType() { return VISU::TTABLE;};
26 virtual void SetTitle( const char* theName ) { myTitle = theName; }
27 virtual char* GetTitle() { return CORBA::string_dup( myTitle.c_str() ); }
29 virtual void SetOrientation( VISU::Table::Orientation theOrientation ) { myOrientation = theOrientation; }
30 virtual VISU::Table::Orientation GetOrientation() { return myOrientation; }
32 virtual CORBA::Long GetNbRows();
33 virtual CORBA::Long GetNbColumns();
36 Storable* Build(int theRestoring);
39 VISU::Table::Orientation myOrientation;
44 virtual Storable* Create();
45 virtual Storable* Restore( const Storable::TRestoringMap& theMap )
46 throw(std::logic_error&);
47 virtual void ToStream( ostrstream& theStr );
48 static const string myComment;
49 virtual const char* GetComment() const;
50 virtual const char* GenerateName();
52 virtual char* GetObjectEntry() { return CORBA::string_dup( myObjectEntry.c_str() ); }
54 Storable* TableRestore(SALOMEDS::SObject_ptr theSObject,
55 const string& thePrefix, const Storable::TRestoringMap& theMap);
56 SALOMEDS::SObject_var ImportTables(const char* theFileName, SALOMEDS::Study_ptr theStudy);
58 //==============================================================================
59 class Curve_i : public virtual POA_VISU::Curve,
60 public virtual PrsObject_i
62 static int myNbPresent;
64 Curve_i( const Curve_i& );
66 Curve_i( SALOMEDS::Study_ptr theStudy, Table_i* theTable, CORBA::Long theHRow, CORBA::Long theVRow );
68 virtual VISU::VISUType GetType() { return VISU::TCURVE;};
70 virtual void SetTitle( const char* theName ) { myTitle = theName; myAuto = false; }
71 virtual char* GetTitle() { return CORBA::string_dup( myTitle.c_str() ); }
73 virtual void SetColor( const SALOMEDS::Color& theColor ) { myColor = theColor; myAuto = false; }
74 virtual SALOMEDS::Color GetColor() { return myColor; }
76 virtual void SetMarker( VISU::Curve::MarkerType theType ) { myMarker = theType; myAuto = false; }
77 virtual VISU::Curve::MarkerType GetMarker() { return myMarker; }
79 virtual void SetLine( VISU::Curve::LineType theType, CORBA::Long theWidth )
80 { myLine = theType; myLineWidth = theWidth; myAuto = false; }
81 virtual VISU::Curve::LineType GetLine() { return myLine; }
82 virtual CORBA::Long GetLineWidth() { return myLineWidth; }
85 Storable* Build(int theRestoring);
91 struct SALOMEDS::Color myColor;
92 VISU::Curve::MarkerType myMarker;
93 VISU::Curve::LineType myLine;
99 virtual Storable* Create();
100 virtual Storable* Restore( const Storable::TRestoringMap& theMap )
101 throw(std::logic_error&);
102 virtual void ToStream( ostrstream& theStr );
103 static const string myComment;
104 virtual const char* GetComment() const;
105 virtual const char* GenerateName();
106 virtual const char* GetTableID();
108 virtual CORBA::Boolean IsAuto() { return myAuto; }
109 virtual CORBA::Boolean IsValid();
110 virtual string GetHorTitle();
111 virtual string GetVerTitle();
112 virtual string GetHorUnits();
113 virtual string GetVerUnits();
114 virtual int GetData( double*& theHorList, double*& theVerList );
116 virtual Plot2d_Curve* CreatePresentation();
118 Storable* CurveRestore(SALOMEDS::SObject_ptr theSObject,
119 const string& thePrefix, const Storable::TRestoringMap& theMap);
121 //==============================================================================
122 class Container_i : public virtual POA_VISU::Container,
123 public virtual PrsObject_i
125 static int myNbPresent;
127 Container_i( const Container_i& );
129 Container_i(SALOMEDS::Study_ptr theStudy);
130 virtual ~Container_i();
131 virtual VISU::VISUType GetType() { return VISU::TCONTAINER;};
133 virtual void AddCurve( Curve_ptr theCurve );
134 virtual void RemoveCurve( Curve_ptr theCurve );
136 virtual CORBA::Long GetNbCurves();
137 virtual void Clear();
140 Storable* Build(int theRestoring);
143 QStringList myCurves;
146 virtual Storable* Create();
147 virtual Storable* Restore( const Storable::TRestoringMap& theMap )
148 throw(std::logic_error&);
149 virtual void ToStream( ostrstream& theStr );
150 static const string myComment;
151 virtual const char* GetComment() const;
152 virtual const char* GenerateName();
155 VISU::Curve_i* GetCurve( CORBA::Long theIndex );
158 Storable* ContainerRestore(SALOMEDS::SObject_ptr theSObject,
159 const string& thePrefix, const Storable::TRestoringMap& theMap);
161 #endif // (#ifndef VISU_Table_i_HeaderFile)