mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-06-13 19:04:10 +08:00
0027970: Improvement of standard attributes usability - containers.
This commit is contained in:
@@ -83,14 +83,16 @@ Standard_Boolean BinMDataStd_ExtStringArrayDriver::Paste
|
||||
Standard_Boolean aDelta(Standard_False);
|
||||
if(BinMDataStd::DocumentVersion() > 2) {
|
||||
Standard_Byte aDeltaValue;
|
||||
if (! (theSource >> aDeltaValue)) {
|
||||
return Standard_False;
|
||||
}
|
||||
if (! (theSource >> aDeltaValue)) {
|
||||
return Standard_False;
|
||||
}
|
||||
else
|
||||
aDelta = (aDeltaValue != 0);
|
||||
}
|
||||
aDelta = (aDeltaValue != 0);
|
||||
}
|
||||
anAtt->SetDelta(aDelta);
|
||||
}
|
||||
|
||||
BinMDataStd::SetAttributeID(theSource, anAtt);
|
||||
return ok;
|
||||
}
|
||||
|
||||
@@ -104,7 +106,7 @@ void BinMDataStd_ExtStringArrayDriver::Paste
|
||||
BinObjMgt_Persistent& theTarget,
|
||||
BinObjMgt_SRelocationTable& ) const
|
||||
{
|
||||
Handle(TDataStd_ExtStringArray) anAtt =
|
||||
const Handle(TDataStd_ExtStringArray) anAtt =
|
||||
Handle(TDataStd_ExtStringArray)::DownCast(theSource);
|
||||
const TColStd_Array1OfExtendedString& aSourceArray = anAtt->Array()->Array1();
|
||||
const Standard_Integer aFirstInd = aSourceArray.Lower();
|
||||
@@ -114,4 +116,8 @@ void BinMDataStd_ExtStringArrayDriver::Paste
|
||||
theTarget << anAtt->Value( i );
|
||||
|
||||
theTarget << (Standard_Byte)(anAtt->GetDelta() ? 1 : 0);
|
||||
|
||||
// process user defined guid
|
||||
if(anAtt->ID() != TDataStd_ExtStringArray::GetID())
|
||||
theTarget << anAtt->ID();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user