b311480e |
1 | // Created on: 1999-11-26 |
2 | // Created by: Andrey BETENEV |
3 | // Copyright (c) 1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
d5f74e42 |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
b311480e |
16 | |
7fd59977 |
17 | // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 |
7fd59977 |
18 | |
42cf5bc1 |
19 | #include <Interface_Check.hxx> |
20 | #include <Interface_EntityIterator.hxx> |
21 | #include <RWStepBasic_RWVersionedActionRequest.hxx> |
22 | #include <StepBasic_VersionedActionRequest.hxx> |
23 | #include <StepData_StepReaderData.hxx> |
24 | #include <StepData_StepWriter.hxx> |
7fd59977 |
25 | |
26 | //======================================================================= |
27 | //function : RWStepBasic_RWVersionedActionRequest |
28 | //purpose : |
29 | //======================================================================= |
7fd59977 |
30 | RWStepBasic_RWVersionedActionRequest::RWStepBasic_RWVersionedActionRequest () |
31 | { |
32 | } |
33 | |
34 | //======================================================================= |
35 | //function : ReadStep |
36 | //purpose : |
37 | //======================================================================= |
38 | |
39 | void RWStepBasic_RWVersionedActionRequest::ReadStep (const Handle(StepData_StepReaderData)& data, |
40 | const Standard_Integer num, |
41 | Handle(Interface_Check)& ach, |
42 | const Handle(StepBasic_VersionedActionRequest) &ent) const |
43 | { |
44 | // Check number of parameters |
45 | if ( ! data->CheckNbParams(num,4,ach,"versioned_action_request") ) return; |
46 | |
47 | // Own fields of VersionedActionRequest |
48 | |
49 | Handle(TCollection_HAsciiString) aId; |
50 | data->ReadString (num, 1, "id", ach, aId); |
51 | |
52 | Handle(TCollection_HAsciiString) aVersion; |
53 | data->ReadString (num, 2, "version", ach, aVersion); |
54 | |
55 | Handle(TCollection_HAsciiString) aPurpose; |
56 | data->ReadString (num, 3, "purpose", ach, aPurpose); |
57 | |
58 | Handle(TCollection_HAsciiString) aDescription; |
59 | Standard_Boolean hasDescription = Standard_True; |
60 | if ( data->IsParamDefined (num,4) ) { |
61 | data->ReadString (num, 4, "description", ach, aDescription); |
62 | } |
63 | else { |
64 | hasDescription = Standard_False; |
65 | } |
66 | |
67 | // Initialize entity |
68 | ent->Init(aId, |
69 | aVersion, |
70 | aPurpose, |
71 | hasDescription, |
72 | aDescription); |
73 | } |
74 | |
75 | //======================================================================= |
76 | //function : WriteStep |
77 | //purpose : |
78 | //======================================================================= |
79 | |
80 | void RWStepBasic_RWVersionedActionRequest::WriteStep (StepData_StepWriter& SW, |
81 | const Handle(StepBasic_VersionedActionRequest) &ent) const |
82 | { |
83 | |
84 | // Own fields of VersionedActionRequest |
85 | |
86 | SW.Send (ent->Id()); |
87 | |
88 | SW.Send (ent->Version()); |
89 | |
90 | SW.Send (ent->Purpose()); |
91 | |
92 | if ( ent->HasDescription() ) { |
93 | SW.Send (ent->Description()); |
94 | } |
95 | else SW.SendUndef(); |
96 | } |
97 | |
98 | //======================================================================= |
99 | //function : Share |
100 | //purpose : |
101 | //======================================================================= |
102 | |
35e08fe8 |
103 | void RWStepBasic_RWVersionedActionRequest::Share (const Handle(StepBasic_VersionedActionRequest) &, |
104 | Interface_EntityIterator&) const |
7fd59977 |
105 | { |
106 | |
107 | // Own fields of VersionedActionRequest |
108 | } |