7fd59977 |
1 | #include <StepRepr_GlobalUnitAssignedContext.ixx> |
2 | |
3 | |
4 | StepRepr_GlobalUnitAssignedContext::StepRepr_GlobalUnitAssignedContext () {} |
5 | |
6 | void StepRepr_GlobalUnitAssignedContext::Init( |
7 | const Handle(TCollection_HAsciiString)& aContextIdentifier, |
8 | const Handle(TCollection_HAsciiString)& aContextType) |
9 | { |
10 | |
11 | StepRepr_RepresentationContext::Init(aContextIdentifier, aContextType); |
12 | } |
13 | |
14 | void StepRepr_GlobalUnitAssignedContext::Init( |
15 | const Handle(TCollection_HAsciiString)& aContextIdentifier, |
16 | const Handle(TCollection_HAsciiString)& aContextType, |
17 | const Handle(StepBasic_HArray1OfNamedUnit)& aUnits) |
18 | { |
19 | // --- classe own fields --- |
20 | units = aUnits; |
21 | // --- classe inherited fields --- |
22 | StepRepr_RepresentationContext::Init(aContextIdentifier, aContextType); |
23 | } |
24 | |
25 | |
26 | void StepRepr_GlobalUnitAssignedContext::SetUnits(const Handle(StepBasic_HArray1OfNamedUnit)& aUnits) |
27 | { |
28 | units = aUnits; |
29 | } |
30 | |
31 | Handle(StepBasic_HArray1OfNamedUnit) StepRepr_GlobalUnitAssignedContext::Units() const |
32 | { |
33 | return units; |
34 | } |
35 | |
36 | Handle(StepBasic_NamedUnit) StepRepr_GlobalUnitAssignedContext::UnitsValue(const Standard_Integer num) const |
37 | { |
38 | return units->Value(num); |
39 | } |
40 | |
41 | Standard_Integer StepRepr_GlobalUnitAssignedContext::NbUnits () const |
42 | { |
43 | if (units.IsNull()) return 0; |
44 | return units->Length(); |
45 | } |