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