Salome HOME
Compiler errors on gcc 3.4.1 corrected:
[modules/visu.git] / src / VISU_I / VISU_Table_i.hh
index 2618e5cee49b74586b4a0a7e8ef180c33230bfad..3be6d910e20ced5cf074b6785b54a060ba3893ab 100644 (file)
 #define VISU_Table_i_HeaderFile
 
 #include "VISU_PrsObject_i.hh"
-#include "Plot2d_Curve.h"
 
 #include <qstringlist.h>
 
+class SPlot2d_Curve;
+
 namespace VISU{
   //==============================================================================
   class Table_i : public virtual POA_VISU::Table,
@@ -54,31 +55,34 @@ namespace VISU{
     virtual CORBA::Long GetNbRows();
     virtual CORBA::Long GetNbColumns();
 
+    virtual void RemoveFromStudy();
+
   protected:
     Storable* Build(int theRestoring);
 
   protected:
     VISU::Table::Orientation myOrientation;
-    string myTitle;
-    string myObjectEntry;
+    std::string myTitle;
+    SALOMEDS::SObject_var mySObj;
 
   public:
     virtual Storable* Create();
-    virtual Storable* Restore( const Storable::TRestoringMap& theMap )
-      throw(std::logic_error&);
+    SALOMEDS::SObject_var GetSObject() const { return mySObj;}
+
+    virtual Storable* Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr SO);
     static Storable* Restore(SALOMEDS::SObject_ptr theSObject, 
-                            const string& thePrefix, const Storable::TRestoringMap& theMap)
-      throw(std::logic_error&);
+                            const std::string& thePrefix, 
+                            const Storable::TRestoringMap& theMap);
     virtual void ToStream( std::ostringstream& theStr );
-    static const string myComment;
+    static const std::string myComment;
     virtual const char* GetComment() const;
     virtual const char* GenerateName();
     virtual const char* GetTableTitle();
 
-    virtual char* GetObjectEntry() { return CORBA::string_dup( myObjectEntry.c_str() ); }
+    virtual char* GetObjectEntry() { return CORBA::string_dup( mySObj->GetID() ); }
   };
   SALOMEDS::SObject_var ImportTables(const char* theFileName, SALOMEDS::Study_ptr theStudy);
-
+  bool ExportTableToFile(SALOMEDS::SObject_ptr theTable, const char* theFileName);
   //==============================================================================
   class Curve_i : public virtual POA_VISU::Curve,
                   public virtual PrsObject_i
@@ -105,6 +109,8 @@ namespace VISU{
     virtual VISU::Curve::LineType GetLine() { return myLine; }
     virtual CORBA::Long GetLineWidth() { return myLineWidth; }
 
+    virtual void RemoveFromStudy();
+
   protected:
     Storable* Build(int theRestoring);
 
@@ -116,31 +122,37 @@ namespace VISU{
     VISU::Curve::MarkerType myMarker;
     VISU::Curve::LineType   myLine;
     int                     myLineWidth;
-    string                  myTitle;
+    std::string             myTitle;
     bool                    myAuto;
+    SALOMEDS::SObject_var   mySObj;
 
   public:
     virtual Storable* Create();
-    virtual Storable* Restore( const Storable::TRestoringMap& theMap )
-      throw(std::logic_error&);
+
+    int GetHRow() const { return myHRow;}
+    int GetVRow() const { return myVRow;}
+
+    virtual Storable* Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr theSO);
+
     static Storable* Restore(SALOMEDS::SObject_ptr theSObject, 
-                            const string& thePrefix, const Storable::TRestoringMap& theMap)
-      throw(std::logic_error&);
+                            const std::string& thePrefix, 
+                            const Storable::TRestoringMap& theMap);
+
     virtual void ToStream( std::ostringstream& theStr );
-    static const string myComment;
+    static const std::string myComment;
     virtual const char* GetComment() const;
     virtual const char* GenerateName();
     virtual const char* GetTableID();
 
     virtual CORBA::Boolean IsAuto() { return myAuto; }
     virtual CORBA::Boolean IsValid();
-    virtual string GetHorTitle();
-    virtual string GetVerTitle();
-    virtual string GetHorUnits();
-    virtual string GetVerUnits();
+    virtual std::string GetHorTitle();
+    virtual std::string GetVerTitle();
+    virtual std::string GetHorUnits();
+    virtual std::string GetVerUnits();
     virtual int    GetData( double*& theHorList, double*& theVerList );
 
-    virtual Plot2d_Curve* CreatePresentation();
+    virtual SPlot2d_Curve* CreatePresentation();
   };
 
   //==============================================================================
@@ -161,21 +173,25 @@ namespace VISU{
     virtual CORBA::Long GetNbCurves();
     virtual void Clear();
 
+    virtual void RemoveFromStudy();
+
   protected:
     Storable* Build(int theRestoring);
     
   protected:
     QStringList myCurves;
-    
+    SALOMEDS::SObject_var mySObj;
+        
   public:
     virtual Storable* Create();
-    virtual Storable* Restore( const Storable::TRestoringMap& theMap )
-      throw(std::logic_error&);
+    virtual Storable* Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr SO );
+
     static Storable* Restore(SALOMEDS::SObject_ptr theSObject, 
-                            const string& thePrefix, const Storable::TRestoringMap& theMap)
-      throw(std::logic_error&);
+                            const std::string& thePrefix, 
+                            const Storable::TRestoringMap& theMap);
+
     virtual void ToStream( std::ostringstream& theStr );
-    static const string myComment;
+    static const std::string myComment;
     virtual const char* GetComment() const;
     virtual const char* GenerateName();