973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
7fd59977 |
14 | |
42cf5bc1 |
15 | #include <Standard_Type.hxx> |
16 | #include <StepBasic_DimensionalExponents.hxx> |
17 | #include <StepBasic_MassUnit.hxx> |
18 | #include <StepBasic_SiUnit.hxx> |
19 | #include <StepBasic_SiUnitAndMassUnit.hxx> |
7fd59977 |
20 | |
92efcf78 |
21 | IMPLEMENT_STANDARD_RTTIEXT(StepBasic_SiUnitAndMassUnit,StepBasic_SiUnit) |
22 | |
7fd59977 |
23 | //======================================================================= |
24 | //function : StepBasic_SiUnitAndLengthUnit |
25 | //purpose : |
26 | //======================================================================= |
7fd59977 |
27 | StepBasic_SiUnitAndMassUnit::StepBasic_SiUnitAndMassUnit () |
28 | { |
29 | } |
30 | |
31 | |
7fd59977 |
32 | //======================================================================= |
33 | //function : Init |
34 | //purpose : |
35 | //======================================================================= |
36 | |
37 | void StepBasic_SiUnitAndMassUnit::Init(const Standard_Boolean hasAprefix, |
38 | const StepBasic_SiPrefix aPrefix, |
39 | const StepBasic_SiUnitName aName) |
40 | { |
41 | // --- classe inherited fields --- |
42 | // --- ANDOR componant fields --- |
43 | massUnit = new StepBasic_MassUnit(); |
44 | Handle(StepBasic_DimensionalExponents) aDimensions; |
45 | aDimensions.Nullify(); |
46 | massUnit->Init(aDimensions); |
47 | |
48 | // --- ANDOR componant fields --- |
49 | StepBasic_SiUnit::Init(hasAprefix, aPrefix, aName); |
50 | } |
51 | |
52 | |
53 | //======================================================================= |
54 | //function : SetMassUnit |
55 | //purpose : |
56 | //======================================================================= |
57 | |
58 | void StepBasic_SiUnitAndMassUnit::SetMassUnit(const Handle(StepBasic_MassUnit)& aMassUnit) |
59 | { |
60 | massUnit = aMassUnit; |
61 | } |
62 | |
63 | |
64 | //======================================================================= |
65 | //function : MassUnit |
66 | //purpose : |
67 | //======================================================================= |
68 | |
69 | Handle(StepBasic_MassUnit) StepBasic_SiUnitAndMassUnit::MassUnit() const |
70 | { |
71 | return massUnit; |
72 | } |
73 | |
74 | |