28a73c1f |
1 | // Created on: 2015-07-22 |
2 | // Created by: Irina KRYLOVA |
3 | // Copyright (c) 2015 OPEN CASCADE SAS |
4 | // |
5 | // This file is part of Open CASCADE Technology software library. |
6 | // |
7 | // This library is free software; you can redistribute it and/or modify it under |
8 | // the terms of the GNU Lesser General Public License version 2.1 as published |
9 | // by the Free Software Foundation, with special exception defined in the file |
10 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | // distribution for complete text of the license and disclaimer of any warranty. |
12 | // |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
15 | |
16 | |
17 | #include <Standard_Type.hxx> |
18 | #include <StepBasic_MeasureWithUnit.hxx> |
19 | #include <StepRepr_MeasureRepresentationItem.hxx> |
20 | #include <StepRepr_RepresentationItem.hxx> |
21 | #include <StepRepr_ReprItemAndMeasureWithUnit.hxx> |
22 | |
23 | //======================================================================= |
24 | //function : StepRepr_ReprItemAndMeasureWithUnit |
25 | //purpose : |
26 | //======================================================================= |
27 | StepRepr_ReprItemAndMeasureWithUnit::StepRepr_ReprItemAndMeasureWithUnit() |
28 | { |
29 | myMeasureWithUnit = new StepBasic_MeasureWithUnit(); |
30 | myMeasureRepresentationItem = new StepRepr_MeasureRepresentationItem(); |
31 | } |
32 | |
33 | |
34 | //======================================================================= |
35 | //function : Init |
36 | //purpose : |
37 | //======================================================================= |
38 | |
39 | void StepRepr_ReprItemAndMeasureWithUnit::Init |
40 | (const Handle(StepBasic_MeasureWithUnit)& aMWU, |
41 | const Handle(StepRepr_RepresentationItem)& aRI) |
42 | { |
43 | myMeasureWithUnit = aMWU; |
44 | SetName(aRI->Name()); |
45 | } |
46 | |
47 | //======================================================================= |
48 | //function : GetMeasureRepresentationItem |
49 | //purpose : |
50 | //======================================================================= |
51 | |
52 | Handle(StepRepr_MeasureRepresentationItem) StepRepr_ReprItemAndMeasureWithUnit:: |
53 | GetMeasureRepresentationItem() const |
54 | { |
55 | return myMeasureRepresentationItem; |
56 | } |
57 | |
58 | |
59 | //======================================================================= |
60 | //function : SetMeasureWithUnit |
61 | //purpose : |
62 | //======================================================================= |
63 | |
64 | void StepRepr_ReprItemAndMeasureWithUnit::SetMeasureWithUnit |
65 | (const Handle(StepBasic_MeasureWithUnit)& aMWU) |
66 | { |
67 | myMeasureWithUnit = aMWU; |
68 | } |
69 | |
70 | |
71 | //======================================================================= |
72 | //function : GetMeasureWithUnit |
73 | //purpose : |
74 | //======================================================================= |
75 | |
76 | Handle(StepBasic_MeasureWithUnit) StepRepr_ReprItemAndMeasureWithUnit:: |
77 | GetMeasureWithUnit() const |
78 | { |
79 | return myMeasureWithUnit; |
80 | } |
81 | |
82 | |
83 | //======================================================================= |
84 | //function : GetRepresentationItem |
85 | //purpose : |
86 | //======================================================================= |
87 | |
88 | Handle(StepRepr_RepresentationItem) StepRepr_ReprItemAndMeasureWithUnit:: |
89 | GetRepresentationItem() const |
90 | { |
91 | Handle(StepRepr_RepresentationItem) RI = new StepRepr_RepresentationItem(); |
92 | RI->Init(Name()); |
93 | return RI; |
94 | } |