1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
15 #include <Standard_Type.hxx>
16 #include <StepBasic_DimensionalExponents.hxx>
17 #include <StepBasic_SiUnit.hxx>
19 IMPLEMENT_STANDARD_RTTIEXT(StepBasic_SiUnit,StepBasic_NamedUnit)
21 StepBasic_SiUnit::StepBasic_SiUnit () {}
23 void StepBasic_SiUnit::Init(const Standard_Boolean hasAprefix,
24 const StepBasic_SiPrefix aPrefix,
25 const StepBasic_SiUnitName aName)
27 // --- classe own fields ---
28 hasPrefix = hasAprefix;
31 // --- classe inherited fields ---
32 Handle(StepBasic_DimensionalExponents) aDimensions;
33 aDimensions.Nullify();
34 StepBasic_NamedUnit::Init(aDimensions);
38 void StepBasic_SiUnit::SetPrefix(const StepBasic_SiPrefix aPrefix)
41 hasPrefix = Standard_True;
45 void StepBasic_SiUnit::UnSetPrefix()
47 hasPrefix = Standard_False;
51 StepBasic_SiPrefix StepBasic_SiUnit::Prefix() const
57 Standard_Boolean StepBasic_SiUnit::HasPrefix() const
63 void StepBasic_SiUnit::SetName(const StepBasic_SiUnitName aName)
69 StepBasic_SiUnitName StepBasic_SiUnit::Name() const
75 void StepBasic_SiUnit::SetDimensions(const Handle(StepBasic_DimensionalExponents)& /*aDimensions*/)
77 // WARNING : the field is redefined.
78 // field set up forbidden.
80 std::cout << "Field is redefined, SetUp Forbidden" << std::endl;
85 Handle(StepBasic_DimensionalExponents) StepBasic_SiUnit::Dimensions() const
87 // WARNING : the field is redefined.
88 // method body is not yet automaticly wrote
90 // attention : dimensional exponent retourne incorrect (pointeur NULL).
91 // on devrait, en fonction du nom de l unite SI, construire un dimensional
92 // exponents coherent. (du style .METRE. => (1,0,0,0,0,0) ... )
94 Handle(StepBasic_DimensionalExponents) aDimensions;
95 aDimensions.Nullify();