Salome HOME
Merge from branch CCRT_Port_V220.
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_TableOfRealAttribute.cxx
index 4d6ae31c1c9aff560d106ab4f4550703c00b2030..f234fca979d1e4a90d35756b0e1f8e1049fa94b8 100644 (file)
@@ -9,13 +9,13 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include <SALOMEDS_TableOfRealAttribute.ixx>
 #include <Standard_Failure.hxx>
 #include <TColStd_DataMapIteratorOfDataMapOfIntegerReal.hxx>
 
 #include <string>
 #include <stdio.h>
+using namespace std;
 
 const Standard_GUID& SALOMEDS_TableOfRealAttribute::GetID() 
 {
@@ -232,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
@@ -259,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));
 }