7fd59977 |
1 | // File: RWStepBasic_RWVersionedActionRequest.cxx |
2 | // Created: Fri Nov 26 16:26:41 1999 |
3 | // Author: Andrey BETENEV |
4 | // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 |
5 | // Copyright: Matra Datavision 1999 |
6 | |
7 | #include <RWStepBasic_RWVersionedActionRequest.ixx> |
8 | |
9 | //======================================================================= |
10 | //function : RWStepBasic_RWVersionedActionRequest |
11 | //purpose : |
12 | //======================================================================= |
13 | |
14 | RWStepBasic_RWVersionedActionRequest::RWStepBasic_RWVersionedActionRequest () |
15 | { |
16 | } |
17 | |
18 | //======================================================================= |
19 | //function : ReadStep |
20 | //purpose : |
21 | //======================================================================= |
22 | |
23 | void RWStepBasic_RWVersionedActionRequest::ReadStep (const Handle(StepData_StepReaderData)& data, |
24 | const Standard_Integer num, |
25 | Handle(Interface_Check)& ach, |
26 | const Handle(StepBasic_VersionedActionRequest) &ent) const |
27 | { |
28 | // Check number of parameters |
29 | if ( ! data->CheckNbParams(num,4,ach,"versioned_action_request") ) return; |
30 | |
31 | // Own fields of VersionedActionRequest |
32 | |
33 | Handle(TCollection_HAsciiString) aId; |
34 | data->ReadString (num, 1, "id", ach, aId); |
35 | |
36 | Handle(TCollection_HAsciiString) aVersion; |
37 | data->ReadString (num, 2, "version", ach, aVersion); |
38 | |
39 | Handle(TCollection_HAsciiString) aPurpose; |
40 | data->ReadString (num, 3, "purpose", ach, aPurpose); |
41 | |
42 | Handle(TCollection_HAsciiString) aDescription; |
43 | Standard_Boolean hasDescription = Standard_True; |
44 | if ( data->IsParamDefined (num,4) ) { |
45 | data->ReadString (num, 4, "description", ach, aDescription); |
46 | } |
47 | else { |
48 | hasDescription = Standard_False; |
49 | } |
50 | |
51 | // Initialize entity |
52 | ent->Init(aId, |
53 | aVersion, |
54 | aPurpose, |
55 | hasDescription, |
56 | aDescription); |
57 | } |
58 | |
59 | //======================================================================= |
60 | //function : WriteStep |
61 | //purpose : |
62 | //======================================================================= |
63 | |
64 | void RWStepBasic_RWVersionedActionRequest::WriteStep (StepData_StepWriter& SW, |
65 | const Handle(StepBasic_VersionedActionRequest) &ent) const |
66 | { |
67 | |
68 | // Own fields of VersionedActionRequest |
69 | |
70 | SW.Send (ent->Id()); |
71 | |
72 | SW.Send (ent->Version()); |
73 | |
74 | SW.Send (ent->Purpose()); |
75 | |
76 | if ( ent->HasDescription() ) { |
77 | SW.Send (ent->Description()); |
78 | } |
79 | else SW.SendUndef(); |
80 | } |
81 | |
82 | //======================================================================= |
83 | //function : Share |
84 | //purpose : |
85 | //======================================================================= |
86 | |
87 | void RWStepBasic_RWVersionedActionRequest::Share (const Handle(StepBasic_VersionedActionRequest) &ent, |
88 | Interface_EntityIterator& iter) const |
89 | { |
90 | |
91 | // Own fields of VersionedActionRequest |
92 | } |