Integration of OCCT 6.5.0 from SVN
[occt.git] / src / RWStepVisual / RWStepVisual_RWPresentationLayerUsage.cxx
1
2 #include <RWStepVisual_RWPresentationLayerUsage.ixx>
3 #include <StepVisual_PresentationLayerAssignment.hxx>
4 #include <StepVisual_PresentationRepresentation.hxx>
5
6
7 #include <Interface_EntityIterator.hxx>
8
9
10 #include <StepVisual_PresentationLayerUsage.hxx>
11
12
13 RWStepVisual_RWPresentationLayerUsage::RWStepVisual_RWPresentationLayerUsage () {}
14
15 void RWStepVisual_RWPresentationLayerUsage::ReadStep
16         (const Handle(StepData_StepReaderData)& data,
17          const Standard_Integer num,
18          Handle(Interface_Check)& ach,
19          const Handle(StepVisual_PresentationLayerUsage)& ent) const
20 {
21
22
23         // --- Number of Parameter Control ---
24
25         if (!data->CheckNbParams(num,2,ach,"presentation_layer_usage")) return;
26
27         // --- own fields
28 #include <StepVisual_PresentationLayerAssignment.hxx>
29 #include <StepVisual_PresentationRepresentation.hxx>
30         Handle(StepVisual_PresentationLayerAssignment) pla;
31         Handle(StepVisual_PresentationRepresentation)  pr;
32
33         //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
34         data->ReadEntity(num, 1,"assignment", ach, STANDARD_TYPE(StepVisual_PresentationLayerAssignment), pla);
35         //szv#4:S4163:12Mar99 `stat1 =` not needed
36         data->ReadEntity(num, 2,"presentation", ach, STANDARD_TYPE(StepVisual_PresentationRepresentation), pr);
37
38         //--- Initialisation of the read entity ---
39
40
41         ent->Init(pla,pr);
42 }
43
44
45 void RWStepVisual_RWPresentationLayerUsage::WriteStep
46         (StepData_StepWriter& SW,
47          const Handle(StepVisual_PresentationLayerUsage)& ent) const
48 {
49
50         // --- own field : dimensions ---
51
52         SW.Send(ent->Assignment());
53         SW.Send(ent->Presentation());
54 }
55
56
57 void RWStepVisual_RWPresentationLayerUsage::Share(const Handle(StepVisual_PresentationLayerUsage)& ent, Interface_EntityIterator& iter) const
58 {
59         iter.AddItem(ent->Assignment());
60         iter.AddItem(ent->Presentation());
61 }