0022627: Change OCCT memory management defaults
[occt.git] / src / RWStepBasic / RWStepBasic_RWSecurityClassification.cxx
CommitLineData
7fd59977 1
2#include <RWStepBasic_RWSecurityClassification.ixx>
3#include <StepBasic_SecurityClassificationLevel.hxx>
4
5
6#include <Interface_EntityIterator.hxx>
7
8
9#include <StepBasic_SecurityClassification.hxx>
10
11
12RWStepBasic_RWSecurityClassification::RWStepBasic_RWSecurityClassification () {}
13
14void RWStepBasic_RWSecurityClassification::ReadStep
15 (const Handle(StepData_StepReaderData)& data,
16 const Standard_Integer num,
17 Handle(Interface_Check)& ach,
18 const Handle(StepBasic_SecurityClassification)& ent) const
19{
20
21
22 // --- Number of Parameter Control ---
23
24 if (!data->CheckNbParams(num,3,ach,"security_classification")) return;
25
26 // --- own field : name ---
27
28 Handle(TCollection_HAsciiString) aName;
29 //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
30 data->ReadString (num,1,"name",ach,aName);
31
32 // --- own field : purpose ---
33
34 Handle(TCollection_HAsciiString) aPurpose;
35 //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
36 data->ReadString (num,2,"purpose",ach,aPurpose);
37
38 // --- own field : securityLevel ---
39
40 Handle(StepBasic_SecurityClassificationLevel) aSecurityLevel;
41 //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
42 data->ReadEntity(num, 3,"security_level", ach, STANDARD_TYPE(StepBasic_SecurityClassificationLevel), aSecurityLevel);
43
44 //--- Initialisation of the read entity ---
45
46
47 ent->Init(aName, aPurpose, aSecurityLevel);
48}
49
50
51void RWStepBasic_RWSecurityClassification::WriteStep
52 (StepData_StepWriter& SW,
53 const Handle(StepBasic_SecurityClassification)& ent) const
54{
55
56 // --- own field : name ---
57
58 SW.Send(ent->Name());
59
60 // --- own field : purpose ---
61
62 SW.Send(ent->Purpose());
63
64 // --- own field : securityLevel ---
65
66 SW.Send(ent->SecurityLevel());
67}
68
69
70void RWStepBasic_RWSecurityClassification::Share(const Handle(StepBasic_SecurityClassification)& ent, Interface_EntityIterator& iter) const
71{
72
73 iter.GetOneItem(ent->SecurityLevel());
74}
75