-// File: XmlObjMgt_GP.cxx
-// Created: 02.08.01 21:10:37
-// Author: Alexander GRIGORIEV
-// Copyright: Open Cascade 2001
-// History:
+// Created on: 2001-08-02
+// Created by: Alexander GRIGORIEV
+// Copyright (c) 2001-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// 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.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+
+#include <gp_Mat.hxx>
+#include <gp_Trsf.hxx>
+#include <gp_XYZ.hxx>
+#include <XmlObjMgt_GP.hxx>
-#include <XmlObjMgt_GP.ixx>
-#include <stdio.h>
#include <errno.h>
-
+#include <stdio.h>
static const char * Translate (const char * theStr, gp_Mat& M);
static const char * Translate (const char * theStr, gp_XYZ& P);
char buf [256];
XmlObjMgt_DOMString S1 (Translate(aTrsf.HVectorialPart())),
S2 (Translate(aTrsf.TranslationPart()));
- sprintf (buf, "%.17g %d %s %s", aTrsf.ScaleFactor(), aTrsf.Form(),
+ Sprintf (buf, "%.17g %d %s %s", aTrsf.ScaleFactor(), aTrsf.Form(),
S1.GetString(), S2.GetString());
return XmlObjMgt_DOMString (buf);
XmlObjMgt_DOMString S1 (Translate(aMat.Row(1))),
S2 (Translate(aMat.Row(2))),
S3 (Translate(aMat.Row(3)));
- sprintf (buf, "%s %s %s", S1.GetString(), S2.GetString(), S3.GetString());
+ Sprintf (buf, "%s %s %s", S1.GetString(), S2.GetString(), S3.GetString());
return XmlObjMgt_DOMString (buf);
}
XmlObjMgt_DOMString XmlObjMgt_GP::Translate (const gp_XYZ& anXYZ)
{
char buf [64];
- sprintf (buf, "%.17g %.17g %.17g", anXYZ.X(), anXYZ.Y(), anXYZ.Z());
+ Sprintf (buf, "%.17g %.17g %.17g", anXYZ.X(), anXYZ.Y(), anXYZ.Z());
return XmlObjMgt_DOMString (buf);
}
const char * aStr = theStr.GetString();
char * ptr;
errno = 0;
- Standard_Real aScaleFactor = Standard_Real(strtod (aStr, &ptr));
+ Standard_Real aScaleFactor = Standard_Real(Strtod (aStr, &ptr));
if (ptr != aStr && errno != ERANGE && errno != EINVAL)
{
- T._CSFDB_Setgp_Trsfscale(aScaleFactor);
+ T.SetScaleFactor(aScaleFactor);
aStr = ptr;
Standard_Integer aForm = Standard_Integer(strtol(aStr, &ptr, 10));
if (ptr != aStr && errno != ERANGE && errno != EINVAL) {
- T._CSFDB_Setgp_Trsfshape((gp_TrsfForm)aForm);
+ T.SetForm((gp_TrsfForm)aForm);
aStr = ptr;
// gp_Mat aMatr;
- aStr = ::Translate(aStr, (gp_Mat&)T._CSFDB_Getgp_Trsfmatrix());
+ aStr = ::Translate(aStr, (gp_Mat&)T.HVectorialPart());
if (aStr) {
// gp_XYZ aTransl;
- ::Translate(aStr, (gp_XYZ&)T._CSFDB_Getgp_Trsfloc());
+ ::Translate(aStr, (gp_XYZ&)T.TranslationPart());
aResult = Standard_True;
}
}
char * ptr;
if (theStr) {
errno = 0;
- Standard_Real aC = strtod (theStr, &ptr);
+ Standard_Real aC = Strtod (theStr, &ptr);
if (ptr != theStr && errno != ERANGE && errno != EINVAL) {
P.SetX(aC);
theStr = ptr;
- aC = strtod (theStr, &ptr);
+ aC = Strtod (theStr, &ptr);
if (ptr != theStr && errno != ERANGE && errno != EINVAL) {
P.SetY(aC);
theStr = ptr;
- aC = strtod (theStr, &ptr);
+ aC = Strtod (theStr, &ptr);
if (ptr != theStr && errno != ERANGE && errno != EINVAL) {
P.SetZ(aC);
theStr = ptr;