1 // Copyright (c) 1999-2012 OPEN CASCADE SAS
3 // The content of this file is subject to the Open CASCADE Technology Public
4 // License Version 6.5 (the "License"). You may not use the content of this file
5 // except in compliance with the License. Please obtain a copy of the License
6 // at http://www.opencascade.org and read it completely before using this file.
8 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11 // The Original Code and all software distributed under the License is
12 // distributed on an "AS IS" basis, without warranty of any kind, and the
13 // Initial Developer hereby disclaims all such warranties, including without
14 // limitation, any warranties of merchantability, fitness for a particular
15 // purpose or non-infringement. Please see the License for the specific terms
16 // and conditions governing the rights and limitations under the License.
18 #include <StepBasic_SiUnit.ixx>
21 StepBasic_SiUnit::StepBasic_SiUnit () {}
23 void StepBasic_SiUnit::Init(
24 const Handle(StepBasic_DimensionalExponents)& aDimensions)
26 StepBasic_NamedUnit::Init(aDimensions);
29 void StepBasic_SiUnit::Init(const Standard_Boolean hasAprefix,
30 const StepBasic_SiPrefix aPrefix,
31 const StepBasic_SiUnitName aName)
33 // --- classe own fields ---
34 hasPrefix = hasAprefix;
37 // --- classe inherited fields ---
38 Handle(StepBasic_DimensionalExponents) aDimensions;
39 aDimensions.Nullify();
40 StepBasic_NamedUnit::Init(aDimensions);
44 void StepBasic_SiUnit::SetPrefix(const StepBasic_SiPrefix aPrefix)
47 hasPrefix = Standard_True;
51 void StepBasic_SiUnit::UnSetPrefix()
53 hasPrefix = Standard_False;
57 StepBasic_SiPrefix StepBasic_SiUnit::Prefix() const
63 Standard_Boolean StepBasic_SiUnit::HasPrefix() const
69 void StepBasic_SiUnit::SetName(const StepBasic_SiUnitName aName)
75 StepBasic_SiUnitName StepBasic_SiUnit::Name() const
81 void StepBasic_SiUnit::SetDimensions(const Handle(StepBasic_DimensionalExponents)& /*aDimensions*/)
83 // WARNING : the field is redefined.
84 // field set up forbidden.
86 cout << "Field is redefined, SetUp Forbidden" << endl;
91 Handle(StepBasic_DimensionalExponents) StepBasic_SiUnit::Dimensions() const
93 // WARNING : the field is redefined.
94 // method body is not yet automaticly wrote
96 // attention : dimensional exponent retourne incorrect (pointeur NULL).
97 // on devrait, en fonction du nom de l unite SI, construire un dimensional
98 // exponents coherent. (du style .METRE. => (1,0,0,0,0,0) ... )
100 Handle(StepBasic_DimensionalExponents) aDimensions;
101 aDimensions.Nullify();