0024624: Lost word in license statement in source files
[occt.git] / src / RWStepVisual / RWStepVisual_RWPresentationSize.cxx
CommitLineData
973c2be1 1// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
b311480e 4//
d5f74e42 5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
b311480e 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
7fd59977 13
14#include <RWStepVisual_RWPresentationSize.ixx>
15#include <StepVisual_PresentationSizeAssignmentSelect.hxx>
16#include <StepVisual_PlanarBox.hxx>
17
18
19#include <Interface_EntityIterator.hxx>
20
21
22#include <StepVisual_PresentationSize.hxx>
23
24
25RWStepVisual_RWPresentationSize::RWStepVisual_RWPresentationSize () {}
26
27void RWStepVisual_RWPresentationSize::ReadStep
28 (const Handle(StepData_StepReaderData)& data,
29 const Standard_Integer num,
30 Handle(Interface_Check)& ach,
31 const Handle(StepVisual_PresentationSize)& ent) const
32{
33
34
35 // --- Number of Parameter Control ---
36
37 if (!data->CheckNbParams(num,2,ach,"presentation_size")) return;
38
39 // --- own field : unit ---
40
41 StepVisual_PresentationSizeAssignmentSelect aUnit;
42 //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
43 data->ReadEntity(num,1,"unit",ach,aUnit);
44
45 // --- own field : size ---
46
47 Handle(StepVisual_PlanarBox) aSize;
48 //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
49 data->ReadEntity(num, 2,"size", ach, STANDARD_TYPE(StepVisual_PlanarBox), aSize);
50
51 //--- Initialisation of the read entity ---
52
53
54 ent->Init(aUnit, aSize);
55}
56
57
58void RWStepVisual_RWPresentationSize::WriteStep
59 (StepData_StepWriter& SW,
60 const Handle(StepVisual_PresentationSize)& ent) const
61{
62
63 // --- own field : unit ---
64
65 SW.Send(ent->Unit().Value());
66
67 // --- own field : size ---
68
69 SW.Send(ent->Size());
70}
71
72
73void RWStepVisual_RWPresentationSize::Share(const Handle(StepVisual_PresentationSize)& ent, Interface_EntityIterator& iter) const
74{
75
76 iter.GetOneItem(ent->Unit().Value());
77
78
79 iter.GetOneItem(ent->Size());
80}
81