#include <Standard_Type.hxx>
#include <TDataStd_Integer.hxx>
#include <TDF_Attribute.hxx>
+#include <BinMDataStd.hxx>
IMPLEMENT_STANDARD_RTTIEXT(BinMDataStd_IntegerDriver,BinMDF_ADriver)
Standard_Boolean ok = theSource >> aValue;
if (ok)
anAtt->Set(aValue);
+ if(BinMDataStd::DocumentVersion() > 8) { // process user defined guid
+ const Standard_Integer& aPos = theSource.Position();
+ Standard_GUID aGuid;
+ ok = theSource >> aGuid;
+ if (!ok) {
+ theSource.SetPosition(aPos);
+ anAtt->SetID(TDataStd_Integer::GetID());
+ ok = Standard_True;
+ } else {
+ anAtt->SetID(aGuid);
+ }
+ } else
+ anAtt->SetID(TDataStd_Integer::GetID());
return ok;
}
{
Handle(TDataStd_Integer) anAtt = Handle(TDataStd_Integer)::DownCast(theSource);
theTarget << anAtt->Get();
+ // process user defined guid
+ if(anAtt->ID() != TDataStd_Integer::GetID())
+ theTarget << anAtt->ID();
}