-#include <StepSelect_FloatFormat.ixx>
-#include <Interface_FloatWriter.hxx>
-#include <stdio.h>
+// Copyright (c) 1999-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 <IFSelect_ContextWrite.hxx>
+#include <Interface_FloatWriter.hxx>
+#include <Standard_Type.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepSelect_FloatFormat.hxx>
+#include <TCollection_AsciiString.hxx>
+
+#include <stdio.h>
+IMPLEMENT_STANDARD_RTTIEXT(StepSelect_FloatFormat,StepSelect_FileModifier)
- StepSelect_FloatFormat::StepSelect_FloatFormat ()
+StepSelect_FloatFormat::StepSelect_FloatFormat ()
: thezerosup (Standard_True) , themainform ("%E") ,
theformrange ("%f") , therangemin (0.1) , therangemax (1000.)
{ }
} else {
char format[20];
char pourcent = '%'; char point = '.';
- sprintf(format, "%c%d%c%dE",pourcent,digits+2,point,digits);
+ Sprintf(format, "%c%d%c%dE",pourcent,digits+2,point,digits);
themainform.AssignCat (format);
- sprintf(format, "%c%d%c%df",pourcent,digits+2,point,digits);
+ Sprintf(format, "%c%d%c%df",pourcent,digits+2,point,digits);
theformrange.AssignCat (format);
}
therangemin = 0.1; therangemax = 1000.;
void StepSelect_FloatFormat::Perform
- (IFSelect_ContextWrite& ctx,
+ (IFSelect_ContextWrite& /*ctx*/,
StepData_StepWriter& writer) const
{
writer.FloatWriter().SetFormat (themainform.ToCString());
lab.AssignCat (themainform);
if (theformrange.Length() > 0) {
char mess[30];
- sprintf(mess,", in range %f %f %s",
+ Sprintf(mess,", in range %f %f %s",
therangemin,therangemax,theformrange.ToCString());
lab.AssignCat(mess);
}