0029402: In OCCT7.2.1-dev the names written into a FSD_File are associated with the...
[occt.git] / src / StdStorage / StdStorage_RootData.cxx
index ad2b112..100cb18 100644 (file)
@@ -66,7 +66,7 @@ Standard_Boolean StdStorage_RootData::Read(Storage_BaseDriver& theDriver)
     }
 
     Handle(StdStorage_Root) aRoot = new StdStorage_Root(aRootName, aRef, aTypeName);
-    myObjects.Bind(aRootName, aRoot);
+    myObjects.Add(aRootName, aRoot);
   }
 
   myErrorStatus = theDriver.EndReadRootSection();
@@ -132,7 +132,7 @@ Standard_Integer StdStorage_RootData::NumberOfRoots() const
 
 void StdStorage_RootData::AddRoot(const Handle(StdStorage_Root)& aRoot)
 {
-  myObjects.Bind(aRoot->Name(), aRoot);
+  myObjects.Add(aRoot->Name(), aRoot);
   aRoot->myRef = myObjects.Size();
 }
 
@@ -151,9 +151,8 @@ Handle(StdStorage_HSequenceOfRoots) StdStorage_RootData::Roots() const
 Handle(StdStorage_Root) StdStorage_RootData::Find(const TCollection_AsciiString& aName) const
 {
   Handle(StdStorage_Root) p;
-
-  if (myObjects.IsBound(aName)) {
-    p = myObjects.Find(aName);
+  if (myObjects.Contains(aName)) {
+    p = myObjects.FindFromKey(aName);
   }
 
   return p;
@@ -161,14 +160,14 @@ Handle(StdStorage_Root) StdStorage_RootData::Find(const TCollection_AsciiString&
 
 Standard_Boolean StdStorage_RootData::IsRoot(const TCollection_AsciiString& aName) const
 {
-  return myObjects.IsBound(aName);
+  return myObjects.Contains(aName);
 }
 
 void StdStorage_RootData::RemoveRoot(const TCollection_AsciiString& aName)
 {
-  if (myObjects.IsBound(aName)) {
-    myObjects.ChangeFind(aName)->myRef = 0;
-    myObjects.UnBind(aName);
+  if (myObjects.Contains(aName)) {
+    myObjects.ChangeFromKey(aName)->myRef = 0;
+    myObjects.RemoveKey(aName);
     Standard_Integer aRef = 1;
     for (StdStorage_MapOfRoots::Iterator anIt(myObjects); anIt.More(); anIt.Next(), ++aRef)
       anIt.ChangeValue()->myRef = aRef;