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 
IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ReprItemAndMeasureWithUnit,StepRepr_RepresentationItem)23 IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ReprItemAndMeasureWithUnit,StepRepr_RepresentationItem)
24 
25 //=======================================================================
26 //function : StepRepr_ReprItemAndMeasureWithUnit
27 //purpose  :
28 //=======================================================================
29 StepRepr_ReprItemAndMeasureWithUnit::StepRepr_ReprItemAndMeasureWithUnit()
30 {
31   myMeasureWithUnit = new StepBasic_MeasureWithUnit();
32   myMeasureRepresentationItem = new StepRepr_MeasureRepresentationItem();
33 }
34 
35 
36 //=======================================================================
37 //function : Init
38 //purpose  :
39 //=======================================================================
40 
Init(const Handle (StepBasic_MeasureWithUnit)& aMWU,const Handle (StepRepr_RepresentationItem)& aRI)41 void StepRepr_ReprItemAndMeasureWithUnit::Init
42   (const Handle(StepBasic_MeasureWithUnit)& aMWU,
43    const Handle(StepRepr_RepresentationItem)& aRI)
44 {
45   myMeasureWithUnit = aMWU;
46   SetName(aRI->Name());
47 }
48 
49 //=======================================================================
50 //function : GetMeasureRepresentationItem
51 //purpose  :
52 //=======================================================================
53 
Handle(StepRepr_MeasureRepresentationItem)54 Handle(StepRepr_MeasureRepresentationItem) StepRepr_ReprItemAndMeasureWithUnit::
55        GetMeasureRepresentationItem() const
56 {
57   return myMeasureRepresentationItem;
58 }
59 
60 
61 //=======================================================================
62 //function : SetMeasureWithUnit
63 //purpose  :
64 //=======================================================================
65 
SetMeasureWithUnit(const Handle (StepBasic_MeasureWithUnit)& aMWU)66 void StepRepr_ReprItemAndMeasureWithUnit::SetMeasureWithUnit
67   (const Handle(StepBasic_MeasureWithUnit)& aMWU)
68 {
69   myMeasureWithUnit = aMWU;
70 }
71 
72 
73 //=======================================================================
74 //function : GetMeasureWithUnit
75 //purpose  :
76 //=======================================================================
77 
Handle(StepBasic_MeasureWithUnit)78 Handle(StepBasic_MeasureWithUnit) StepRepr_ReprItemAndMeasureWithUnit::
79        GetMeasureWithUnit() const
80 {
81   return myMeasureWithUnit;
82 }
83 
84 
85 //=======================================================================
86 //function : GetRepresentationItem
87 //purpose  :
88 //=======================================================================
89 
Handle(StepRepr_RepresentationItem)90 Handle(StepRepr_RepresentationItem) StepRepr_ReprItemAndMeasureWithUnit::
91        GetRepresentationItem() const
92 {
93   Handle(StepRepr_RepresentationItem) RI = new StepRepr_RepresentationItem();
94   RI->Init(Name());
95   return RI;
96 }
97