0023022: This is desirable to access OpenGl extensions and core API (1.2+) in one...
[occt.git] / src / StepRepr / StepRepr_Representation.cxx
1 #include <StepRepr_Representation.ixx>
2
3
4 StepRepr_Representation::StepRepr_Representation ()  {}
5
6 void StepRepr_Representation::Init(
7         const Handle(TCollection_HAsciiString)& aName,
8         const Handle(StepRepr_HArray1OfRepresentationItem)& aItems,
9         const Handle(StepRepr_RepresentationContext)& aContextOfItems)
10 {
11         // --- classe own fields ---
12         name = aName;
13         items = aItems;
14         contextOfItems = aContextOfItems;
15 }
16
17
18 void StepRepr_Representation::SetName(const Handle(TCollection_HAsciiString)& aName)
19 {
20         name = aName;
21 }
22
23 Handle(TCollection_HAsciiString) StepRepr_Representation::Name() const
24 {
25         return name;
26 }
27
28 void StepRepr_Representation::SetItems(const Handle(StepRepr_HArray1OfRepresentationItem)& aItems)
29 {
30         items = aItems;
31 }
32
33 Handle(StepRepr_HArray1OfRepresentationItem) StepRepr_Representation::Items() const
34 {
35         return items;
36 }
37
38 Handle(StepRepr_RepresentationItem) StepRepr_Representation::ItemsValue(const Standard_Integer num) const
39 {
40         return items->Value(num);
41 }
42
43 Standard_Integer StepRepr_Representation::NbItems () const
44 {
45         if (items.IsNull()) return 0;
46         return items->Length();
47 }
48
49 void StepRepr_Representation::SetContextOfItems(const Handle(StepRepr_RepresentationContext)& aContextOfItems)
50 {
51         contextOfItems = aContextOfItems;
52 }
53
54 Handle(StepRepr_RepresentationContext) StepRepr_Representation::ContextOfItems() const
55 {
56         return contextOfItems;
57 }