Integration of OCCT 6.5.0 from SVN
[occt.git] / src / StepVisual / StepVisual_StyledItem.cxx
1 #include <StepVisual_StyledItem.ixx>
2
3
4 StepVisual_StyledItem::StepVisual_StyledItem ()  {}
5
6 void StepVisual_StyledItem::Init(
7         const Handle(TCollection_HAsciiString)& aName)
8 {
9
10         StepRepr_RepresentationItem::Init(aName);
11 }
12
13 void StepVisual_StyledItem::Init(
14         const Handle(TCollection_HAsciiString)& aName,
15         const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& aStyles,
16         const Handle(StepRepr_RepresentationItem)& aItem)
17 {
18         // --- classe own fields ---
19         styles = aStyles;
20         item = aItem;
21         // --- classe inherited fields ---
22         StepRepr_RepresentationItem::Init(aName);
23 }
24
25
26 void StepVisual_StyledItem::SetStyles(const Handle(StepVisual_HArray1OfPresentationStyleAssignment)& aStyles)
27 {
28         styles = aStyles;
29 }
30
31 Handle(StepVisual_HArray1OfPresentationStyleAssignment) StepVisual_StyledItem::Styles() const
32 {
33         return styles;
34 }
35
36 Handle(StepVisual_PresentationStyleAssignment) StepVisual_StyledItem::StylesValue(const Standard_Integer num) const
37 {
38         return styles->Value(num);
39 }
40
41 Standard_Integer StepVisual_StyledItem::NbStyles () const
42 {
43         if (styles.IsNull()) return 0;
44         return styles->Length();
45 }
46
47 void StepVisual_StyledItem::SetItem(const Handle(StepRepr_RepresentationItem)& aItem)
48 {
49         item = aItem;
50 }
51
52 Handle(StepRepr_RepresentationItem) StepVisual_StyledItem::Item() const
53 {
54         return item;
55 }