0033018: Coding - get rid of unused headers [Plugin to ShapeAnalysis]
[occt.git] / src / RWStepBasic / RWStepBasic_RWVersionedActionRequest.cxx
1 // Created on: 1999-11-26
2 // Created by: Andrey BETENEV
3 // Copyright (c) 1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 // Generator:   ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
18
19 #include <Interface_EntityIterator.hxx>
20 #include <RWStepBasic_RWVersionedActionRequest.hxx>
21 #include <StepBasic_VersionedActionRequest.hxx>
22 #include <StepData_StepReaderData.hxx>
23 #include <StepData_StepWriter.hxx>
24
25 //=======================================================================
26 //function : RWStepBasic_RWVersionedActionRequest
27 //purpose  : 
28 //=======================================================================
29 RWStepBasic_RWVersionedActionRequest::RWStepBasic_RWVersionedActionRequest ()
30 {
31 }
32
33 //=======================================================================
34 //function : ReadStep
35 //purpose  : 
36 //=======================================================================
37
38 void RWStepBasic_RWVersionedActionRequest::ReadStep (const Handle(StepData_StepReaderData)& data,
39                                                      const Standard_Integer num,
40                                                      Handle(Interface_Check)& ach,
41                                                      const Handle(StepBasic_VersionedActionRequest) &ent) const
42 {
43   // Check number of parameters
44   if ( ! data->CheckNbParams(num,4,ach,"versioned_action_request") ) return;
45
46   // Own fields of VersionedActionRequest
47
48   Handle(TCollection_HAsciiString) aId;
49   data->ReadString (num, 1, "id", ach, aId);
50
51   Handle(TCollection_HAsciiString) aVersion;
52   data->ReadString (num, 2, "version", ach, aVersion);
53
54   Handle(TCollection_HAsciiString) aPurpose;
55   data->ReadString (num, 3, "purpose", ach, aPurpose);
56
57   Handle(TCollection_HAsciiString) aDescription;
58   Standard_Boolean hasDescription = Standard_True;
59   if ( data->IsParamDefined (num,4) ) {
60     data->ReadString (num, 4, "description", ach, aDescription);
61   }
62   else {
63     hasDescription = Standard_False;
64   }
65
66   // Initialize entity
67   ent->Init(aId,
68             aVersion,
69             aPurpose,
70             hasDescription,
71             aDescription);
72 }
73
74 //=======================================================================
75 //function : WriteStep
76 //purpose  : 
77 //=======================================================================
78
79 void RWStepBasic_RWVersionedActionRequest::WriteStep (StepData_StepWriter& SW,
80                                                       const Handle(StepBasic_VersionedActionRequest) &ent) const
81 {
82
83   // Own fields of VersionedActionRequest
84
85   SW.Send (ent->Id());
86
87   SW.Send (ent->Version());
88
89   SW.Send (ent->Purpose());
90
91   if ( ent->HasDescription() ) {
92     SW.Send (ent->Description());
93   }
94   else SW.SendUndef();
95 }
96
97 //=======================================================================
98 //function : Share
99 //purpose  : 
100 //=======================================================================
101
102 void RWStepBasic_RWVersionedActionRequest::Share (const Handle(StepBasic_VersionedActionRequest) &,
103                                                   Interface_EntityIterator&) const
104 {
105
106   // Own fields of VersionedActionRequest
107 }