0023948: Wrong intersection between a surface of revolution and a plane.
[occt.git] / src / RWStepBasic / RWStepBasic_RWPersonAndOrganization.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 <RWStepBasic_RWPersonAndOrganization.ixx>
15#include <StepBasic_Person.hxx>
16#include <StepBasic_Organization.hxx>
17
18
19#include <Interface_EntityIterator.hxx>
20
21
22#include <StepBasic_PersonAndOrganization.hxx>
23
24
25RWStepBasic_RWPersonAndOrganization::RWStepBasic_RWPersonAndOrganization () {}
26
27void RWStepBasic_RWPersonAndOrganization::ReadStep
28 (const Handle(StepData_StepReaderData)& data,
29 const Standard_Integer num,
30 Handle(Interface_Check)& ach,
31 const Handle(StepBasic_PersonAndOrganization)& ent) const
32{
33
34
35 // --- Number of Parameter Control ---
36
37 if (!data->CheckNbParams(num,2,ach,"person_and_organization")) return;
38
39 // --- own field : thePerson ---
40
41 Handle(StepBasic_Person) aThePerson;
42 //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
43 data->ReadEntity(num, 1,"the_person", ach, STANDARD_TYPE(StepBasic_Person), aThePerson);
44
45 // --- own field : theOrganization ---
46
47 Handle(StepBasic_Organization) aTheOrganization;
48 //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
49 data->ReadEntity(num, 2,"the_organization", ach, STANDARD_TYPE(StepBasic_Organization), aTheOrganization);
50
51 //--- Initialisation of the read entity ---
52
53
54 ent->Init(aThePerson, aTheOrganization);
55}
56
57
58void RWStepBasic_RWPersonAndOrganization::WriteStep
59 (StepData_StepWriter& SW,
60 const Handle(StepBasic_PersonAndOrganization)& ent) const
61{
62
63 // --- own field : thePerson ---
64
65 SW.Send(ent->ThePerson());
66
67 // --- own field : theOrganization ---
68
69 SW.Send(ent->TheOrganization());
70}
71
72
73void RWStepBasic_RWPersonAndOrganization::Share(const Handle(StepBasic_PersonAndOrganization)& ent, Interface_EntityIterator& iter) const
74{
75
76 iter.GetOneItem(ent->ThePerson());
77
78
79 iter.GetOneItem(ent->TheOrganization());
80}
81