7fd59977 |
1 | // File: RWStepBasic_RWExternallyDefinedItem.cxx |
2 | // Created: Wed May 10 15:09:07 2000 |
3 | // Author: Andrey BETENEV |
4 | // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 |
5 | // Copyright: Matra Datavision 2000 |
6 | |
7 | #include <RWStepBasic_RWExternallyDefinedItem.ixx> |
8 | |
9 | //======================================================================= |
10 | //function : RWStepBasic_RWExternallyDefinedItem |
11 | //purpose : |
12 | //======================================================================= |
13 | |
14 | RWStepBasic_RWExternallyDefinedItem::RWStepBasic_RWExternallyDefinedItem () |
15 | { |
16 | } |
17 | |
18 | //======================================================================= |
19 | //function : ReadStep |
20 | //purpose : |
21 | //======================================================================= |
22 | |
23 | void RWStepBasic_RWExternallyDefinedItem::ReadStep (const Handle(StepData_StepReaderData)& data, |
24 | const Standard_Integer num, |
25 | Handle(Interface_Check)& ach, |
26 | const Handle(StepBasic_ExternallyDefinedItem) &ent) const |
27 | { |
28 | // Check number of parameters |
29 | if ( ! data->CheckNbParams(num,2,ach,"externally_defined_item") ) return; |
30 | |
31 | // Own fields of ExternallyDefinedItem |
32 | |
33 | StepBasic_SourceItem aItemId; |
34 | data->ReadEntity (num, 1, "item_id", ach, aItemId); |
35 | |
36 | Handle(StepBasic_ExternalSource) aSource; |
37 | data->ReadEntity (num, 2, "source", ach, STANDARD_TYPE(StepBasic_ExternalSource), aSource); |
38 | |
39 | // Initialize entity |
40 | ent->Init(aItemId, |
41 | aSource); |
42 | } |
43 | |
44 | //======================================================================= |
45 | //function : WriteStep |
46 | //purpose : |
47 | //======================================================================= |
48 | |
49 | void RWStepBasic_RWExternallyDefinedItem::WriteStep (StepData_StepWriter& SW, |
50 | const Handle(StepBasic_ExternallyDefinedItem) &ent) const |
51 | { |
52 | |
53 | // Own fields of ExternallyDefinedItem |
54 | |
55 | SW.Send (ent->ItemId().Value()); |
56 | |
57 | SW.Send (ent->Source()); |
58 | } |
59 | |
60 | //======================================================================= |
61 | //function : Share |
62 | //purpose : |
63 | //======================================================================= |
64 | |
65 | void RWStepBasic_RWExternallyDefinedItem::Share (const Handle(StepBasic_ExternallyDefinedItem) &ent, |
66 | Interface_EntityIterator& iter) const |
67 | { |
68 | |
69 | // Own fields of ExternallyDefinedItem |
70 | |
71 | iter.AddItem (ent->ItemId().Value()); |
72 | |
73 | iter.AddItem (ent->Source()); |
74 | } |