Salome HOME
Moved some functionality to VTKViewer_Utilities.h
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_TableOfIntegerAttribute.cxx
index b5f3e43cf26a7480721145240dcf9d9a7a84e55c..abe7171f80fbdb01dfea94694abd5e0422befaae 100644 (file)
@@ -1,11 +1,12 @@
-using namespace std;
-//  File      : SALOMEDS_TableOfIntegerAttribute.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_TableOfIntegerAttribute.cxx
+//  Author : Michael Ponikarov
+//  Module : SALOME
 //  $Header$
 
 #include <SALOMEDS_TableOfIntegerAttribute.ixx>
@@ -13,6 +14,7 @@ using namespace std;
 #include <TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx>
 
 #include <string>
+using namespace std;
 
 const Standard_GUID& SALOMEDS_TableOfIntegerAttribute::GetID() 
 {
@@ -229,11 +231,11 @@ void SALOMEDS_TableOfIntegerAttribute::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_TableOfIntegerAttribute::NewEmpty() const
@@ -256,11 +258,10 @@ void SALOMEDS_TableOfIntegerAttribute::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));
 }