0022627: Change OCCT memory management defaults
[occt.git] / src / RWStepDimTol / RWStepDimTol_RWGeometricToleranceRelationship.cxx
1 // File:        RWStepDimTol_RWGeometricToleranceRelationship.cxx
2 // Created:     Wed Jun  4 13:34:35 2003 
3 // Author:      Galina KULIKOVA
4 // Generator:   ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
5 // Copyright:   Open CASCADE 2002
6
7 #include <RWStepDimTol_RWGeometricToleranceRelationship.ixx>
8
9 //=======================================================================
10 //function : RWStepDimTol_RWGeometricToleranceRelationship
11 //purpose  : 
12 //=======================================================================
13
14 RWStepDimTol_RWGeometricToleranceRelationship::RWStepDimTol_RWGeometricToleranceRelationship ()
15 {
16 }
17
18 //=======================================================================
19 //function : ReadStep
20 //purpose  : 
21 //=======================================================================
22
23 void RWStepDimTol_RWGeometricToleranceRelationship::ReadStep (const Handle(StepData_StepReaderData)& data,
24                                                               const Standard_Integer num,
25                                                               Handle(Interface_Check)& ach,
26                                                               const Handle(StepDimTol_GeometricToleranceRelationship) &ent) const
27 {
28   // Check number of parameters
29   if ( ! data->CheckNbParams(num,4,ach,"geometric_tolerance_relationship") ) return;
30
31   // Own fields of GeometricToleranceRelationship
32
33   Handle(TCollection_HAsciiString) aName;
34   data->ReadString (num, 1, "name", ach, aName);
35
36   Handle(TCollection_HAsciiString) aDescription;
37   data->ReadString (num, 2, "description", ach, aDescription);
38
39   Handle(StepDimTol_GeometricTolerance) aRelatingGeometricTolerance;
40   data->ReadEntity (num, 3, "relating_geometric_tolerance", ach, STANDARD_TYPE(StepDimTol_GeometricTolerance), aRelatingGeometricTolerance);
41
42   Handle(StepDimTol_GeometricTolerance) aRelatedGeometricTolerance;
43   data->ReadEntity (num, 4, "related_geometric_tolerance", ach, STANDARD_TYPE(StepDimTol_GeometricTolerance), aRelatedGeometricTolerance);
44
45   // Initialize entity
46   ent->Init(aName,
47             aDescription,
48             aRelatingGeometricTolerance,
49             aRelatedGeometricTolerance);
50 }
51
52 //=======================================================================
53 //function : WriteStep
54 //purpose  : 
55 //=======================================================================
56
57 void RWStepDimTol_RWGeometricToleranceRelationship::WriteStep (StepData_StepWriter& SW,
58                                                                const Handle(StepDimTol_GeometricToleranceRelationship) &ent) const
59 {
60
61   // Own fields of GeometricToleranceRelationship
62
63   SW.Send (ent->Name());
64
65   SW.Send (ent->Description());
66
67   SW.Send (ent->RelatingGeometricTolerance());
68
69   SW.Send (ent->RelatedGeometricTolerance());
70 }
71
72 //=======================================================================
73 //function : Share
74 //purpose  : 
75 //=======================================================================
76
77 void RWStepDimTol_RWGeometricToleranceRelationship::Share (const Handle(StepDimTol_GeometricToleranceRelationship) &ent,
78                                                            Interface_EntityIterator& iter) const
79 {
80
81   // Own fields of GeometricToleranceRelationship
82
83   iter.AddItem (ent->RelatingGeometricTolerance());
84
85   iter.AddItem (ent->RelatedGeometricTolerance());
86 }