7fd59977 |
1 | // File: RWStepRepr_RWShapeAspectDerivingRelationship.cxx |
2 | // Created: Wed Jun 4 14:17:23 2003 |
3 | // Author: Galina KULIKOVA |
4 | // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 |
5 | // Copyright: Open CASCADE 2002 |
6 | |
7 | #include <RWStepRepr_RWShapeAspectDerivingRelationship.ixx> |
8 | |
9 | //======================================================================= |
10 | //function : RWStepRepr_RWShapeAspectDerivingRelationship |
11 | //purpose : |
12 | //======================================================================= |
13 | |
14 | RWStepRepr_RWShapeAspectDerivingRelationship::RWStepRepr_RWShapeAspectDerivingRelationship () |
15 | { |
16 | } |
17 | |
18 | //======================================================================= |
19 | //function : ReadStep |
20 | //purpose : |
21 | //======================================================================= |
22 | |
23 | void RWStepRepr_RWShapeAspectDerivingRelationship::ReadStep (const Handle(StepData_StepReaderData)& data, |
24 | const Standard_Integer num, |
25 | Handle(Interface_Check)& ach, |
26 | const Handle(StepRepr_ShapeAspectDerivingRelationship) &ent) const |
27 | { |
28 | // Check number of parameters |
29 | if ( ! data->CheckNbParams(num,4,ach,"shape_aspect_deriving_relationship") ) return; |
30 | |
31 | // Inherited fields of ShapeAspectRelationship |
32 | |
33 | Handle(TCollection_HAsciiString) aShapeAspectRelationship_Name; |
34 | data->ReadString (num, 1, "shape_aspect_relationship.name", ach, aShapeAspectRelationship_Name); |
35 | |
36 | Handle(TCollection_HAsciiString) aShapeAspectRelationship_Description; |
37 | Standard_Boolean hasShapeAspectRelationship_Description = Standard_True; |
38 | if ( data->IsParamDefined (num,2) ) { |
39 | data->ReadString (num, 2, "shape_aspect_relationship.description", ach, aShapeAspectRelationship_Description); |
40 | } |
41 | else { |
42 | hasShapeAspectRelationship_Description = Standard_False; |
43 | } |
44 | |
45 | Handle(StepRepr_ShapeAspect) aShapeAspectRelationship_RelatingShapeAspect; |
46 | data->ReadEntity (num, 3, "shape_aspect_relationship.relating_shape_aspect", ach, STANDARD_TYPE(StepRepr_ShapeAspect), aShapeAspectRelationship_RelatingShapeAspect); |
47 | |
48 | Handle(StepRepr_ShapeAspect) aShapeAspectRelationship_RelatedShapeAspect; |
49 | data->ReadEntity (num, 4, "shape_aspect_relationship.related_shape_aspect", ach, STANDARD_TYPE(StepRepr_ShapeAspect), aShapeAspectRelationship_RelatedShapeAspect); |
50 | |
51 | // Initialize entity |
52 | ent->Init(aShapeAspectRelationship_Name, |
53 | hasShapeAspectRelationship_Description, |
54 | aShapeAspectRelationship_Description, |
55 | aShapeAspectRelationship_RelatingShapeAspect, |
56 | aShapeAspectRelationship_RelatedShapeAspect); |
57 | } |
58 | |
59 | //======================================================================= |
60 | //function : WriteStep |
61 | //purpose : |
62 | //======================================================================= |
63 | |
64 | void RWStepRepr_RWShapeAspectDerivingRelationship::WriteStep (StepData_StepWriter& SW, |
65 | const Handle(StepRepr_ShapeAspectDerivingRelationship) &ent) const |
66 | { |
67 | |
68 | // Inherited fields of ShapeAspectRelationship |
69 | |
70 | SW.Send (ent->StepRepr_ShapeAspectRelationship::Name()); |
71 | |
72 | if ( ent->StepRepr_ShapeAspectRelationship::HasDescription() ) { |
73 | SW.Send (ent->StepRepr_ShapeAspectRelationship::Description()); |
74 | } |
75 | else SW.SendUndef(); |
76 | |
77 | SW.Send (ent->StepRepr_ShapeAspectRelationship::RelatingShapeAspect()); |
78 | |
79 | SW.Send (ent->StepRepr_ShapeAspectRelationship::RelatedShapeAspect()); |
80 | } |
81 | |
82 | //======================================================================= |
83 | //function : Share |
84 | //purpose : |
85 | //======================================================================= |
86 | |
87 | void RWStepRepr_RWShapeAspectDerivingRelationship::Share (const Handle(StepRepr_ShapeAspectDerivingRelationship) &ent, |
88 | Interface_EntityIterator& iter) const |
89 | { |
90 | |
91 | // Inherited fields of ShapeAspectRelationship |
92 | |
93 | iter.AddItem (ent->StepRepr_ShapeAspectRelationship::RelatingShapeAspect()); |
94 | |
95 | iter.AddItem (ent->StepRepr_ShapeAspectRelationship::RelatedShapeAspect()); |
96 | } |