7fd59977 |
1 | //gka 05.03.99 S4134 upgrade from CD to DIS |
2 | #include <RWStepBasic_RWProductDefinitionFormation.ixx> |
3 | #include <StepBasic_Product.hxx> |
4 | |
5 | |
6 | #include <Interface_EntityIterator.hxx> |
7 | |
8 | |
9 | #include <StepBasic_ProductDefinitionFormation.hxx> |
10 | |
11 | |
12 | RWStepBasic_RWProductDefinitionFormation::RWStepBasic_RWProductDefinitionFormation () {} |
13 | |
14 | void RWStepBasic_RWProductDefinitionFormation::ReadStep |
15 | (const Handle(StepData_StepReaderData)& data, |
16 | const Standard_Integer num, |
17 | Handle(Interface_Check)& ach, |
18 | const Handle(StepBasic_ProductDefinitionFormation)& ent) const |
19 | { |
20 | |
21 | |
22 | // --- Number of Parameter Control --- |
23 | |
24 | if (!data->CheckNbParams(num,3,ach,"product_definition_formation")) return; |
25 | |
26 | // --- own field : id --- |
27 | |
28 | Handle(TCollection_HAsciiString) aId; |
29 | //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed |
30 | data->ReadString (num,1,"id",ach,aId); |
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 : ofProduct --- |
40 | |
41 | Handle(StepBasic_Product) aOfProduct; |
42 | //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed |
43 | data->ReadEntity(num, 3,"of_product", ach, STANDARD_TYPE(StepBasic_Product), aOfProduct); |
44 | |
45 | //--- Initialisation of the read entity --- |
46 | |
47 | |
48 | ent->Init(aId, aDescription, aOfProduct); |
49 | } |
50 | |
51 | |
52 | void RWStepBasic_RWProductDefinitionFormation::WriteStep |
53 | (StepData_StepWriter& SW, |
54 | const Handle(StepBasic_ProductDefinitionFormation)& ent) const |
55 | { |
56 | |
57 | // --- own field : id --- |
58 | |
59 | SW.Send(ent->Id()); |
60 | |
61 | // --- own field : description --- |
62 | |
63 | SW.Send(ent->Description()); |
64 | |
65 | // --- own field : ofProduct --- |
66 | |
67 | SW.Send(ent->OfProduct()); |
68 | } |
69 | |
70 | |
71 | void RWStepBasic_RWProductDefinitionFormation::Share(const Handle(StepBasic_ProductDefinitionFormation)& ent, Interface_EntityIterator& iter) const |
72 | { |
73 | |
74 | iter.GetOneItem(ent->OfProduct()); |
75 | } |
76 | |