0022627: Change OCCT memory management defaults
[occt.git] / src / RWStepBasic / RWStepBasic_RWIdentificationRole.cxx
1 // File:        RWStepBasic_RWIdentificationRole.cxx
2 // Created:     Wed May 10 15:09:08 2000 
3 // Author:      Andrey BETENEV
4 // Generator:   ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
5 // Copyright:   Matra Datavision 2000
6
7 #include <RWStepBasic_RWIdentificationRole.ixx>
8
9 //=======================================================================
10 //function : RWStepBasic_RWIdentificationRole
11 //purpose  : 
12 //=======================================================================
13
14 RWStepBasic_RWIdentificationRole::RWStepBasic_RWIdentificationRole ()
15 {
16 }
17
18 //=======================================================================
19 //function : ReadStep
20 //purpose  : 
21 //=======================================================================
22
23 void RWStepBasic_RWIdentificationRole::ReadStep (const Handle(StepData_StepReaderData)& data,
24                                                  const Standard_Integer num,
25                                                  Handle(Interface_Check)& ach,
26                                                  const Handle(StepBasic_IdentificationRole) &ent) const
27 {
28   // Check number of parameters
29   if ( ! data->CheckNbParams(num,2,ach,"identification_role") ) return;
30
31   // Own fields of IdentificationRole
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   // Initialize entity
46   ent->Init(aName,
47             hasDescription,
48             aDescription);
49 }
50
51 //=======================================================================
52 //function : WriteStep
53 //purpose  : 
54 //=======================================================================
55
56 void RWStepBasic_RWIdentificationRole::WriteStep (StepData_StepWriter& SW,
57                                                   const Handle(StepBasic_IdentificationRole) &ent) const
58 {
59
60   // Own fields of IdentificationRole
61
62   SW.Send (ent->Name());
63
64   if ( ent->HasDescription() ) {
65     SW.Send (ent->Description());
66   }
67   else SW.SendUndef();
68 }
69
70 //=======================================================================
71 //function : Share
72 //purpose  : 
73 //=======================================================================
74
75 void RWStepBasic_RWIdentificationRole::Share (const Handle(StepBasic_IdentificationRole) &ent,
76                                               Interface_EntityIterator& iter) const
77 {
78
79   // Own fields of IdentificationRole
80 }