Salome HOME
Moved some functionality to VTKViewer_Utilities.h
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_TableOfRealAttribute.cxx
index 13646bf2c5a7bbaa605a98f464aaac12f93be519..f234fca979d1e4a90d35756b0e1f8e1049fa94b8 100644 (file)
@@ -1,11 +1,12 @@
-using namespace std;
-//  File      : SALOMEDS_TableOfRealAttribute.cxx
-//  Created   : Tue Oct  8 10:13:30 2002
-//  Author    : Michael Ponikarov
-//  Project   : SALOME
-//  Module    : SALOMEDS
-//  Copyright : Open CASCADE
-//  Modified by: Sergey Ruin 
+//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+//
+//  Copyright (C) 2003  CEA/DEN, EDF R&D
+//
+//
+//
+//  File   : SALOMEDS_TableOfRealAttribute.cxx
+//  Author : Michael Ponikarov
+//  Module : SALOME
 //  $Header$
 
 #include <SALOMEDS_TableOfRealAttribute.ixx>
@@ -14,6 +15,7 @@ using namespace std;
 
 #include <string>
 #include <stdio.h>
+using namespace std;
 
 const Standard_GUID& SALOMEDS_TableOfRealAttribute::GetID() 
 {
@@ -230,11 +232,11 @@ void SALOMEDS_TableOfRealAttribute::Restore(const Handle(TDF_Attribute)& with)
   myNbColumns = aTable->myNbColumns;
   myTitle = aTable->myTitle;
   
-  for(anIndex = 1; anIndex <= aTable->GetNbRows();anIndex++) {
-    SetRowTitle(anIndex,aTable->GetRowTitle(anIndex));
-  }
+  for(anIndex = 1; anIndex <= aTable->GetNbRows();anIndex++)
+    myRows->Append(aTable->GetRowTitle(anIndex));
+
   for(anIndex = 1; anIndex <= aTable->GetNbColumns(); anIndex++) 
-    SetColumnTitle(anIndex, aTable->GetColumnTitle(anIndex));
+    myCols->Append(aTable->GetColumnTitle(anIndex));
 }
 
 Handle(TDF_Attribute) SALOMEDS_TableOfRealAttribute::NewEmpty() const
@@ -257,11 +259,10 @@ void SALOMEDS_TableOfRealAttribute::Paste(const Handle(TDF_Attribute)& into,
   aTable->myNbRows = myNbRows;
   aTable->myNbColumns = myNbColumns;
 
-  for(anIndex = 1; anIndex <= GetNbRows();anIndex++) {
-    aTable->SetRowTitle(anIndex,GetRowTitle(anIndex));
-  }
+  for(anIndex = 1; anIndex <= GetNbRows();anIndex++)
+    aTable->myRows->Append(GetRowTitle(anIndex));
   for(anIndex = 1; anIndex <= GetNbColumns(); anIndex++) 
-    aTable->SetColumnTitle(anIndex, GetColumnTitle(anIndex));
+    aTable->myCols->Append(GetColumnTitle(anIndex));
 }