-// File: Units_UnitsSystem.cxx
-// Created: Fri Oct 22 11:44:42 1993
-// Author: Gilles DEBARBOUILLE
-// <gde@meteox>
+// Created on: 1993-10-22
+// Created by: Gilles DEBARBOUILLE
+// Copyright (c) 1993-1999 Matra Datavision
+// 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.
-#define PRO8619 //GG_160697
// Convertir correctement les unites translatees
#include <Units_UnitsSystem.ixx>
}
Handle(Units_Token) token = unitsentence.Evaluate();
-#ifdef PRO8619
if( token->IsKind(STANDARD_TYPE(Units_ShiftedToken)) ) {
Handle(Units_ShiftedToken) stoken =
Handle(Units_ShiftedToken)::DownCast(token) ;
unit = sunit = new Units_ShiftedUnit(aunit,aunit);
sunit->Value(stoken->Value());
sunit->Move(stoken->Move());
- } else
-#endif
- {
+ } else {
unit = new Units_Unit(aunit,aunit);
unit->Value(token->Value());
}
if(index2)
return unitssequence->Value(index2)->SymbolsSequence()->Value(1)->String();
else {
+#ifdef OCCT_DEBUG
cout<<" Pas d'unite active pour "<<aquantity<<endl;
+#endif
return TCollection_AsciiString() ;
}
}
if(activeunit) {
unitssequence = quantity->Sequence();
unit = unitssequence->Value(activeunit);
-#ifdef PRO8619
if( unit->IsKind(STANDARD_TYPE(Units_ShiftedUnit)) ) {
sunit = Handle(Units_ShiftedUnit)::DownCast(unit) ;
uvalue = sunit->Value();
return avalue/uvalue - umove;
}
else
-#endif
{
uvalue = unit->Value();
return avalue/uvalue;
if(activeunit) {
unitssequence = quantity->Sequence();
unit = unitssequence->Value(activeunit);
-#ifdef PRO8619
if( unit->IsKind(STANDARD_TYPE(Units_ShiftedUnit)) ) {
sunit = Handle(Units_ShiftedUnit)::DownCast(unit) ;
uvalue = sunit->Value();
umove = sunit->Move();
return avalue*(uvalue + umove);
} else
-#endif
{
uvalue = unit->Value();
return avalue*uvalue;
void Units_UnitsSystem::Dump() const
{
Handle(Standard_Transient) transient = This();
- Handle(Units_UnitsSystem) unitssystem = *(Handle_Units_UnitsSystem*)&transient;
+ Handle(Units_UnitsSystem) unitssystem = Handle(Units_UnitsSystem)::DownCast (transient);
Units_Explorer explorer(unitssystem);
cout<<" UNITSSYSTEM : "<<endl;
for(; explorer.MoreQuantity(); explorer.NextQuantity()) {