0027241: Create a complete test case to verify reading of all attribute types from...
[occt.git] / src / StdLPersistent / StdLPersistent_HString.cxx
index 04000c4..98e5d83 100644 (file)
@@ -25,20 +25,18 @@ template <class StringClass, typename CharType>
 void StdLPersistent_HString::instance<StringClass, CharType>::Read
   (StdObjMgt_ReadData& theReadData)
 {
-  theReadData.Driver().BeginReadObjectData();
+  StdObjMgt_ReadData::Object anObjectData (theReadData);
 
   Standard_Integer aSize;
-  theReadData.ReadValue (aSize);
+  anObjectData >> aSize;
   myValue = new StringClass (aSize, 0);
 
   for (Standard_Integer i = 1; i <= aSize; i++)
   {
     CharType aChar;
-    theReadData.ReadValue (aChar);
+    anObjectData >> aChar;
     myValue->SetValue (i, aChar);
   }
-
-  theReadData.Driver().EndReadObjectData();
 }
 
 //=======================================================================