0023022: This is desirable to access OpenGl extensions and core API (1.2+) in one...
[occt.git] / src / RWStepShape / RWStepShape_RWManifoldSolidBrep.cxx
1
2 #include <RWStepShape_RWManifoldSolidBrep.ixx>
3 #include <StepShape_ClosedShell.hxx>
4
5
6 #include <Interface_EntityIterator.hxx>
7
8
9 #include <StepShape_ManifoldSolidBrep.hxx>
10
11
12 RWStepShape_RWManifoldSolidBrep::RWStepShape_RWManifoldSolidBrep () {}
13
14 void RWStepShape_RWManifoldSolidBrep::ReadStep
15         (const Handle(StepData_StepReaderData)& data,
16          const Standard_Integer num,
17          Handle(Interface_Check)& ach,
18          const Handle(StepShape_ManifoldSolidBrep)& ent) const
19 {
20
21
22         // --- Number of Parameter Control ---
23
24         if (!data->CheckNbParams(num,2,ach,"manifold_solid_brep")) return;
25
26         // --- inherited 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 : outer ---
33
34         Handle(StepShape_ClosedShell) aOuter;
35         //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
36         data->ReadEntity(num, 2,"outer", ach, STANDARD_TYPE(StepShape_ClosedShell), aOuter);
37
38         //--- Initialisation of the read entity ---
39
40
41         ent->Init(aName, aOuter);
42 }
43
44
45 void RWStepShape_RWManifoldSolidBrep::WriteStep
46         (StepData_StepWriter& SW,
47          const Handle(StepShape_ManifoldSolidBrep)& ent) const
48 {
49
50         // --- inherited field name ---
51
52         SW.Send(ent->Name());
53
54         // --- own field : outer ---
55
56         SW.Send(ent->Outer());
57 }
58
59
60 void RWStepShape_RWManifoldSolidBrep::Share(const Handle(StepShape_ManifoldSolidBrep)& ent, Interface_EntityIterator& iter) const
61 {
62
63         iter.GetOneItem(ent->Outer());
64 }
65