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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
19 #include <Interface_Check.hxx>
20 #include <Interface_EntityIterator.hxx>
21 #include <RWStepBasic_RWActionMethod.hxx>
22 #include <StepBasic_ActionMethod.hxx>
23 #include <StepData_StepReaderData.hxx>
24 #include <StepData_StepWriter.hxx>
26 //=======================================================================
27 //function : RWStepBasic_RWActionMethod
29 //=======================================================================
30 RWStepBasic_RWActionMethod::RWStepBasic_RWActionMethod ()
34 //=======================================================================
37 //=======================================================================
39 void RWStepBasic_RWActionMethod::ReadStep (const Handle(StepData_StepReaderData)& data,
40 const Standard_Integer num,
41 Handle(Interface_Check)& ach,
42 const Handle(StepBasic_ActionMethod) &ent) const
44 // Check number of parameters
45 if ( ! data->CheckNbParams(num,4,ach,"action_method") ) return;
47 // Own fields of ActionMethod
49 Handle(TCollection_HAsciiString) aName;
50 data->ReadString (num, 1, "name", ach, aName);
52 Handle(TCollection_HAsciiString) aDescription;
53 Standard_Boolean hasDescription = Standard_True;
54 if ( data->IsParamDefined (num,2) ) {
55 data->ReadString (num, 2, "description", ach, aDescription);
58 hasDescription = Standard_False;
61 Handle(TCollection_HAsciiString) aConsequence;
62 data->ReadString (num, 3, "consequence", ach, aConsequence);
64 Handle(TCollection_HAsciiString) aPurpose;
65 data->ReadString (num, 4, "purpose", ach, aPurpose);
75 //=======================================================================
76 //function : WriteStep
78 //=======================================================================
80 void RWStepBasic_RWActionMethod::WriteStep (StepData_StepWriter& SW,
81 const Handle(StepBasic_ActionMethod) &ent) const
84 // Own fields of ActionMethod
86 SW.Send (ent->Name());
88 if ( ent->HasDescription() ) {
89 SW.Send (ent->Description());
93 SW.Send (ent->Consequence());
95 SW.Send (ent->Purpose());
98 //=======================================================================
101 //=======================================================================
103 void RWStepBasic_RWActionMethod::Share (const Handle(StepBasic_ActionMethod) &,
104 Interface_EntityIterator&) const
106 // Own fields of ActionMethod