7fd59977 |
1 | //gka 05.03.99 S4134 upgrade from CD to DIS |
2 | #include <RWStepRepr_RWRepresentationRelationship.ixx> |
3 | #include <StepRepr_Representation.hxx> |
4 | |
5 | |
6 | #include <Interface_EntityIterator.hxx> |
7 | |
8 | |
9 | #include <StepRepr_RepresentationRelationship.hxx> |
10 | |
11 | |
12 | RWStepRepr_RWRepresentationRelationship::RWStepRepr_RWRepresentationRelationship () {} |
13 | |
14 | void RWStepRepr_RWRepresentationRelationship::ReadStep |
15 | (const Handle(StepData_StepReaderData)& data, |
16 | const Standard_Integer num, |
17 | Handle(Interface_Check)& ach, |
18 | const Handle(StepRepr_RepresentationRelationship)& ent) const |
19 | { |
20 | |
21 | |
22 | // --- Number of Parameter Control --- |
23 | |
24 | if (!data->CheckNbParams(num,4,ach,"representation_relationship")) return; |
25 | |
26 | // --- own field : name --- |
27 | |
28 | Handle(TCollection_HAsciiString) aName; |
29 | //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed |
30 | data->ReadString (num,1,"name",ach,aName); |
31 | |
32 | // --- own field : description --- |
33 | |
34 | Handle(TCollection_HAsciiString) aDescription; |
35 | if (data->IsParamDefined (num,2)) { //gka 05.03.99 S4134 upgrade from CD to DIS |
36 | //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed |
37 | data->ReadString (num,2,"description",ach,aDescription); |
38 | } |
39 | // --- own field : rep1 --- |
40 | |
41 | Handle(StepRepr_Representation) aRep1; |
42 | //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed |
43 | data->ReadEntity(num, 3,"rep_1", ach, STANDARD_TYPE(StepRepr_Representation), aRep1); |
44 | |
45 | // --- own field : rep2 --- |
46 | |
47 | Handle(StepRepr_Representation) aRep2; |
48 | //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed |
49 | data->ReadEntity(num, 4,"rep_2", ach, STANDARD_TYPE(StepRepr_Representation), aRep2); |
50 | |
51 | //--- Initialisation of the read entity --- |
52 | |
53 | |
54 | ent->Init(aName, aDescription, aRep1, aRep2); |
55 | } |
56 | |
57 | |
58 | void RWStepRepr_RWRepresentationRelationship::WriteStep |
59 | (StepData_StepWriter& SW, |
60 | const Handle(StepRepr_RepresentationRelationship)& ent) const |
61 | { |
62 | |
63 | // --- own field : name --- |
64 | |
65 | SW.Send(ent->Name()); |
66 | |
67 | // --- own field : description --- |
68 | |
69 | SW.Send(ent->Description()); |
70 | |
71 | // --- own field : rep1 --- |
72 | |
73 | SW.Send(ent->Rep1()); |
74 | |
75 | // --- own field : rep2 --- |
76 | |
77 | SW.Send(ent->Rep2()); |
78 | } |
79 | |
80 | |
81 | void RWStepRepr_RWRepresentationRelationship::Share(const Handle(StepRepr_RepresentationRelationship)& ent, Interface_EntityIterator& iter) const |
82 | { |
83 | |
84 | iter.GetOneItem(ent->Rep1()); |
85 | |
86 | |
87 | iter.GetOneItem(ent->Rep2()); |
88 | } |
89 | |