0022627: Change OCCT memory management defaults
[occt.git] / src / RWStepBasic / RWStepBasic_RWIdentificationAssignment.cxx
... / ...
CommitLineData
1// File: RWStepBasic_RWIdentificationAssignment.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_RWIdentificationAssignment.ixx>
8
9//=======================================================================
10//function : RWStepBasic_RWIdentificationAssignment
11//purpose :
12//=======================================================================
13
14RWStepBasic_RWIdentificationAssignment::RWStepBasic_RWIdentificationAssignment ()
15{
16}
17
18//=======================================================================
19//function : ReadStep
20//purpose :
21//=======================================================================
22
23void RWStepBasic_RWIdentificationAssignment::ReadStep (const Handle(StepData_StepReaderData)& data,
24 const Standard_Integer num,
25 Handle(Interface_Check)& ach,
26 const Handle(StepBasic_IdentificationAssignment) &ent) const
27{
28 // Check number of parameters
29 if ( ! data->CheckNbParams(num,2,ach,"identification_assignment") ) return;
30
31 // Own fields of IdentificationAssignment
32
33 Handle(TCollection_HAsciiString) aAssignedId;
34 data->ReadString (num, 1, "assigned_id", ach, aAssignedId);
35
36 Handle(StepBasic_IdentificationRole) aRole;
37 data->ReadEntity (num, 2, "role", ach, STANDARD_TYPE(StepBasic_IdentificationRole), aRole);
38
39 // Initialize entity
40 ent->Init(aAssignedId,
41 aRole);
42}
43
44//=======================================================================
45//function : WriteStep
46//purpose :
47//=======================================================================
48
49void RWStepBasic_RWIdentificationAssignment::WriteStep (StepData_StepWriter& SW,
50 const Handle(StepBasic_IdentificationAssignment) &ent) const
51{
52
53 // Own fields of IdentificationAssignment
54
55 SW.Send (ent->AssignedId());
56
57 SW.Send (ent->Role());
58}
59
60//=======================================================================
61//function : Share
62//purpose :
63//=======================================================================
64
65void RWStepBasic_RWIdentificationAssignment::Share (const Handle(StepBasic_IdentificationAssignment) &ent,
66 Interface_EntityIterator& iter) const
67{
68
69 // Own fields of IdentificationAssignment
70
71 iter.AddItem (ent->Role());
72}