7fd59977 |
1 | |
2 | #include <RWStepRepr_RWMaterialDesignation.ixx> |
3 | #include <StepRepr_CharacterizedDefinition.hxx> |
4 | |
5 | |
6 | #include <Interface_EntityIterator.hxx> |
7 | |
8 | |
9 | #include <StepRepr_MaterialDesignation.hxx> |
10 | |
11 | |
12 | RWStepRepr_RWMaterialDesignation::RWStepRepr_RWMaterialDesignation () {} |
13 | |
14 | void RWStepRepr_RWMaterialDesignation::ReadStep |
15 | (const Handle(StepData_StepReaderData)& data, |
16 | const Standard_Integer num, |
17 | Handle(Interface_Check)& ach, |
18 | const Handle(StepRepr_MaterialDesignation)& ent) const |
19 | { |
20 | |
21 | |
22 | // --- Number of Parameter Control --- |
23 | |
24 | if (!data->CheckNbParams(num,2,ach,"material_designation")) return; |
25 | |
26 | // --- own 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 | StepRepr_CharacterizedDefinition aOfDefinition; |
33 | |
34 | //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed |
35 | data->ReadEntity(num,2,"of_definition",ach, aOfDefinition); |
36 | |
37 | //--- Initialisation of the read entity --- |
38 | |
39 | ent->Init(aName, aOfDefinition); |
40 | } |
41 | |
42 | |
43 | void RWStepRepr_RWMaterialDesignation::WriteStep |
44 | (StepData_StepWriter& SW, |
45 | const Handle(StepRepr_MaterialDesignation)& ent) const |
46 | { |
47 | |
48 | // --- own field : name --- |
49 | |
50 | SW.Send(ent->Name()); |
51 | |
52 | // --- own field : of_definition --- |
53 | |
54 | SW.Send(ent->OfDefinition().Value()); |
55 | } |
56 | |
57 | |
58 | void RWStepRepr_RWMaterialDesignation::Share(const Handle(StepRepr_MaterialDesignation)& ent, Interface_EntityIterator& iter) const |
59 | { |
60 | iter.AddItem (ent->OfDefinition().Value()); |
61 | } |
62 | |