// Created on: 2001-07-09
// Created by: Julia DOROVSKIKH
-// Copyright (c) 2001-2012 OPEN CASCADE SAS
+// Copyright (c) 2001-2014 OPEN CASCADE SAS
//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
+// This file is part of Open CASCADE Technology software library.
//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
-#include <XmlMDF.ixx>
+#include <CDM_MessageDriver.hxx>
+#include <Storage_Schema.hxx>
+#include <TColStd_MapOfTransient.hxx>
+#include <TDF_Attribute.hxx>
+#include <TDF_AttributeIterator.hxx>
+#include <TDF_ChildIterator.hxx>
+#include <TDF_Data.hxx>
+#include <TDF_Label.hxx>
+#include <TDF_TagSource.hxx>
+#include <TDF_Tool.hxx>
+#include <XmlMDF.hxx>
#include <XmlMDF_ADriver.hxx>
-#include <XmlMDF_TagSourceDriver.hxx>
-#include <XmlMDF_ReferenceDriver.hxx>
+#include <XmlMDF_ADriverTable.hxx>
#include <XmlMDF_DataMapIteratorOfTypeADriverMap.hxx>
-
-#include <XmlObjMgt_Persistent.hxx>
-#include <XmlObjMgt_DOMString.hxx>
+#include <XmlMDF_ReferenceDriver.hxx>
+#include <XmlMDF_TagSourceDriver.hxx>
#include <XmlObjMgt_Document.hxx>
-
-#include <TDF_TagSource.hxx>
-#include <TDF_Label.hxx>
-#include <TDF_Tool.hxx>
-#include <TDF_AttributeIterator.hxx>
-#include <TDF_ChildIterator.hxx>
-#include <TColStd_MapOfTransient.hxx>
-#include <Storage_Schema.hxx>
+#include <XmlObjMgt_DOMString.hxx>
+#include <XmlObjMgt_Persistent.hxx>
+#include <XmlLDrivers.hxx>
IMPLEMENT_DOMSTRING (TagString, "tag")
IMPLEMENT_DOMSTRING (LabelString, "label")
// Create DOM data item
XmlObjMgt_Persistent pAtt;
- pAtt.CreateElement (aLabElem, aDriver->TypeName().ToCString(), anId);
+ // In the document version 8 the attribute TPrsStd_AISPresentation
+ // was replaced by TDataXtd_Presentation. Therefore, for old versions
+ // we write old name of the attribute (TPrsStd_AISPresentation).
+ Standard_CString typeName = aDriver->TypeName().ToCString();
+ if (XmlLDrivers::StorageVersion() < 8 &&
+ strcmp(typeName, "TDataXtd_Presentation") == 0)
+ {
+ typeName = "TPrsStd_AISPresentation";
+ }
+ pAtt.CreateElement (aLabElem, typeName, anId);
// Paste
aDriver -> Paste (tAtt, pAtt, theRelocTable);
}
-#ifdef DEB
+#ifdef OCCT_DEBUG
else if (!UnsuppTypesMap().Contains (aType))
{
cout << "attribute driver for type "<< aType -> Name()<< " not found"<< endl;
#ifdef DATATYPE_MIGRATION
TCollection_AsciiString newName;
if(Storage_Schema::CheckTypeMigration(aName, newName)) {
-#ifdef DATATYPE_MIGRATION_DEB
+#ifdef OCCT_DEBUG
cout << "CheckTypeMigration:OldType = " <<aName.GetString() << " Len = "<<strlen(aName.GetString())<<endl;
cout << "CheckTypeMigration:NewType = " <<newName << " Len = "<< newName.Length()<<endl;
#endif
else if (isBound == Standard_False)
theRelocTable.Bind (anID, tAtt);
}
-#ifdef DEB
+#ifdef OCCT_DEBUG
else
{
const TCollection_AsciiString anAsciiName = aName;