0027772: Foundation Classes - define Standard_Boolean using C++ type "bool" instead...
[occt.git] / src / XmlMDataStd / XmlMDataStd_IntegerArrayDriver.cxx
index cd0e1ec..09aa5f4 100644 (file)
 
 //AGV 150202: Changed prototype XmlObjMgt::SetStringValue()
 
-#include <XmlMDataStd_IntegerArrayDriver.ixx>
-#include <TDataStd_IntegerArray.hxx>
+#include <CDM_MessageDriver.hxx>
 #include <NCollection_LocalArray.hxx>
-#include <XmlObjMgt.hxx>
+#include <Standard_Type.hxx>
+#include <TDataStd_IntegerArray.hxx>
+#include <TDF_Attribute.hxx>
 #include <XmlMDataStd.hxx>
+#include <XmlMDataStd_IntegerArrayDriver.hxx>
+#include <XmlObjMgt.hxx>
+#include <XmlObjMgt_Persistent.hxx>
 
+IMPLEMENT_STANDARD_RTTIEXT(XmlMDataStd_IntegerArrayDriver,XmlMDF_ADriver)
 IMPLEMENT_DOMSTRING (FirstIndexString, "first")
 IMPLEMENT_DOMSTRING (LastIndexString,  "last")
 IMPLEMENT_DOMSTRING (IsDeltaOn,        "delta")
@@ -126,7 +131,7 @@ Standard_Boolean XmlMDataStd_IntegerArrayDriver::Paste
        return Standard_False;
       } 
     else
-      aDelta = (Standard_Boolean)aDeltaValue;
+      aDelta = aDeltaValue != 0;
   }
 #ifdef OCCT_DEBUG
   else if(XmlMDataStd::DocumentVersion() == -1)
@@ -155,7 +160,7 @@ void XmlMDataStd_IntegerArrayDriver::Paste
   if (aL != 1) 
     theTarget.Element().setAttribute(::FirstIndexString(), aL);
   theTarget.Element().setAttribute(::LastIndexString(), anU);
-  theTarget.Element().setAttribute(::IsDeltaOn(), anIntArray->GetDelta());
+  theTarget.Element().setAttribute(::IsDeltaOn(), anIntArray->GetDelta() ? 1 : 0);
 
   // Allocation of 12 chars for each integer including the space.
   // An example: -2 147 483 648