0023024: Update headers of OCCT files
[occt.git] / src / RWStepRepr / RWStepRepr_RWRepresentationRelationshipWithTransformation.cxx
CommitLineData
b311480e 1// Copyright (c) 1999-2012 OPEN CASCADE SAS
2//
3// The content of this file is subject to the Open CASCADE Technology Public
4// License Version 6.5 (the "License"). You may not use the content of this file
5// except in compliance with the License. Please obtain a copy of the License
6// at http://www.opencascade.org and read it completely before using this file.
7//
8// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
10//
11// The Original Code and all software distributed under the License is
12// distributed on an "AS IS" basis, without warranty of any kind, and the
13// Initial Developer hereby disclaims all such warranties, including without
14// limitation, any warranties of merchantability, fitness for a particular
15// purpose or non-infringement. Please see the License for the specific terms
16// and conditions governing the rights and limitations under the License.
17
7fd59977 18
19#include <RWStepRepr_RWRepresentationRelationshipWithTransformation.ixx>
20#include <StepRepr_Representation.hxx>
21#include <StepRepr_Transformation.hxx>
22
23
24#include <Interface_EntityIterator.hxx>
25
26
27#include <StepRepr_RepresentationRelationshipWithTransformation.hxx>
28
29
30RWStepRepr_RWRepresentationRelationshipWithTransformation::RWStepRepr_RWRepresentationRelationshipWithTransformation () {}
31
32void RWStepRepr_RWRepresentationRelationshipWithTransformation::ReadStep
33 (const Handle(StepData_StepReaderData)& data,
34 const Standard_Integer num,
35 Handle(Interface_Check)& ach,
36 const Handle(StepRepr_RepresentationRelationshipWithTransformation)& ent) const
37{
38
39
40 // --- Number of Parameter Control ---
41
42 if (!data->CheckNbParams(num,5,ach,"representation_relationship_with_transformation")) return;
43
44 // --- inherited field : name ---
45
46 Handle(TCollection_HAsciiString) aName;
47 //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
48 data->ReadString (num,1,"name",ach,aName);
49
50 // --- inherited field : description ---
51
52 Handle(TCollection_HAsciiString) aDescription;
53 //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
54 data->ReadString (num,2,"description",ach,aDescription);
55
56 // --- inherited field : rep1 ---
57
58 Handle(StepRepr_Representation) aRep1;
59 //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
60 data->ReadEntity(num, 3,"rep_1", ach, STANDARD_TYPE(StepRepr_Representation), aRep1);
61
62 // --- inherited field : rep2 ---
63
64 Handle(StepRepr_Representation) aRep2;
65 //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
66 data->ReadEntity(num, 4,"rep_2", ach, STANDARD_TYPE(StepRepr_Representation), aRep2);
67
68 // --- own field : transformation_operator
69
70 StepRepr_Transformation aTrans;
71 //szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
72 data->ReadEntity(num,5,"transformation_operator",ach,aTrans);
73
74 //--- Initialisation of the read entity ---
75
76
77 ent->Init(aName, aDescription, aRep1, aRep2, aTrans);
78}
79
80
81void RWStepRepr_RWRepresentationRelationshipWithTransformation::WriteStep
82 (StepData_StepWriter& SW,
83 const Handle(StepRepr_RepresentationRelationshipWithTransformation)& ent) const
84{
85
86 // --- inherited field : name ---
87
88 SW.Send(ent->Name());
89
90 // --- inherited field : description ---
91
92 SW.Send(ent->Description());
93
94 // --- inherited field : rep1 ---
95
96 SW.Send(ent->Rep1());
97
98 // --- inherited field : rep2 ---
99
100 SW.Send(ent->Rep2());
101
102
103 SW.Send(ent->TransformationOperator().Value());
104}
105
106
107void RWStepRepr_RWRepresentationRelationshipWithTransformation::Share(const Handle(StepRepr_RepresentationRelationshipWithTransformation)& ent, Interface_EntityIterator& iter) const
108{
109
110 iter.GetOneItem(ent->Rep1());
111
112 iter.GetOneItem(ent->Rep2());
113
114 iter.GetOneItem(ent->TransformationOperator().Value());
115}
116