Integration of OCCT 6.5.0 from SVN
[occt.git] / src / RWStepFEA / RWStepFEA_RWNodeWithSolutionCoordinateSystem.cxx
CommitLineData
7fd59977 1// File: RWStepFEA_RWNodeWithSolutionCoordinateSystem.cxx
2// Created: Thu Dec 12 17:51:07 2002
3// Author: data exchange team
4// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
5// Copyright: Open CASCADE 2002
6
7#include <RWStepFEA_RWNodeWithSolutionCoordinateSystem.ixx>
8#include <StepRepr_HArray1OfRepresentationItem.hxx>
9#include <StepRepr_RepresentationItem.hxx>
10
11//=======================================================================
12//function : RWStepFEA_RWNodeWithSolutionCoordinateSystem
13//purpose :
14//=======================================================================
15
16RWStepFEA_RWNodeWithSolutionCoordinateSystem::RWStepFEA_RWNodeWithSolutionCoordinateSystem ()
17{
18}
19
20//=======================================================================
21//function : ReadStep
22//purpose :
23//=======================================================================
24
25void RWStepFEA_RWNodeWithSolutionCoordinateSystem::ReadStep (const Handle(StepData_StepReaderData)& data,
26 const Standard_Integer num,
27 Handle(Interface_Check)& ach,
28 const Handle(StepFEA_NodeWithSolutionCoordinateSystem) &ent) const
29{
30 // Check number of parameters
31 if ( ! data->CheckNbParams(num,4,ach,"node_with_solution_coordinate_system") ) return;
32
33 // Inherited fields of Representation
34
35 Handle(TCollection_HAsciiString) aRepresentation_Name;
36 data->ReadString (num, 1, "representation.name", ach, aRepresentation_Name);
37
38 Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items;
39 Standard_Integer sub2 = 0;
40 if ( data->ReadSubList (num, 2, "representation.items", ach, sub2) ) {
41 Standard_Integer nb0 = data->NbParams(sub2);
42 aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem (1, nb0);
43 Standard_Integer num2 = sub2;
44 for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
45 Handle(StepRepr_RepresentationItem) anIt0;
46 data->ReadEntity (num2, i0, "representation_item", ach, STANDARD_TYPE(StepRepr_RepresentationItem), anIt0);
47 aRepresentation_Items->SetValue(i0, anIt0);
48 }
49 }
50
51 Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems;
52 data->ReadEntity (num, 3, "representation.context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems);
53
54 // Inherited fields of NodeRepresentation
55
56 Handle(StepFEA_FeaModel) aNodeRepresentation_ModelRef;
57 data->ReadEntity (num, 4, "node_representation.model_ref", ach, STANDARD_TYPE(StepFEA_FeaModel), aNodeRepresentation_ModelRef);
58
59 // Initialize entity
60 ent->Init(aRepresentation_Name,
61 aRepresentation_Items,
62 aRepresentation_ContextOfItems,
63 aNodeRepresentation_ModelRef);
64}
65
66//=======================================================================
67//function : WriteStep
68//purpose :
69//=======================================================================
70
71void RWStepFEA_RWNodeWithSolutionCoordinateSystem::WriteStep (StepData_StepWriter& SW,
72 const Handle(StepFEA_NodeWithSolutionCoordinateSystem) &ent) const
73{
74
75 // Inherited fields of Representation
76
77 SW.Send (ent->StepRepr_Representation::Name());
78
79 SW.OpenSub();
80 for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
81 Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
82 SW.Send (Var0);
83 }
84 SW.CloseSub();
85
86 SW.Send (ent->StepRepr_Representation::ContextOfItems());
87
88 // Inherited fields of NodeRepresentation
89
90 SW.Send (ent->StepFEA_NodeRepresentation::ModelRef());
91}
92
93//=======================================================================
94//function : Share
95//purpose :
96//=======================================================================
97
98void RWStepFEA_RWNodeWithSolutionCoordinateSystem::Share (const Handle(StepFEA_NodeWithSolutionCoordinateSystem) &ent,
99 Interface_EntityIterator& iter) const
100{
101
102 // Inherited fields of Representation
103
104 for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
105 Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
106 iter.AddItem (Var0);
107 }
108
109 iter.AddItem (ent->StepRepr_Representation::ContextOfItems());
110
111 // Inherited fields of NodeRepresentation
112
113 iter.AddItem (ent->StepFEA_NodeRepresentation::ModelRef());
114}