7fd59977 |
1 | |
2 | #include <RWStepVisual_RWPresentationSize.ixx> |
3 | #include <StepVisual_PresentationSizeAssignmentSelect.hxx> |
4 | #include <StepVisual_PlanarBox.hxx> |
5 | |
6 | |
7 | #include <Interface_EntityIterator.hxx> |
8 | |
9 | |
10 | #include <StepVisual_PresentationSize.hxx> |
11 | |
12 | |
13 | RWStepVisual_RWPresentationSize::RWStepVisual_RWPresentationSize () {} |
14 | |
15 | void RWStepVisual_RWPresentationSize::ReadStep |
16 | (const Handle(StepData_StepReaderData)& data, |
17 | const Standard_Integer num, |
18 | Handle(Interface_Check)& ach, |
19 | const Handle(StepVisual_PresentationSize)& ent) const |
20 | { |
21 | |
22 | |
23 | // --- Number of Parameter Control --- |
24 | |
25 | if (!data->CheckNbParams(num,2,ach,"presentation_size")) return; |
26 | |
27 | // --- own field : unit --- |
28 | |
29 | StepVisual_PresentationSizeAssignmentSelect aUnit; |
30 | //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed |
31 | data->ReadEntity(num,1,"unit",ach,aUnit); |
32 | |
33 | // --- own field : size --- |
34 | |
35 | Handle(StepVisual_PlanarBox) aSize; |
36 | //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed |
37 | data->ReadEntity(num, 2,"size", ach, STANDARD_TYPE(StepVisual_PlanarBox), aSize); |
38 | |
39 | //--- Initialisation of the read entity --- |
40 | |
41 | |
42 | ent->Init(aUnit, aSize); |
43 | } |
44 | |
45 | |
46 | void RWStepVisual_RWPresentationSize::WriteStep |
47 | (StepData_StepWriter& SW, |
48 | const Handle(StepVisual_PresentationSize)& ent) const |
49 | { |
50 | |
51 | // --- own field : unit --- |
52 | |
53 | SW.Send(ent->Unit().Value()); |
54 | |
55 | // --- own field : size --- |
56 | |
57 | SW.Send(ent->Size()); |
58 | } |
59 | |
60 | |
61 | void RWStepVisual_RWPresentationSize::Share(const Handle(StepVisual_PresentationSize)& ent, Interface_EntityIterator& iter) const |
62 | { |
63 | |
64 | iter.GetOneItem(ent->Unit().Value()); |
65 | |
66 | |
67 | iter.GetOneItem(ent->Size()); |
68 | } |
69 | |