0022627: Change OCCT memory management defaults
[occt.git] / src / RWStepBasic / RWStepBasic_RWGroup.cxx
CommitLineData
7fd59977 1// File: RWStepBasic_RWGroup.cxx
2// Created: Wed May 10 15:09:07 2000
3// Author: Andrey BETENEV
4// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
5// Copyright: Matra Datavision 2000
6
7#include <RWStepBasic_RWGroup.ixx>
8
9//=======================================================================
10//function : RWStepBasic_RWGroup
11//purpose :
12//=======================================================================
13
14RWStepBasic_RWGroup::RWStepBasic_RWGroup ()
15{
16}
17
18//=======================================================================
19//function : ReadStep
20//purpose :
21//=======================================================================
22
23void RWStepBasic_RWGroup::ReadStep (const Handle(StepData_StepReaderData)& data,
24 const Standard_Integer num,
25 Handle(Interface_Check)& ach,
26 const Handle(StepBasic_Group) &ent) const
27{
28 // Check number of parameters
29 if ( ! data->CheckNbParams(num,2,ach,"group") ) return;
30
31 // Own fields of Group
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
56void RWStepBasic_RWGroup::WriteStep (StepData_StepWriter& SW,
57 const Handle(StepBasic_Group) &ent) const
58{
59
60 // Own fields of Group
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
75void RWStepBasic_RWGroup::Share (const Handle(StepBasic_Group) &ent,
76 Interface_EntityIterator& iter) const
77{
78
79 // Own fields of Group
80}